/* Time Tracking & Payroll — single clean theme. Mobile-first. No external assets. */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #6b7a8d;
  --line: #dfe6ee;
  --brand: #1d6f42;          /* deep green */
  --brand-dark: #155c35;
  --accent: #b7791f;         /* amber for warnings */
  --danger: #b3261e;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--brand); }
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; }
.userbox { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.userbox em { color: #b9c4d0; font-style: normal; font-size: 0.8rem; }
.mainnav {
  background: var(--brand);
  padding: 0.35rem 0.6rem;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.mainnav a {
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.92rem;
  white-space: nowrap;
}
.mainnav a:hover { background: rgba(255,255,255,0.15); }
.mainnav a.active { background: var(--brand-dark); font-weight: 600; }
.badge {
  background: #ffd54d;
  color: #4d3800;
  border-radius: 999px;
  padding: 0 0.45em;
  font-size: 0.78em;
  font-weight: 700;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.card h2, .card h3 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
/* flash messages */
.flash { border-radius: 8px; padding: 0.7rem 0.9rem; margin-bottom: 1rem; }
.flash.ok { background: #e6f4ea; border: 1px solid #a3d9b1; }
.flash.warn { background: #fff8e1; border: 1px solid #f0d27a; }
.flash.err { background: #fdecea; border: 1px solid #f5a9a3; }
/* forms */
label { display: block; margin: 0.6rem 0 0.25rem; font-weight: 600; font-size: 0.92rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%;
  max-width: 26rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 1rem;
  background: #fff;
}
textarea { min-height: 4.5rem; }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; }
.formrow { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.formrow > div { flex: 1 1 12rem; }
/* buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.8rem;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.85rem; margin-top: 0; }
.btn.warn { background: var(--accent); }
.btn.danger { background: var(--danger); }
.btn.ghost { background: #e8edf2; color: var(--ink); }
.btn.big { font-size: 1.35rem; padding: 1.1rem 2rem; width: 100%; max-width: 26rem; }
/* tables */
table.grid { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
table.grid th, table.grid td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
table.grid th { background: #eef2f6; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.tablewrap { overflow-x: auto; }
tr.flagged { background: #fff8e1; }
.pill {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e8edf2;
}
.pill.review { background: #ffe9a8; color: #6b4e00; }
.pill.ok { background: #d9efe0; color: #155c35; }
.pill.closed { background: #dfe3e8; color: #4b5563; }
/* dashboard tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.8rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.tile .num { font-size: 1.7rem; font-weight: 700; }
.tile .lbl { color: var(--muted); font-size: 0.85rem; }
/* clock page */
.clockstatus { text-align: center; padding: 1.5rem 1rem; }
.clockstatus .big { font-size: 1.1rem; margin-bottom: 1rem; }
/* login */
.loginwrap { max-width: 24rem; margin: 4rem auto; }
/* print: payroll report */
@media print {
  .topbar, .mainnav, .noprint { display: none !important; }
  .wrap { max-width: none; }
  body { background: #fff; }
  .card { border: 0; }
}
