:root {
  --navy: #162951;
  --ink: #1c2733;
  --muted: #6b7684;
  --line: #e3e7ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --ok: #157347;
  --warn-bg: #fff4e0;
  --notice-bg: #eef3fb;
  --err: #b3261e;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.55;
}
.topbar {
  background: var(--navy); color: #fff; padding: 14px 18px 12px;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 600; letter-spacing: .22em; font-size: 15px; }
.brand .star { letter-spacing: 0; }
.topbar-sub { font-size: 12px; opacity: .75; letter-spacing: .3em; margin-top: 2px; }
main { max-width: 560px; margin: 0 auto; padding: 16px 14px 40px; }
h1 { font-size: 21px; margin: 6px 0 8px; font-weight: 600; }
h2 { font-size: 16px; margin: 22px 0 10px; font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.hint.center { text-align: center; }
.hidden { display: none !important; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin: 12px 0;
}
.card.warn { background: var(--warn-bg); border-color: #f0d9a8; }
.card.notice { background: var(--notice-bg); border-color: #cfddf2; }
.card-title { font-weight: 600; margin: 0 0 8px; font-size: 15px; }
.roster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.roster button {
  padding: 18px 10px; font-size: 17px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; font-weight: 500;
}
.roster button:active { background: var(--notice-bg); }
.pin-input {
  width: 100%; padding: 12px; font-size: 18px; letter-spacing: .4em; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; margin: 8px 0;
}
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 10px 16px; font-size: 15px; cursor: pointer;
}
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.punch {
  width: 100%; padding: 22px; font-size: 21px; font-weight: 600; border-radius: 14px;
  background: var(--navy); color: #fff; border: none; margin-top: 10px;
}
.btn.punch.out { background: #e07b24; }
.btn.punch:disabled { opacity: .55; }
.hello-row { display: flex; justify-content: space-between; align-items: center; }
.punch-card { text-align: center; }
.punch-state { font-size: 17px; font-weight: 500; padding: 6px 0 2px; white-space: pre-line; }
.assign-body { font-size: 15px; white-space: pre-line; }
.assign-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.assign-item:last-child { border-bottom: none; }
.assign-item .d { font-weight: 600; }
.assign-item .loc { font-size: 16px; margin: 2px 0; }
.assign-item .addr, .assign-item .note { color: var(--muted); font-size: 14px; white-space: pre-line; }
.tabbar { display: flex; gap: 8px; margin: 16px 0 4px; }
.tabbar .tab {
  flex: 1; padding: 11px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 15px; cursor: pointer;
}
.tabbar .tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg { display: flex; gap: 6px; margin: 10px 0; }
.seg-btn {
  flex: 1; padding: 9px 4px; font-size: 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: #fff;
}
.seg-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.fld { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
.fld input, .fld textarea, input[type="date"], input[type="time"] {
  width: 100%; padding: 11px; font-size: 16px; margin-top: 5px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff;
}
.row { display: flex; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.err { color: var(--err); font-size: 14px; min-height: 18px; margin: 4px 0; }
.ok-msg { color: var(--ok); font-size: 14px; min-height: 18px; margin: 6px 0 0; }
.req-item { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.req-item:last-child { border-bottom: none; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px; margin-left: 6px;
  background: var(--notice-bg); color: var(--navy);
}
.badge.pending { background: #fff4e0; color: #8a6100; }
.badge.approved { background: #e3f2e8; color: var(--ok); }
.badge.rejected { background: #fbe9e7; color: var(--err); }
.badge.src { background: #eceff3; color: var(--muted); }
.week-label { font-weight: 600; font-size: 15px; }
.day-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.day-row:last-child { border-bottom: none; }
.day-row .d { color: var(--muted); font-size: 14px; }
.day-row.total { font-weight: 700; }
.day-detail { font-size: 13px; color: var(--muted); padding: 0 0 6px; white-space: pre-line; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #222d3a; color: #fff; padding: 11px 18px; border-radius: 24px;
  font-size: 14px; z-index: 50; max-width: 88vw; text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
