/* ===================== 拼豆扫码计时系统 - 公共样式 ===================== */
:root {
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #2b2b2b;
  --muted: #8a8a8a;
  --line: #e6e1d6;
  --brand: #ff7a59;      /* 拼豆暖橙 */
  --brand-dark: #e85f3d;
  --green: #38b48b;
  --blue: #4a90d9;
  --amber: #f0a830;
  --red: #e54d42;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: transform .06s ease, background .2s ease, opacity .2s ease;
}
button:active { transform: scale(0.96); }
button:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #f1ede4; color: var(--ink); }
.btn-ghost:hover { background: #e7e1d4; }
.btn-danger { background: #fdecea; color: var(--red); }
.btn-danger:hover { background: #fbd9d5; }

input, select {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus, select:focus { border-color: var(--brand); }

/* ---------- 状态码色 ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.idle    { color: var(--muted); background: #efedf3; }
.status.running { color: var(--green); background: #e3f5ee; }
.status.paused  { color: var(--amber); background: #fdf3e0; }
.status.finished{ color: var(--red); background: #fdecea; }

.hidden { display: none !important; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal {
  background: #fff; border-radius: var(--radius); padding: 24px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow); max-height: 90vh; overflow: auto;
}
.modal h3 { margin: 0 0 16px; font-size: 18px; }

/* 打印专用样式 */
@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; left: 0; top: 0; width: 100%; text-align: center; }
  .no-print { display: none !important; }
}
