/* 报销系统全局样式：手机优先，768px 以上电脑宽屏。作者：CC */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #333;
}

.container { max-width: 640px; margin: 0 auto; padding: 12px; }

/* ---------- 顶部导航 ---------- */
.topbar {
  background: #1f6feb; color: #fff;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 100;
  flex-wrap: wrap;
}
.topbar .brand { font-weight: 700; font-size: 17px; }
.topbar a { color: #dbe7ff; text-decoration: none; font-size: 14px; }
.topbar a.active, .topbar a:hover { color: #fff; }
.topbar .who { margin-left: auto; font-size: 13px; color: #cfe0ff; }
.badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  border-radius: 9px; background: #ff4d4f; color: #fff;
  font-size: 12px; text-align: center; padding: 0 5px;
  vertical-align: 2px; margin-left: 2px;
}
.badge.hidden { display: none; }

/* ---------- 卡片 / 表单 ---------- */
.card {
  background: #fff; border-radius: 10px; padding: 16px;
  margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.card h3 { margin: 0 0 12px; font-size: 16px; }
label { display: block; font-size: 14px; color: #555; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=number], input[type=date],
select, textarea {
  width: 100%; padding: 10px 12px; font-size: 15px;
  border: 1px solid #d9d9d9; border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: #1f6feb; outline: none; }

.btn {
  display: inline-block; border: none; border-radius: 8px;
  padding: 11px 20px; font-size: 15px; cursor: pointer;
  background: #1f6feb; color: #fff; text-decoration: none; text-align: center;
}
.btn:hover { background: #1a5fd0; }
.btn-block { display: block; width: 100%; margin-top: 14px; }
.btn-secondary { background: #f0f0f0; color: #333; }
.btn-secondary:hover { background: #e2e2e2; }
.btn-danger { background: #ff4d4f; }
.btn-danger:hover { background: #d9363e; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.error-box {
  display: none; background: #fff1f0; border: 1px solid #ffccc7;
  color: #cf1322; border-radius: 8px; padding: 10px 12px;
  margin-bottom: 12px; font-size: 14px;
}
.hint { font-size: 13px; color: #999; }

/* ---------- 状态标签 ---------- */
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-draft       { background: #f0f0f0; color: #666; }
.tag-pending_mgr { background: #fff7e6; color: #d48806; }
.tag-pending_fin { background: #e6f4ff; color: #0958d9; }
.tag-archived    { background: #f6ffed; color: #389e0d; }
.tag-rejected    { background: #fff1f0; color: #cf1322; }
.tag-voided      { background: #f0f0f0; color: #999; text-decoration: line-through; }
.tag-warn        { background: #fff7e6; color: #d46b08; }

/* ---------- 列表（手机卡片式） ---------- */
.bill-card {
  background: #fff; border-radius: 10px; padding: 14px;
  margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: block; text-decoration: none; color: inherit;
}
.bill-card .row1 { display: flex; justify-content: space-between; align-items: center; }
.bill-card .amount { font-size: 18px; font-weight: 700; color: #1f6feb; }
.bill-card .meta { font-size: 13px; color: #888; margin-top: 6px; }

table.grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.grid th, table.grid td { border: 1px solid #eee; padding: 8px 10px; text-align: left; }
table.grid th { background: #f7f9fc; }

/* ---------- 图片画廊 ---------- */
/* 照片墙：手机每行 2 张、电脑每行 4 张（2026-08-08 迭代17） */
.photo-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.photo-wall img {
  width: 100%; border-radius: 6px; cursor: zoom-in; object-fit: cover;
  aspect-ratio: 3/4; background: #eee;
}

/* ---------- 电脑宽屏 ---------- */
@media (min-width: 768px) {
  .container { max-width: 1100px; padding: 20px; }
  .container-narrow { max-width: 640px; margin: 0 auto; }
  .review-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
  .photo-wall { grid-template-columns: repeat(4, 1fr); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
}
