* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f7; color: #26292f; font-size: 14px; }
.hidden { display: none !important; }

/* 登录 */
.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #3a6ff7, #6f9bff); }
.login-card { width: 360px; background: #fff; border-radius: 14px; padding: 40px 36px; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.login-logo { font-size: 44px; text-align: center; }
.login-title { font-size: 18px; font-weight: 600; text-align: center; margin: 10px 0 26px; }
.login-err { color: #e64340; font-size: 12px; min-height: 18px; margin-bottom: 6px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: #6b778c; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #d9dfeb; border-radius: 8px; padding: 9px 12px; font-size: 14px; outline: none; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: #3a6ff7; }
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: #98a1b3; margin-top: 4px; }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field.inline label { margin: 0; white-space: nowrap; }
.field input[type=file] { padding: 6px; background: #f8fafd; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #1f2733; color: #aab3c2; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-logo { color: #fff; font-weight: 700; font-size: 16px; padding: 20px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
#side-nav { flex: 1; padding: 10px 0 20px; }
.nav-group { font-size: 11px; color: #66718a; padding: 14px 18px 6px; }
.nav-item { display: block; padding: 10px 18px; color: #aab3c2; text-decoration: none; font-size: 13px; border-left: 3px solid transparent; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: #3a6ff7; border-left-color: #9dc0ff; }
.side-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.06); font-size: 12px; }
.side-foot a { color: #8a94a8; text-decoration: none; display: inline-block; margin-right: 14px; }
.side-foot a:hover { color: #fff; }

.main { flex: 1; min-width: 0; }
.topbar { background: #fff; padding: 0 24px; height: 54px; display: flex; align-items: center; font-size: 16px; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 5; }
.page-body { padding: 20px 24px 60px; }

.card { background: #fff; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.card h3 { font-size: 15px; margin-bottom: 14px; }
.card h3 small { color: #98a1b3; font-weight: 400; margin-left: 8px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { border: 1px solid #d9dfeb; border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef0f5; vertical-align: middle; }
table.grid th { color: #6b778c; font-weight: 500; background: #f8fafd; white-space: nowrap; }
table.grid tr:hover td { background: #fafcff; }
.thumb { height: 44px; border-radius: 4px; background: #f0f3f9; display: block; }
.tag { display: inline-block; font-size: 12px; border-radius: 6px; padding: 2px 8px; background: #f0f3f9; color: #6b778c; }
.tag.ok { background: #e5f6ec; color: #188a42; }
.tag.warn { background: #fff4e3; color: #c86e00; }
.tag.bad { background: #fdecec; color: #d43c33; }
.tag.info { background: #e8f0ff; color: #3a6ff7; }
.muted { color: #98a1b3; font-size: 12px; }

.pager { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: #6b778c; }

.btn { border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; cursor: pointer; background: #eef1f7; color: #4a5568; }
.btn:hover { filter: brightness(.97); }
.btn.primary { background: #3a6ff7; color: #fff; }
.btn.danger { background: #fdecec; color: #d43c33; }
.btn.success { background: #e5f6ec; color: #188a42; }
.btn.warn { background: #fff4e3; color: #c86e00; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; padding: 11px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.stat-card .label { color: #6b778c; font-size: 13px; }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-card .sub { color: #98a1b3; font-size: 12px; margin-top: 4px; }
.stat-card.blue { background: linear-gradient(135deg, #3a6ff7, #6f9bff); color: #fff; }
.stat-card.blue .label, .stat-card.blue .sub { color: rgba(255,255,255,.8); }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-rect { width: 22px; background: linear-gradient(180deg, #6f9bff, #3a6ff7); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-label { font-size: 11px; color: #98a1b3; }
.bar-num { font-size: 11px; color: #4a5568; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs .tab { padding: 7px 18px; border-radius: 20px; background: #eef1f7; color: #4a5568; font-size: 13px; cursor: pointer; border: none; }
.tabs .tab.on { background: #3a6ff7; color: #fff; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: rgba(20,24,32,.88); color: #fff; padding: 10px 22px; border-radius: 8px; z-index: 999; font-size: 14px; }
.toast.err { background: rgba(196,44,34,.95); }
.kv { display: flex; gap: 8px; margin: 3px 0; font-size: 13px; }
.kv b { color: #6b778c; font-weight: 500; min-width: 90px; }

/* 图标字体：Material Icons（替代 emoji 图标，使用连字，如 <i class="mi">camera</i>） */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url('../assets/MaterialIcons-Regular.ttf') format('truetype');
}
.mi {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  -webkit-font-feature-settings: 'liga' 1;
  font-feature-settings: 'liga' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  vertical-align: middle;
}
.login-logo .mi, .side-logo .mi { font-size: 30px; }
.big-icon .mi { font-size: 72px; }
