* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:#f5f6f8; color:#2d3748; font-size:14px;
}

/* 顶栏 */
.topbar {
  display:flex; align-items:center; justify-content:space-between;
  background:#fff; border-bottom:1px solid #e2e8f0; padding:0 24px; height:64px;
}
.brand { display:flex; align-items:center; }
.brand-logo { font-size:28px; margin-right:12px; }
.brand-name { font-size:16px; font-weight:600; color:#1a365d; }
.brand-sub { font-size:12px; color:#a0aec0; }
.nav { display:flex; }
.nav-btn {
  border:none; background:none; padding:0 22px; height:64px; font-size:15px;
  color:#4a5568; cursor:pointer; border-bottom:3px solid transparent;
}
.nav-btn.active { color:#4c9f70; font-weight:600; border-bottom-color:#4c9f70; }
.auth-box { display:flex; align-items:center; gap:12px; }
.auth-status { font-size:12px; color:#a0aec0; }
.auth-status.ok { color:#4c9f70; }

main { max-width:1200px; margin:0 auto; padding:24px; }

/* 视图 */
.view { display:none; }
.view.active { display:block; }

/* 按钮 */
.btn {
  border:none; border-radius:8px; cursor:pointer; font-size:14px;
  padding:9px 18px; line-height:1.4;
}
.btn-primary { background:#4c9f70; color:#fff; }
.btn-primary:hover { background:#3a8a5c; }
.btn-ghost { background:#edf2f7; color:#4a5568; }
.btn-ghost:hover { background:#e2e8f0; }
.btn-sm { padding:5px 12px; font-size:13px; }
.btn-danger { color:#c53030; background:#fff5f5; }
.btn-danger:hover { background:#fed7d7; }

/* 输入 */
.input {
  border:1px solid #e2e8f0; border-radius:8px; padding:9px 12px; font-size:14px;
  background:#fff; color:#2d3748; outline:none;
}
.input:focus { border-color:#4c9f70; }
.input.search { width:220px; }
.input.select { min-width:130px; }
.input.textarea { width:100%; min-height:72px; resize:vertical; }

/* 概览 */
.stat-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px,1fr)); gap:16px; margin-bottom:16px; }
.stat-card { background:#fff; border-radius:12px; padding:22px; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.stat-num { font-size:30px; font-weight:700; color:#4c9f70; }
.stat-label { font-size:13px; color:#718096; margin-top:4px; }
.dash-cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.panel { background:#fff; border-radius:12px; padding:20px; margin-bottom:16px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.panel-title { font-size:15px; font-weight:600; color:#1a365d; margin-bottom:14px; border-left:3px solid #4c9f70; padding-left:10px; }
.bar-row { display:flex; align-items:center; margin-bottom:10px; }
.bar-label { width:110px; font-size:13px; color:#4a5568; }
.bar-track { flex:1; height:16px; background:#edf2f7; border-radius:8px; overflow:hidden; }
.bar-fill { height:100%; background:#4c9f70; border-radius:8px; }
.bar-num { width:40px; text-align:right; font-size:13px; color:#718096; }
.tips p { font-size:13px; color:#4a5568; line-height:1.9; }
.tips code { background:#edf2f7; border-radius:4px; padding:1px 6px; color:#c05621; font-size:12px; }

/* 工具栏 */
.toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; gap:12px; flex-wrap:wrap; }
.filters { display:flex; gap:10px; flex-wrap:wrap; }

/* 表格 */
.table-wrap { background:#fff; border-radius:12px; overflow:auto; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.table { width:100%; border-collapse:collapse; font-size:13px; min-width:900px; }
.table th { background:#edf2f7; text-align:left; padding:12px; font-weight:600; color:#4a5568; white-space:nowrap; }
.table td { padding:12px; border-top:1px solid #f0f2f5; vertical-align:middle; }
.table .op { text-align:right; white-space:nowrap; }
.table .op button { margin-left:8px; }
.mono { font-family:Consolas,monospace; color:#718096; font-size:12px; }
.name-cell { font-weight:600; color:#2d3748; }

/* 标签 */
.pill { display:inline-block; padding:2px 10px; border-radius:20px; font-size:12px; margin-right:4px; }
.pill-blue { background:#ebf8ff; color:#2b6cb0; }
.pill-green { background:#f0fff4; color:#276749; }
.pill-gray { background:#edf2f7; color:#4a5568; }
.pill-purple { background:#faf5ff; color:#6b46c1; }
.dot { width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:6px; }
.dot-green { background:#48bb78; }
.dot-yellow { background:#ecc94b; }
.dot-red { background:#fc8181; }

/* 弹窗 */
.modal-mask {
  position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:100;
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.modal-mask.hidden { display:none; }
.modal { background:#fff; border-radius:14px; padding:24px; width:440px; max-width:100%; }
.modal-lg { width:720px; max-height:90vh; display:flex; flex-direction:column; }
.modal h3 { font-size:17px; color:#1a365d; margin-bottom:12px; }
.modal-desc { font-size:13px; color:#718096; margin-bottom:14px; line-height:1.7; }
.modal-btns { display:flex; justify-content:flex-end; gap:12px; margin-top:20px; }
.form-scroll { overflow-y:auto; flex:1; padding-right:4px; }

/* 表单 */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.form-field { margin-bottom:14px; }
.form-field label { display:block; font-size:13px; font-weight:600; color:#4a5568; margin-bottom:6px; }
.form-field .input { width:100%; }
.check-group { display:flex; flex-wrap:wrap; gap:8px; }
.check { display:inline-flex; align-items:center; padding:6px 14px; border-radius:20px; background:#edf2f7; font-size:13px; cursor:pointer; }
.check input { margin-right:5px; }
.check.on { background:#4c9f70; color:#fff; }
.check.green.on { background:#48bb78; }
.check.yellow.on { background:#d69e2e; }
.check.red.on { background:#e53e3e; }

/* 动态列表 */
.kv-list, .step-list { display:flex; flex-direction:column; gap:8px; margin-bottom:8px; }
.kv-row { display:flex; gap:8px; }
.kv-row .input { flex:1; }
.kv-row .input.amount { width:200px; flex:none; }
.step-row { display:flex; gap:8px; align-items:center; }
.step-num { width:28px; height:28px; border-radius:50%; background:#4c9f70; color:#fff; font-size:13px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.step-row .input { flex:1; }

/* 提示 */
.toast {
  position:fixed; top:24px; left:50%; transform:translateX(-50%);
  background:#1a365d; color:#fff; padding:10px 20px; border-radius:8px; font-size:14px; z-index:200;
}
.toast.hidden { display:none; }
.toast.error { background:#c53030; }

.toolbar-hint { font-size:12px; color:#a0aec0; }
.logs-table { max-height:50vh; overflow:auto; margin-top:8px; }

/* 用户详情 */
.detail-list { display:flex; flex-direction:column; gap:10px; }
.detail-row { display:flex; border-bottom:1px solid #f0f2f5; padding-bottom:10px; font-size:13px; }
.detail-row:last-child { border-bottom:none; }
.detail-label { width:110px; color:#a0aec0; flex-shrink:0; }
.detail-value { flex:1; color:#2d3748; word-break:break-all; }
.detail-value .pill { margin:0 4px 4px 0; }

@media (max-width: 760px) {
  .dash-cols, .stat-cards, .form-grid { grid-template-columns:1fr; }
  .nav-btn { padding:0 12px; }
}

/* 全屏登录页 */
.login-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(135deg, #2b6cb0 0%, #4c9f70 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-screen.hidden { display: none; }
.login-card {
  background: #fff; border-radius: 14px; padding: 44px 40px 36px;
  width: 380px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.login-brand {
  font-size: 24px; font-weight: 600; text-align: center; color: #1a365d;
  letter-spacing: 1px;
}
.login-sub {
  font-size: 13px; color: #a0aec0; text-align: center; margin-top: 8px;
}
.login-form { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.login-input {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px;
  font-size: 14px; background: #f7fafc; color: #2d3748; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.login-input:focus { border-color: #4c9f70; background: #fff; }
.login-input::placeholder { color: #cbd5e0; }
.login-btn {
  background: #4c9f70; color: #fff; border: none; border-radius: 8px;
  padding: 13px; font-size: 15px; font-weight: 500; cursor: pointer;
  margin-top: 6px; transition: background 0.15s;
}
.login-btn:hover { background: #3a8a5c; }
.login-btn:disabled { background: #a0aec0; cursor: not-allowed; }
.login-error {
  color: #c53030; font-size: 13px; min-height: 18px; margin-top: 12px;
  text-align: center;
}
.login-hint {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf2f7;
  font-size: 12px; color: #a0aec0; text-align: center; line-height: 1.6;
}
