:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6ea;
  --text: #1f2329;
  --muted: #7a828e;
  --brand: #2f6fed;
  --brand-dark: #2559c4;
  --ok: #1d9e75;
  --warn: #d98b0b;
  --danger: #d0453b;
  --radius: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding-bottom: 30px;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 14px; }

header.bar {
  background: var(--brand);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
header.bar h1 { font-size: 17px; margin: 0; font-weight: 600; }
header.bar .who { font-size: 13px; opacity: .9; }
header.bar button {
  background: rgba(255, 255, 255, .18);
  border: 0;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
}

h2.sec { font-size: 15px; margin: 0 0 10px; font-weight: 600; }

label.f { display: block; margin: 10px 0 5px; font-size: 13px; color: var(--muted); }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], select, textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #c9dbff; border-color: var(--brand); }
textarea { min-height: 68px; resize: vertical; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

button.primary {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  font-family: inherit;
}
button.primary:active { background: var(--brand-dark); }
button.primary:disabled { background: #a9bde8; cursor: default; }

button.mini {
  background: #fff;
  border: 1px solid var(--brand);
  color: var(--brand);
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
button.mini:disabled { border-color: #c8cdd4; color: #a3a9b1; cursor: default; }

.tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.tabs button {
  flex: 1;
  min-width: 88px;
  padding: 9px 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th, table.list td {
  border-bottom: 1px solid var(--line);
  padding: 9px 6px;
  text-align: left;
  vertical-align: top;
}
table.list th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
table.list tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}
.tag.待审核 { background: #fff3d6; color: #8a5a00; }
.tag.已入账 { background: #e3f6ee; color: #0f6e56; }
.tag.已驳回 { background: #fde8e6; color: #a32d2d; }
.tag.作废   { background: #eceef1; color: #6b7280; }
.tag.已完成 { background: #e3f6ee; color: #0f6e56; }
.tag.未完成 { background: #fff3d6; color: #8a5a00; }
.tag.售后中 { background: #e8f0fe; color: #185fa5; }

.note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.err { color: var(--danger); font-size: 13.5px; margin-top: 8px; display: none; }
.empty { text-align: center; color: var(--muted); padding: 26px 0; font-size: 14px; }

.login { max-width: 380px; margin: 60px auto; }
.login h1 { font-size: 21px; text-align: center; margin-bottom: 6px; }
.login .sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }

.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat div {
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 12px; color: var(--muted); }
