:root {
  --green: #047857;
  --green-press: #065f46;
  --mint: #34d399;
  --red: #dc2626;
  --ink: #111827;
  --gray: #6b7280;
  --line: #e5e7eb;
  --bg: #f4f7f6;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
.hidden { display: none !important; }

/* 品牌 */
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); display: inline-block; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #065f46, #047857 60%, #0b906c); }
.login-card { width: 380px; background: #fff; border-radius: 16px; padding: 34px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card h1 { font-size: 22px; margin: 14px 0 22px; }
.login-card label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 16px; }
.login-card input { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.login-card input:focus { outline: none; border-color: var(--green); }
.btn-primary { width: 100%; padding: 12px; background: var(--green); color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-primary:hover { background: var(--green-press); }
.err { color: var(--red); font-size: 13px; min-height: 18px; }
.tip { color: var(--gray); font-size: 12px; margin: 6px 0 0; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.side { width: 220px; background: #0b3b30; color: #d7efe7; display: flex; flex-direction: column; padding: 22px 16px; }
.side .brand { color: #fff; margin-bottom: 26px; }
.side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side nav a { padding: 11px 14px; border-radius: 10px; color: #cfe9e1; cursor: pointer; font-size: 15px; }
.side nav a:hover { background: rgba(255,255,255,.08); }
.side nav a.active { background: var(--green); color: #fff; font-weight: 600; }
.side-foot { font-size: 13px; color: #9fc9bd; display: flex; flex-direction: column; gap: 6px; }
.side-foot a { color: var(--mint); cursor: pointer; }

.main { flex: 1; padding: 28px 32px; overflow: auto; }
.tab { display: none; }
.tab.active { display: block; }
h2 { margin: 0 0 20px; font-size: 21px; }

/* 看板卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.kpi { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.kpi .v { font-size: 28px; font-weight: 700; color: var(--green); }
.kpi .l { color: var(--gray); font-size: 13px; margin-top: 6px; }

/* 工具条 */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; }
.toolbar .btn-primary { width: auto; padding: 9px 18px; }

/* 表格 */
.grid { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.grid th, .grid td { padding: 11px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); }
.grid th { background: #ecf5f1; color: #0b5c45; font-weight: 600; }
.grid tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.tag.ok { background: #dcfce7; color: #15803d; }
.tag.fail, .tag.banned { background: #fee2e2; color: #b91c1c; }
.tag.normal, .tag.free { background: #e5e7eb; color: #374151; }
.tag.member { background: #d1fae5; color: #047857; }
.tag.mock { background: #fef3c7; color: #92400e; }
.link { color: var(--green); cursor: pointer; margin-right: 10px; font-size: 13px; }
.link.red { color: var(--red); }
.muted { color: var(--gray); }

.pager { margin-top: 14px; font-size: 13px; color: var(--gray); display: flex; gap: 12px; align-items: center; }
.pager button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 12px; cursor: pointer; }

/* 反馈 */
.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.fb .meta { color: var(--gray); font-size: 12px; margin-bottom: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.fb .content { font-size: 14px; line-height: 1.6; }
.fb .handle { margin-top: 10px; display: flex; gap: 8px; }
.fb .handle input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.fb .handle button { background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer; }

/* 弹层 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-card { background: #fff; border-radius: 16px; width: 720px; max-height: 86vh; overflow: auto; padding: 26px; position: relative; }
.modal-x { position: absolute; right: 16px; top: 12px; border: none; background: none; font-size: 26px; cursor: pointer; color: var(--gray); }
.modal h3 { margin: 18px 0 8px; font-size: 16px; color: var(--green); }
.modal table { font-size: 13px; }
.kvline { font-size: 13px; color: #374151; margin: 4px 0; }
.kvline b { color: var(--ink); }
