:root {
  --matcha: #698668; --sage: #CED6C4; --pink: #EAE2DF; --cream: #F8F7F1;
  --ink: #2b2f2a; --muted: #6b716a; --danger: #a5533f; --white: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 16px; }
body { min-height: 100vh; display: flex; flex-direction: column; }
header { padding: 18px 20px 6px; display: flex; align-items: baseline; justify-content: space-between; }
header h1 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 22px; margin: 0; color: var(--matcha); letter-spacing: .5px; }
header .who { color: var(--muted); font-size: 14px; }
main { flex: 1; padding: 8px 16px 90px; max-width: 560px; width: 100%; margin: 0 auto; }
.card { background: var(--white); border-radius: 16px; padding: 18px; margin: 12px 0; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.status { text-align: center; padding: 6px 0 14px; }
.status .big { font-size: 40px; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -1px; }
.status .sub { color: var(--muted); margin-top: 4px; }
.clock-btn { display: block; width: 100%; padding: 22px; border: 0; border-radius: 14px; font-size: 22px; font-weight: 600;
  color: var(--white); background: var(--matcha); cursor: pointer; }
.clock-btn.out { background: var(--danger); }
.clock-btn:active { transform: scale(.99); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--sage); border-radius: 10px; font-size: 16px; background: var(--white); color: var(--ink); }
input:focus { outline: 2px solid var(--matcha); border-color: transparent; }
button.secondary { background: var(--pink); color: var(--ink); border: 0; padding: 10px 14px; border-radius: 10px; font-size: 15px; cursor: pointer; }
button.primary { background: var(--matcha); color: var(--white); border: 0; padding: 12px 16px; border-radius: 10px; font-size: 16px; cursor: pointer; }
button.link, a.link { display: inline-block; background: none; border: 0; color: var(--matcha); font-size: 14px; padding: 6px 0; cursor: pointer; text-decoration: underline; font-family: inherit; }
button.danger { background: none; border: 0; color: var(--danger); font-size: 14px; cursor: pointer; }
.totals { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.totals .hours { font-size: 26px; font-weight: 600; }
.totals .money { font-size: 22px; color: var(--matcha); font-weight: 600; }
.range { color: var(--muted); font-size: 14px; }
.shift { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--pink); cursor: pointer; }
.shift:last-child { border-bottom: 0; }
.shift .day { font-weight: 600; }
.shift .times { color: var(--muted); font-size: 14px; }
.shift .note { color: var(--muted); font-size: 13px; font-style: italic; }
.shift .hrs { font-variant-numeric: tabular-nums; font-weight: 600; }
.shift.open .hrs { color: var(--matcha); }
.warn { background: var(--pink); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.ok { background: var(--sage); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.err { color: var(--danger); font-size: 14px; margin: 8px 0; min-height: 1em; }
.editor { background: var(--cream); border-radius: 12px; padding: 12px; margin: 8px 0; }
/* Terms set on the server: shown, not editable. */
.terms { background: var(--cream); border-radius: 12px; padding: 12px; margin: 10px 0 16px; }
.terms .term { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 4px 0; font-size: 14px; }
.terms .term strong { text-align: right; }
.editor .actions { display: flex; justify-content: space-between; margin-top: 12px; align-items: center; }
.period-row { padding: 12px 0; border-bottom: 1px solid var(--pink); }
.period-row:last-child { border-bottom: 0; }
.period-row .top { display: flex; justify-content: space-between; font-weight: 600; }
.period-row .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.period-row .acts { margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
pre.mail { white-space: pre-wrap; font-family: Menlo, Consolas, monospace; font-size: 12px; background: var(--cream); padding: 12px; border-radius: 10px; overflow-x: auto; }
nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--sage); display: flex; justify-content: space-around; padding: 8px 0 max(10px, env(safe-area-inset-bottom)); }
nav button { background: none; border: 0; font-size: 14px; color: var(--muted); padding: 6px 12px; cursor: pointer; }
nav button.active { color: var(--matcha); font-weight: 600; }
.login { max-width: 360px; margin: 80px auto; text-align: center; }
.login h1 { font-family: Georgia, serif; font-weight: normal; color: var(--matcha); }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
[hidden] { display: none !important; }
