:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --bg: #070817;
  --panel: #11142f;
  --panel-2: #171a3a;
  --line: #2a2e58;
  --text: #f5f6ff;
  --muted: #999fbd;
  --gold: #efb52e;
  --gold-2: #ffd45f;
  --green: #35d18a;
  --red: #ff6677;
  --blue: #56a8ff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1120px; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 85% 10%, #17123e 0, transparent 28%), var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 40px; }
.auth-card { width: 440px; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: rgba(17,20,47,.94); box-shadow: 0 28px 90px rgba(0,0,0,.45); }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; color: #16101f; font-weight: 900; background: linear-gradient(135deg,var(--gold-2),#9e72ff); box-shadow: 0 12px 32px rgba(239,181,46,.2); }
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px; font-size: 14px; }
.auth-card h1 { margin: 22px 0 8px; font-size: 24px; }
.auth-card p { margin: 0; color: var(--muted); }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #c7cbe0; font-size: 13px; }
input, textarea, select { width: 100%; color: var(--text); border: 1px solid var(--line); border-radius: 10px; outline: none; background: #0c0e24; transition: .2s; }
input, select { height: 42px; padding: 0 13px; }
textarea { min-height: 100px; padding: 12px 13px; resize: vertical; line-height: 1.7; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(239,181,46,.1); }
.primary-btn, .secondary-btn, .danger-btn, .text-btn { border: 0; border-radius: 10px; font-weight: 700; }
.primary-btn { min-height: 42px; padding: 0 18px; color: #261900; background: linear-gradient(135deg,var(--gold),var(--gold-2)); box-shadow: 0 10px 24px rgba(239,181,46,.16); }
.secondary-btn { min-height: 38px; padding: 0 15px; color: #eceeff; border: 1px solid var(--line); background: #191c3a; }
.danger-btn { min-height: 32px; padding: 0 12px; color: #ff9aa5; border: 1px solid rgba(255,102,119,.3); background: rgba(255,102,119,.08); }
.text-btn { padding: 8px 0; color: var(--muted); background: transparent; }
.full-btn { width: 100%; }
.form-error { min-height: 20px; margin-top: 14px; color: var(--red); font-size: 13px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; display: flex; flex-direction: column; border-right: 1px solid #202343; background: rgba(8,9,25,.96); }
.sidebar-brand { display: flex; align-items: center; gap: 13px; height: 88px; padding: 0 22px; border-bottom: 1px solid #202343; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 18px; }
.sidebar-brand span { margin-top: 4px; color: var(--gold); font-size: 11px; }
.nav-list { display: grid; gap: 7px; padding: 24px 14px; }
.nav-item { display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 0 15px; color: #b4b8d2; border: 1px solid transparent; border-radius: 11px; background: transparent; text-align: left; }
.nav-item i { width: 22px; color: #8b91ba; font-style: normal; font-size: 20px; text-align: center; }
.nav-item:hover { color: #fff; background: #11142f; }
.nav-item.active { color: var(--gold-2); border-color: #5b4722; background: linear-gradient(90deg,rgba(239,181,46,.16),rgba(239,181,46,.05)); }
.nav-item.active i { color: var(--gold); }
.sidebar-footer { margin-top: auto; padding: 20px 22px; border-top: 1px solid #202343; color: var(--muted); font-size: 12px; }
.sidebar-footer > div { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.main-area { grid-column: 2; min-width: 0; padding: 0 28px 42px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #202343; }
.topbar h2 { margin: 0; font-size: 21px; }
.topbar p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.admin-pill { display: flex; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: #11142f; font-size: 12px; }
.admin-pill span { color: var(--muted); }
.view { display: none; padding-top: 26px; }
.active-view { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { min-height: 126px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg,#161938,#0f122c); }
.stat-card b { display: block; margin: 10px 0 7px; font-size: 28px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-icon { color: var(--gold); font-size: 16px; }
.panel { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(17,20,47,.92); box-shadow: 0 12px 40px rgba(0,0,0,.12); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.feature-grid article { padding: 18px; border: 1px solid #25294c; border-radius: 12px; background: #0d1029; }
.feature-grid b, .feature-grid span { display: block; }
.feature-grid b { margin-bottom: 9px; color: var(--gold-2); }
.feature-grid span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.toolbar { display: flex; gap: 9px; }
.toolbar input { width: 210px; height: 38px; }
.table-wrap { overflow: auto; border: 1px solid #25294c; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 13px 15px; border-bottom: 1px solid #232747; text-align: left; font-size: 12px; }
th { color: #9ea4c5; background: #181b38; font-weight: 600; }
td { color: #e6e8f5; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.015); }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; }
.badge.green { color: var(--green); background: rgba(53,209,138,.08); }
.badge.gold { color: var(--gold); background: rgba(239,181,46,.08); }
.badge.red { color: var(--red); background: rgba(255,102,119,.08); }
.badge.gray { color: var(--muted); background: rgba(153,159,189,.07); }
.row-actions { display: flex; gap: 8px; }
.row-actions button { min-height: 30px; padding: 0 10px; }
.inline-form { display: flex; align-items: end; gap: 12px; }
.inline-form label { width: 170px; }
.resource-layout { display: grid; grid-template-columns: minmax(330px,.7fr) minmax(560px,1.3fr); gap: 18px; align-items: start; }
.resource-form { display: grid; gap: 15px; position: sticky; top: 20px; }
.resource-form .panel-head { margin-bottom: 0; }
.resource-list { display: grid; gap: 10px; }
.resource-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid #282c51; border-radius: 12px; background: #0d1029; }
.resource-card h4 { margin: 0 0 7px; font-size: 14px; }
.resource-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.resource-card-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { min-width: 34px; height: 34px; padding: 0 9px; color: #dfe2f4; border: 1px solid var(--line); border-radius: 9px; background: #181b38; }
.empty { padding: 60px 20px; color: var(--muted); border: 1px dashed #2b3058; border-radius: 12px; text-align: center; }
.platform-settings { display: grid; gap: 18px; max-width: 1060px; }
.platform-settings .panel-head { margin-bottom: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.platform-settings small { color: var(--muted); font-size: 11px; }
.status-pills, .form-actions { display: flex; align-items: center; gap: 10px; }
.clear-secret-box { display: flex; align-items: center; gap: 22px; min-height: 70px; padding: 15px; border: 1px solid #25294c; border-radius: 10px; background: #0d1029; }
.clear-secret-box label { display: flex; align-items: center; gap: 8px; }
.clear-secret-box input { width: 16px; height: 16px; }
.log-detail { max-width: 460px; overflow: hidden; text-overflow: ellipsis; }
.toast { position: fixed; top: 22px; left: 50%; z-index: 50; max-width: 520px; padding: 12px 18px; color: #fff; border: 1px solid #4b4f76; border-radius: 11px; background: #202448; box-shadow: 0 18px 50px rgba(0,0,0,.4); transform: translate(-50%,-90px); opacity: 0; transition: .25s; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.toast.error { border-color: rgba(255,102,119,.6); background: #3a1725; }
@media (max-width: 1250px) { .feature-grid { grid-template-columns: repeat(2,1fr); } .resource-layout { grid-template-columns: 390px 1fr; } }
