:root {
  --navy: #16324f;
  --navy-2: #1f4568;
  --teal: #0f766e;
  --teal-dark: #0b5e57;
  --ink: #1c2733;
  --muted: #5d6b7a;
  --line: #dbe2e8;
  --bg: #f2f4f6;
  --card: #ffffff;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Noto Sans Myanmar", "Myanmar Text", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-size: 13px; opacity: .85; }
.link-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.55);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  min-height: 40px;
}
main { max-width: 640px; margin: 0 auto; padding: 14px 14px 28px; }
.view.hidden, .hidden { display: none !important; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card h2, .card h3 { margin: 0 0 10px; font-size: 17px; }
.today-date { font-size: 20px; font-weight: 700; }
.today-hours { font-size: 15px; margin-top: 2px; }
.today-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--red); font-size: 14px; }
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.staff-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 8px;
  font-size: 15px;
  cursor: pointer;
  min-height: 52px;
  text-align: center;
}
.staff-btn .role { display: block; font-size: 12px; color: var(--muted); }
.staff-btn.selected { border-color: var(--teal); background: #eefaf8; font-weight: 700; }
.staff-btn.done { border-color: var(--green); }
.actions { display: flex; gap: 10px; margin: 4px 0 12px; }
.btn {
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  min-height: 52px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--teal); color: #fff; flex: 1; }
.btn-primary:active { background: var(--teal-dark); }
.btn-secondary { background: #e4ebf0; color: var(--ink); flex: 1; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); width: 100%; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field span { font-size: 13px; color: var(--muted); }
.field input {
  font-size: 16px;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row .grow { flex: 1; min-width: 140px; }
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 40px;
}
.tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
}
.badge-present { background: #dcfce7; color: var(--green); }
.badge-late { background: #fef3c7; color: var(--amber); }
.badge-half_day { background: #fee2e2; color: var(--red); }
.badge-leave { background: #e0e7ff; color: #3730a3; }
.geo-locating { color: var(--muted); }
.geo-error h3 { color: var(--red); }
.geo-error p { margin: 6px 0; font-size: 14px; }
.result-ok { border-left: 5px solid var(--green); }
.result-late { border-left: 5px solid var(--amber); }
.result-half { border-left: 5px solid var(--red); }
.result-big { font-size: 20px; font-weight: 700; margin: 2px 0 6px; }
.staff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.staff-row:last-child { border-bottom: none; }
.mini-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  min-height: 38px;
}
.rota-day { margin-bottom: 14px; }
.rota-day h4 { margin: 0 0 6px; font-size: 15px; }
.rota-day label { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 15px; }
.rota-day input[type="checkbox"] { width: 20px; height: 20px; }
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0 26px; }
