:root {
  --navy: #1f4e79;
  --navy-soft: #d6e3f0;
  --green: #e2efda;
  --ink: #1d2433;
  --muted: #5b6573;
  --line: #d5dde6;
  --bg: #f4f7fb;
  --card: #ffffff;
  --danger: #9b1c1c;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom)); }

.screen { max-width: 920px; margin: 0 auto; }
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(31, 78, 121, 0.08);
}
.login-card { margin-top: 12vh; }
.eyebrow { color: var(--navy); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; margin: 0 0 6px; }
h1 { margin: 0 0 8px; font-size: 28px; color: var(--navy); }
h2, h3 { margin: 0; color: var(--navy); }
.lede, label { color: var(--muted); }
.lede { margin: 0 0 20px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  width: 100%;
}
textarea { resize: vertical; }
button {
  border: 0;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 700;
  border-radius: 12px;
  padding: 13px 16px;
  width: 100%;
  cursor: pointer;
}
button.ghost {
  background: transparent;
  color: var(--navy);
  width: auto;
  padding: 8px 12px;
}
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 8px 0 16px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  flex: 1;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy-soft);
}
.tab.active { background: var(--navy); color: #fff; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wide { grid-column: 1 / -1; }
.error { color: var(--danger); font-size: 14px; }
.ok { color: #216e39; font-size: 14px; }

.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.total-hours {
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  margin: 0 0 12px;
}
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow { font-size: 11px; font-weight: 700; color: var(--navy); text-align: center; padding-bottom: 4px; }
.day {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: #fafcfe;
}
.day.empty { background: transparent; border-color: transparent; }
.day-num { font-size: 12px; font-weight: 700; color: var(--navy); }
.event { font-size: 11px; line-height: 1.3; margin-top: 4px; color: var(--navy); }
.entry-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.entry-row:last-child { border-bottom: 0; }
.muted { color: var(--muted); font-size: 13px; }
.delete { background: #fff; color: var(--danger); border: 1px solid #f0c2c2; width: auto; padding: 8px 10px; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .day { min-height: 76px; }
  h1 { font-size: 24px; }
}
