:root {
  --green: #07c160;
  --green-dark: #06ad56;
  --green-light: #e8f8ef;
  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --ink-3: #8a8a8a;
  --line: #e6e6e6;
  --bg: #f5f6f7;
  --danger: #fa5151;
  --warn: #ff8f1f;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; font-size: 14px; line-height: 1.6; }
.hidden { display: none !important; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; width: 360px; border-radius: 12px; padding: 32px; box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.login-box h2 { margin: 0 0 4px; font-size: 20px; }
.login-box .sub { color: var(--ink-3); font-size: 13px; margin: 0 0 20px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); }
.field textarea { min-height: 90px; font-family: Consolas, Menlo, monospace; font-size: 12px; }
.field .help { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn:hover { border-color: #cfcfcf; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.ghost { color: var(--ink-2); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--danger); border-color: #f5c6c6; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 布局 */
.side { position: fixed; left: 0; top: 0; bottom: 0; width: 190px; background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; }
.side-brand { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; padding: 0 8px 18px; }
.logo { width: 26px; height: 26px; border-radius: 6px; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { padding: 9px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.side nav a:hover { background: #f5f5f5; }
.side nav a.active { background: var(--green-light); color: #0a7a41; font-weight: 500; }
.side-foot { position: absolute; bottom: 16px; left: 12px; right: 12px; font-size: 12px; color: var(--ink-3); }
.main { margin-left: 190px; padding: 20px 24px 60px; }

.panel { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.sec { font-size: 15px; font-weight: 600; margin: 0 0 14px; }

/* 统计 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--ink-3); }

/* 筛选 */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; outline: none; }
.filters input { flex: 1; min-width: 200px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid #f2f2f2; vertical-align: middle; }
.table tbody tr:hover { background: #fafafa; }
.table .code { font-family: Consolas, Menlo, monospace; font-size: 12px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; font-size: 13px; color: var(--ink-3); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; background: var(--green-light); color: #0a7a41; white-space: nowrap; }
.badge.warn { background: #fff4e5; color: #a35c00; }
.badge.danger { background: #fdecec; color: #b32424; }
.badge.gray { background: #f0f0f0; color: #666; }

/* 详情 */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.detail-head h2 { margin: 0; font-size: 18px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }
.kv { display: flex; padding: 7px 0; border-bottom: 1px dashed #f0f0f0; font-size: 13px; }
.kv .k { width: 130px; color: var(--ink-3); flex: none; }
.kv .v { flex: 1; word-break: break-all; }
.kv .v em { font-style: normal; color: var(--ink-3); }
.group-title { font-size: 14px; font-weight: 600; margin: 22px 0 10px; padding-left: 9px; border-left: 3px solid var(--green); }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.att { border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; text-align: center; }
.att img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; background: #f2f2f2; }
.att span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.reject-box { background: #fdecec; border-left: 3px solid var(--danger); padding: 10px 14px; border-radius: 6px; font-size: 13px; color: #933; margin: 14px 0; white-space: pre-wrap; }
.ok-box { background: var(--green-light); border-left: 3px solid var(--green); padding: 10px 14px; border-radius: 6px; font-size: 13px; color: #12643c; margin: 14px 0; }

.log-item { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #f0f0f0; display: flex; gap: 12px; }
.log-item .t { color: var(--ink-3); width: 140px; flex: none; }

.notice { background: var(--green-light); border-left: 3px solid var(--green); padding: 10px 14px; border-radius: 6px; font-size: 13px; color: #12643c; margin-top: 14px; }
.notice b { display: block; }
.guide { padding-left: 20px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.guide li { margin-bottom: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.tip { font-size: 12px; color: var(--ink-3); }

.toast { position: fixed; left: 50%; top: 40px; transform: translateX(-50%); background: rgba(0,0,0,.82); color: #fff; padding: 9px 18px; border-radius: 8px; z-index: 99; opacity: 0; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.preview { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 100; display: flex; align-items: center; justify-content: center; }
.preview img { max-width: 90vw; max-height: 90vh; border-radius: 6px; }
.preview .close { position: absolute; right: 24px; top: 16px; font-size: 32px; color: #fff; cursor: pointer; }
