:root {
  --navy: #0a2342; --navy-2: #123b66; --orange: #f97316; --orange-2: #ffb143;
  --card: #14304f; --text: #eef3f9; --muted: #9db2c9;
}
* { box-sizing: border-box; margin: 0; }
body {
  font: 15px/1.5 -apple-system, "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(160deg, var(--navy-2), var(--navy) 60%);
  min-height: 100vh; color: var(--text);
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 10px; }
h1 { font-size: 20px; font-weight: 600; }
h1 span { color: var(--orange); font-weight: 800; letter-spacing: 2px; }
main { max-width: 760px; margin: 24px auto; padding: 0 16px; display: grid; gap: 16px; }
.card { background: var(--card); border-radius: 14px; padding: 18px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
h2 { font-size: 16px; font-weight: 600; }
.summary { color: var(--muted); font-variant-numeric: tabular-nums; }
.entry {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid rgba(255,255,255,.07);
}
.entry-date { font-weight: 600; }
.entry-job { color: var(--muted); font-size: 13px; }
.entry-notes { color: var(--muted); font-size: 12px; margin-top: 2px; }
.entry-times { text-align: right; font-variant-numeric: tabular-nums; }
.entry-hours { color: var(--orange-2); font-weight: 600; }
.status {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: #0e2740; border: 1px solid rgba(255,255,255,.25); border-radius: 10px;
  color: var(--text); padding: 10px 18px; z-index: 50; max-width: 90vw;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.muted { color: var(--muted); }
button.primary {
  background: var(--orange); color: #fff; border: 0; border-radius: 8px;
  padding: 7px 14px; font-weight: 600; cursor: pointer;
}
button.primary:hover { background: var(--orange-2); }

/* Clock card */
.clock-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.clock-live { color: #ff5a5a; font-weight: 700; letter-spacing: 1px; font-size: 13px; }
.clock-right { display: flex; align-items: center; gap: 14px; }
.clock-elapsed { font-size: 26px; font-weight: 700; color: var(--orange-2); font-variant-numeric: tabular-nums; }
select, input, textarea {
  background: #0e2740; color: var(--text); border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%;
}
.clock-row select { flex: 1; }
.entry.clickable { cursor: pointer; }
.entry.clickable:hover { background: rgba(255,255,255,.04); }

/* Dialog */
dialog {
  background: var(--card); color: var(--text); border: 0; border-radius: 16px;
  padding: 22px; width: min(440px, 92vw); box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
dialog::backdrop { background: rgba(4, 12, 24, .7); }
dialog h2 { margin-bottom: 14px; }
dialog label { display: block; margin: 10px 0; font-size: 13px; color: var(--muted); }
dialog label input, dialog label select, dialog label textarea { margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; flex-direction: column; gap: 6px; justify-content: end; }
.checks input { width: auto; }
.dialog-buttons { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.spacer { flex: 1; }
button { font: inherit; cursor: pointer; }
button:not(.primary):not(.danger) {
  background: transparent; color: var(--muted); border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px; padding: 7px 14px;
}
button.danger { background: #b3261e; color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; }

/* Jobs card */
.btn-row { display: flex; gap: 8px; }
.job-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-top: 1px solid rgba(255,255,255,.07);
}
.job-row .job-name { font-weight: 600; }
.job-row .job-meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.job-row button { font-size: 13px; padding: 5px 10px; }
.job-row.selected { background: rgba(249,115,22,.12); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.job-name.link { cursor: pointer; }
.job-name.link:hover { color: var(--orange-2); }
.head-left { display: flex; align-items: center; gap: 12px; }
