:root {
  --navy: #0B2E66;
  --blue: #1E5FD9;
  --blue-light: #EAF0FB;
  --text: #1B2437;
  --text-sub: #46536B;
  --muted: #98A2B3;
  --line: #E3E9F3;
  --bg: #F4F7FC;
  --green: #0E9F6E;
  --orange: #C77700;
  --red: #D93025;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}

a { color: var(--blue); cursor: pointer; text-decoration: none; }

/* 登录 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #0B2E66 0%, #14488F 60%, #1E5FD9 100%);
  padding: 24px;
}

.login-card {
  width: 400px;
  background: #fff;
  border-radius: 14px;
  padding: 30px 28px 26px;
  box-shadow: 0 18px 50px rgba(6, 22, 54, 0.28);
}

.brand-name { font-size: 22px; font-weight: 600; color: var(--navy); }
.brand-sub { margin-top: 6px; font-size: 12px; color: var(--muted); }

.login-tabs { display: flex; margin: 22px 0 16px; border-bottom: 1px solid var(--line); }
.login-tab {
  flex: 1; text-align: center; padding: 10px 0; font-size: 14px; color: var(--text-sub);
  cursor: pointer; border-bottom: 2px solid transparent;
}
.login-tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; color: var(--text); background: #fff; outline: none; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { min-height: 84px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 13px; font-family: inherit;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1B54C3; }
.btn-ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-plain { background: #F1F4FA; color: var(--text-sub); }
.btn-danger { background: #FDECEA; color: var(--red); }
.btn-block { width: 100%; padding: 11px 0; font-size: 15px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.login-tip { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.login-error { margin-top: 10px; font-size: 12px; color: var(--red); min-height: 16px; }

/* 主体布局 */
.app { display: none; min-height: 100vh; }
.app.ready { display: block; }

.topbar {
  height: 58px; background: var(--navy); color: #fff;
  display: flex; align-items: center; padding: 0 24px;
}
.topbar .logo { font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.topbar .sub { margin-left: 12px; font-size: 12px; color: rgba(255,255,255,.62); }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 12px; color: rgba(255,255,255,.8); margin-right: 14px; }
.topbar .logout { font-size: 12px; color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 5px 10px; border-radius: 6px; cursor: pointer; }

.nav { display: flex; gap: 4px; background: #fff; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.nav-item { padding: 14px 16px; font-size: 14px; color: var(--text-sub); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav-item.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

.content { padding: 20px 24px 60px; max-width: 1280px; margin: 0 auto; }

.page-head { display: flex; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 17px; font-weight: 600; }
.page-head .spacer { flex: 1; }

/* 卡片 / 统计 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line);
}
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { margin-top: 8px; font-size: 24px; font-weight: 600; color: var(--navy); }
.stat .value.accent { color: var(--blue); }
.stat .hint { margin-top: 6px; font-size: 12px; color: var(--muted); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel + .panel { margin-top: 14px; }
.panel-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; background: #FAFBFE; }
.table tr:hover td { background: #FBFCFE; }
.table .strong { font-weight: 600; color: var(--navy); }
.table .sub { color: var(--muted); font-size: 12px; }
.table .ops { display: flex; gap: 6px; flex-wrap: wrap; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-green { background: #E7F7F0; color: var(--green); }
.tag-orange { background: #FFF4E3; color: var(--orange); }
.tag-blue { background: var(--blue-light); color: var(--blue); }
.tag-gray { background: #F0F2F6; color: #6B778C; }
.tag-red { background: #FDECEA; color: var(--red); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters input, .filters select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  font-family: inherit; min-width: 160px; outline: none;
}
.filters input:focus, .filters select:focus { border-color: var(--blue); }

.empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }

.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; font-size: 12px; color: var(--muted); }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(11, 46, 102, .45); display: none; overflow-y: auto; padding: 40px 16px; z-index: 50; }
.mask.show { display: block; }
.dialog { width: 720px; max-width: 100%; margin: 0 auto; background: #fff; border-radius: 12px; padding: 22px 24px; }
.dialog.wide { width: 900px; }
.dialog-head { display: flex; align-items: center; margin-bottom: 16px; }
.dialog-title { font-size: 16px; font-weight: 600; flex: 1; }
.dialog-close { font-size: 13px; color: var(--muted); cursor: pointer; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

.section-note { font-size: 12px; color: var(--muted); line-height: 1.8; margin-bottom: 12px; }

.uploader { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; text-align: center; font-size: 13px; color: var(--blue); cursor: pointer; }
.uploader:hover { border-color: var(--blue); background: #FAFBFE; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 96px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 4px; padding: 1px 5px; cursor: pointer; }

.files { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-sub); background: #F7F9FC; padding: 6px 10px; border-radius: 6px; }
.file-item .del { margin-left: auto; color: var(--red); cursor: pointer; }

.detail-list { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; font-size: 13px; }
.detail-list .k { color: var(--muted); }
.detail-list .v { color: var(--text); word-break: break-all; }

.toast { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); background: rgba(17, 24, 39, .9); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 100; display: none; }
.toast.show { display: block; }
