:root {
  color-scheme: light;
  --bg: #f2f7f9;
  --sidebar: #e6f1f4;
  --panel: rgba(255,255,255,.96);
  --panel-soft: #f7fafb;
  --line: #d5e1e7;
  --text: #153248;
  --muted: #607987;
  --primary: #10a188;
  --primary-dark: #087f6c;
  --danger: #cf5362;
  --warning: #9a681a;
  --shadow: 0 14px 35px rgba(48,82,98,.10);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font: 14px/1.55 "Microsoft YaHei", "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(24px,3vw,31px); letter-spacing: -.03em; margin-bottom: 4px; }
h2 { font-size: 27px; letter-spacing: -.025em; margin-bottom: 5px; }
h3 { font-size: 18px; margin-bottom: 7px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--primary-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 80% 0,#e1f2f1 0,var(--bg) 46%); }
.login-card { width: min(430px,100%); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 24px 70px rgba(48,82,98,.14); }
.login-card h1 { margin-bottom: 10px; }
.login-card form { display: grid; gap: 15px; margin-top: 25px; }
.security-note { color: var(--muted); font-size: 12px; margin: 20px 0 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0,1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 100vh; padding: 28px 18px 20px; background: var(--sidebar); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px 26px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #b9f0df; color: var(--primary-dark); font-size: 18px; font-weight: 900; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 18px; line-height: 1.2; }
.brand span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.sidebar-label { margin: 0 12px 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #4f6d7a; text-align: left; padding: 9px 12px; cursor: pointer; font-weight: 700; transition: background .15s,border-color .15s,color .15s,box-shadow .15s; }
.nav-item:hover { border-color: #b6dfd5; background: rgba(255,255,255,.62); color: var(--primary-dark); }
.nav-item.active { border-color: #b6dfd5; background: #fff; color: var(--primary-dark); box-shadow: inset 3px 0 0 var(--primary),0 6px 18px rgba(51,88,105,.08); }
.sidebar-foot { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 7px; margin: auto 7px 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sidebar-foot small { grid-column: 2; margin-top: 2px; color: #78909b; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(16,161,136,.12); }
.main-shell { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 24px 30px 20px; background: rgba(255,255,255,.90); border-bottom: 1px solid rgba(213,225,231,.8); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.content { width: 100%; max-width: 1220px; min-width: 0; flex: 1; padding: 22px 30px 10px; }
.page-footer { margin: auto; padding: 18px 30px 22px; color: var(--muted); text-align: center; font-size: 12px; }
.page { display: none; }
.active-page { display: block; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 19px; }
.page-heading p { margin-bottom: 0; }
.panel { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.panel-heading p { margin-bottom: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg,#fff,var(--panel-soft)); }
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 4px; color: var(--text); font-size: 29px; line-height: 1.15; }
.two-col { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.three-col { display: grid; grid-template-columns: 1fr 1.5fr .7fr; gap: 14px; }
.detail-list { margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: right; word-break: break-word; font-weight: 700; }
.field { display: grid; gap: 6px; color: #486572; font-size: 13px; }
.field span { font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #b8ced7; border-radius: 9px; background: #fff; color: var(--text); padding: 10px 11px; outline: 0; }
.field textarea { resize: vertical; min-height: 76px; }
.field input::placeholder, .field textarea::placeholder { color: #8aa0aa; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,161,136,.16); }
.inline-fields, .form-actions { display: flex; align-items: end; gap: 12px; }
.grow { flex: 1; }
.button { border: 1px solid transparent; border-radius: 9px; cursor: pointer; padding: 9px 14px; color: #fff; font-weight: 800; white-space: nowrap; transition: filter .15s,box-shadow .15s; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: linear-gradient(135deg,#20b597,var(--primary-dark)); box-shadow: 0 5px 14px rgba(8,127,108,.16); }
.button-secondary { border-color: var(--line); background: #fff; color: #365a6c; }
.button-danger { background: linear-gradient(135deg,#df6876,var(--danger)); }
.button:hover:not(:disabled) { filter: brightness(.97); box-shadow: 0 5px 14px rgba(48,82,98,.12); }
.full-width { width: 100%; }
.check-row { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0; color: #486572; font-size: 13px; }
.check-row input { margin-top: 4px; accent-color: var(--primary); }
.message { min-height: 21px; margin: 13px 0 0; color: var(--muted); }
.message.success { color: var(--primary-dark); }
.message.error { color: var(--danger); }
.warning { padding: 10px; border: 1px solid #e3c98f; border-radius: 9px; background: #fff8e7; color: var(--warning); }
.table-panel { padding-bottom: 12px; }
.table-scroll { overflow-x: auto; overflow-y: hidden; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; background: #f7fafb; }
td { color: #264b5e; overflow-wrap: anywhere; word-break: break-word; }
#partnersBody td:first-child, #tasksBody td:first-child { min-width: 150px; max-width: 210px; }
.table-action { padding: 6px 9px; font-size: 12px; }
.json-view, .secret-result { max-height: 380px; overflow: auto; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f7fafb; color: #315b6b; white-space: pre-wrap; word-break: break-all; }
.secret-result { color: var(--warning); }
.badge { padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge-ok { background: #dff6ee; color: var(--primary-dark); }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-toolbar h3, .page-toolbar p { margin-bottom: 0; }
code { padding: 2px 6px; border: 1px solid #d7e5e9; border-radius: 5px; background: #eef5f6; color: #265669; font-family: Consolas, monospace; }
.api-docs-table { min-width: 980px; }
.api-docs-table td:nth-child(2) { color: var(--primary-dark); font-family: Consolas, monospace; font-weight: 800; white-space: nowrap; }
.api-docs-table td:nth-child(3) { min-width: 330px; color: #315b6b; font-family: Consolas, monospace; }
.api-debug-layout { display: grid; grid-template-columns: minmax(280px,.85fr) minmax(360px,1.15fr); gap: 18px; align-items: start; }
.api-debug-form { display: grid; gap: 12px; }
.api-debug-result { min-width: 0; }
.result-heading { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.api-debug-result .json-view { min-height: 390px; max-height: 650px; }
.qq-records-toolbar { display: grid; grid-template-columns: minmax(170px,1.35fr) repeat(4,minmax(125px,1fr)); gap: 12px; align-items: end; }
.qq-record-filter { display: grid; gap: 6px; color: #486572; font-size: 13px; }
.qq-record-filter span { font-weight: 700; }
.qq-record-filter input, .qq-record-filter select { width: 100%; border: 1px solid #b8ced7; border-radius: 9px; background: #fff; color: var(--text); padding: 9px 10px; outline: 0; }
.qq-record-filter input:focus, .qq-record-filter select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,161,136,.16); }
.qq-record-actions { align-self: end; }
#qqRecordsBody td:first-child { font-family: Consolas, monospace; font-weight: 800; white-space: nowrap; }
@media (max-width:1050px) { .stat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .three-col { grid-template-columns: 1fr 1.2fr .8fr; } }
@media (max-width:1050px) { .qq-records-toolbar { grid-template-columns: repeat(3,minmax(140px,1fr)); } }
@media (max-width:820px) { .app-shell { display: block; } .sidebar { min-height: auto; padding: 18px 16px 12px; } .brand { padding-bottom: 16px; } .sidebar-label, .sidebar-foot { display: none; } .sidebar nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 3px; } .nav-item { width: auto; flex: 0 0 auto; white-space: nowrap; } .topbar { padding: 20px 22px 16px; } .content { padding: 20px 22px 8px; } .two-col, .api-debug-layout { grid-template-columns: 1fr; } }
@media (max-width:620px) { .topbar { display: block; } .topbar-actions { justify-content: flex-start; margin-top: 14px; } .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } .page-heading, .page-toolbar, .inline-fields, .form-actions { display: grid; align-items: stretch; } .three-col, .qq-records-toolbar { grid-template-columns: 1fr; } .panel { padding: 16px; } .page-footer { padding: 16px 18px 20px; } }
.admin-screen-wait { position: fixed; right: 1rem; bottom: 1rem; z-index: 10000; max-width: min(26rem, calc(100vw - 2rem)); padding: 1rem; border: 1px solid #718096; border-radius: .75rem; background: #fff; color: #172235; box-shadow: 0 8px 32px #0003; }
.admin-screen-wait button { padding: .5rem .8rem; cursor: pointer; }
