/* 疫苗出入库管理系统 —— 面向社区卫生工作人员的简洁界面 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px; color: #24303c; background: #f2f5f8;
}
#app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
#sidebar {
  width: 220px; flex: none; background: #1f3a5f; color: #dbe6f3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 18px 16px 14px; border-bottom: 1px solid #2d4d78; }
.brand-title { font-size: 17px; font-weight: 700; color: #fff; }
.brand-sub { font-size: 12px; color: #9db6d4; margin-top: 4px; }
#nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
#nav a {
  display: block; padding: 10px 12px; margin: 2px 0; border-radius: 6px;
  color: #c9d8ea; text-decoration: none; font-size: 14px;
}
#nav a:hover { background: #2d4d78; }
#nav a.active { background: #3d6ca8; color: #fff; font-weight: 600; }
.sidebar-foot { padding: 12px 14px; border-top: 1px solid #2d4d78; font-size: 12px; }
.sidebar-foot label { display: block; margin-bottom: 4px; color: #9db6d4; }
.sidebar-foot input {
  width: 100%; padding: 6px 8px; border: 1px solid #3d6ca8; border-radius: 4px;
  background: #16293f; color: #fff; font-size: 13px;
}
.sidebar-foot .tip { margin-top: 8px; color: #7f9cbd; line-height: 1.5; }

/* ---------- 主区域 ---------- */
#main { flex: 1; padding: 24px 28px; max-width: 1200px; }
.view-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.view-desc { color: #64748b; margin-bottom: 18px; line-height: 1.6; }

.card {
  background: #fff; border: 1px solid #e3e9f0; border-radius: 8px;
  padding: 18px 20px; margin-bottom: 16px;
}
.card h3 { font-size: 15px; margin-bottom: 10px; }
.card .muted { color: #8494a7; font-size: 13px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.row label { color: #4a5a6c; }

input[type="text"], input[type="month"], input[type="number"], select {
  padding: 7px 10px; border: 1px solid #c9d4e0; border-radius: 6px;
  font-size: 14px; background: #fff; color: #24303c;
}
input[type="month"] { min-width: 150px; }
select { min-width: 130px; }
input:focus, select:focus { outline: 2px solid #bcd4f0; border-color: #3d6ca8; }

button {
  padding: 7px 16px; border: 1px solid #3d6ca8; border-radius: 6px;
  background: #3d6ca8; color: #fff; font-size: 14px; cursor: pointer;
}
button:hover { background: #2f578a; }
button.ghost { background: #fff; color: #3d6ca8; }
button.ghost:hover { background: #eef4fb; }
button.danger { background: #fff; color: #c0392b; border-color: #c0392b; }
button.danger:hover { background: #fdf0ee; }
button.small { padding: 3px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th, .tbl td { border: 1px solid #e3e9f0; padding: 7px 10px; text-align: left; font-size: 13px; }
.tbl th { background: #f0f4f9; font-weight: 600; white-space: nowrap; }
.tbl tr:nth-child(even) td { background: #fafcfe; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot td { background: #eef4fb; font-weight: 700; }
.tbl-wrap { overflow-x: auto; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 12px; background: #e8f0fa; color: #2f578a; margin-right: 4px;
}
.badge.warn { background: #fdf3e0; color: #a15c00; }
.badge.ok { background: #e5f5ec; color: #1e7b46; }

/* ---------- 步骤指南 ---------- */
.steps { counter-reset: step; }
.steps li {
  list-style: none; padding: 10px 12px 10px 44px; position: relative;
  border-left: 2px solid #dbe6f3; margin-left: 14px; line-height: 1.7;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -14px; top: 10px; width: 26px; height: 26px;
  background: #3d6ca8; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.steps li b { color: #1f3a5f; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 99;
  background: #1f3a5f; color: #fff; padding: 10px 18px; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); max-width: 420px; line-height: 1.5;
}
.toast.error { background: #c0392b; }
.toast.hidden { display: none; }

.file-drop {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px dashed #9db6d4; border-radius: 6px; padding: 8px 14px; background: #f7fafd;
}
.file-drop input[type="file"] { max-width: 340px; }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 13px; }
.kv dt { color: #8494a7; }

.empty { color: #8494a7; padding: 24px; text-align: center; }
a.link { color: #3d6ca8; cursor: pointer; text-decoration: underline; }

/* ---------- 清空本页数据 ---------- */
.clear-bar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; margin: 4px 0 14px;
}
.clear-bar .muted { font-size: 12px; color: #8494a7; }
