/* 色票：九皇爷诞的黄旗 + 墨黑；红 = 未付款，绿 = 已付款/完成 */
:root {
  --ink: #1b1a17;
  --muted: #6c695f;
  --bg: #f4f4f0;
  --card: #ffffff;
  --line: #e1dfd6;
  --yellow: #f5c400;
  --yellow-soft: #fff4bf;
  --yellow-ink: #3b2f00;
  --red: #d42a3c;
  --red-soft: #fde6e8;
  --green: #1d8a4b;
  --green-soft: #dff3e6;
  --blue: #2b6cb0;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.hidden { display: none !important; }

.btn { white-space: nowrap; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 14px; font-weight: 600; min-height: 44px; }
.btn:active { transform: translateY(1px); }
a.btn { color: var(--ink); }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--red); border-color: var(--red-soft); background: var(--red-soft); }
.btn.sm { min-height: 34px; padding: 6px 10px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 600; }
input[type=text], input[type=number], input[type=password], select, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; width: 100%;
}
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.pill.paid { background: var(--green-soft); color: var(--green); }
.pill.unpaid { background: var(--red-soft); color: var(--red); }
.pill.neutral { background: #eceae2; color: var(--muted); }

.overlay { position: fixed; inset: 0; background: rgba(20,18,10,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.overlay.center { align-items: center; padding: 16px; }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.overlay.center .sheet { border-radius: 20px; padding-bottom: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 99; max-width: 90vw; font-size: 14px; }

/* 员工导航 */
.staffbar { background: var(--ink); color: #fff; display: flex; align-items: center; gap: 4px; padding: 6px 12px; flex-wrap: wrap; }
.staffbar strong { margin-right: 10px; color: var(--yellow); }
.staffbar a { color: #ddd; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.staffbar a.on { background: var(--yellow); color: var(--yellow-ink); }
.staffbar .sp { flex: 1; }
