:root {
  --bg: #faf8f4;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2f6b4f;
  --danger: #b94a3a;
  --line: #e7e3da;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  padding: 16px 18px 8px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; flex: 1; }
.signout {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.content {
  padding: 8px 14px 92px;
  max-width: 640px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  margin: 12px 0;
  box-shadow: 0 1px 0 var(--line);
}
.card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.note {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}
.empty {
  color: var(--muted);
  margin: 4px 0 0;
}

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.checklist form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.check {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex: none;
  color: var(--accent);
}
.checklist li.done .check {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Reference list */
.reflist { list-style: disc; padding-left: 22px; margin: 6px 0 0; }
.reflist li { padding: 4px 0; }
.routine-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.routine-item span { flex: 1; }
.at {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13px;
  margin-right: 6px;
}

/* Drag-to-reorder */
.sortable-ghost { opacity: 0.4; background: #f0ece5; }
[data-reorder-url] > li,
[data-reorder-url] > .card { cursor: grab; touch-action: pan-y; }
[data-reorder-url] > .sortable-drag { cursor: grabbing; }

.rolled {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff3d6;
  color: #8a6300;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}
.self-added {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e5edff;
  color: #2d4a8a;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}
.thread {
  list-style: none;
  padding: 8px 0 0 38px;
  margin: 6px 0 0;
  border-top: 1px dashed var(--line);
}
.thread .comment {
  padding: 6px 0;
  font-size: 14px;
  border: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.comment-text { flex: 1; min-width: 0; }
.comment-text.editable { cursor: pointer; }
.comment-edit-inline {
  flex: 1;
  display: flex;
  gap: 6px;
  margin: 0;
}
.comment-edit-inline input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
.comment-edit-inline button {
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 13px;
}
.comment-del-form { margin: 0; }
.del-comment {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.del-comment:hover { color: var(--danger); }
.thread .who {
  font-weight: 700;
  margin-right: 6px;
}
.thread .c-r .who { color: var(--accent); }
.thread .c-j .who { color: #2d4a8a; }
.tomorrow-divider {
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tomorrow-divider:empty {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.tomorrow-block {
  background: #faf8f4;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;
}
.tomorrow-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.tomorrow-block .reflist { color: var(--muted); }

.add-task {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.add-task input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}
.add-task button {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  font-size: 18px;
}
.attach[data-attached="true"] {
  background: #e8f1ec;
  border-color: var(--accent);
  width: auto;
  padding: 0 10px;
}
.attach[data-attached="true"] .attach-icon {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}
.task-photo {
  display: block;
  margin: 8px 0 0 38px;
  max-width: calc(100% - 38px);
  border-radius: 10px;
}
.manual-add {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manual-add input[type="text"],
.manual-add textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  font-family: inherit;
}
.form-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}
.dinner-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.dinner-edit input[type="text"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}
.step-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.step-row {
  display: flex;
  gap: 6px;
}
.step-row input,
.step-row textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  font-family: inherit;
  resize: none;
  line-height: 1.4;
  overflow: hidden;
}
.del-step {
  width: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.add-step-btn {
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.attach-full {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}
.attach-full[data-attached="true"] {
  background: #e8f1ec;
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent);
}

/* Row with main action + delete button (low stock) */
.row-with-action {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-main { flex: 1; margin: 0; }
.row-delete { margin: 0; }
.row-delete .del {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

/* Manual manage list (admin) */
.manual-manage { list-style: none; padding: 0; margin: 0; }
.manual-manage-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.manual-manage-row:last-child { border-bottom: 0; }
.manual-manage-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}
.manual-manage-thumb.empty {
  background: #f0ece5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.manual-manage-body { flex: 1; min-width: 0; }
.manual-manage-title { font-weight: 600; font-size: 15px; }
.manual-manage-text {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.manual-manage-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: none;
}

/* Current photo on manual edit page */
.current-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.current-photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.current-photo-item img { display: block; width: 100%; height: 110px; object-fit: cover; }
.remove-photo-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255,255,255,0.92);
}
.remove-photo-toggle input { width: 18px; height: 18px; accent-color: var(--danger); }

/* Comments */
.comments {
  margin-top: 6px;
  padding-left: 38px;
}
.comments summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
}
.comment {
  padding: 6px 0;
  font-size: 14px;
}
.comment-form {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.comment-form input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
}
.comment-form button {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 600;
}

/* Add forms */
.add, .search { display: flex; gap: 8px; margin: 0; }
.add input, .search input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
}
.add button {
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 600;
}

/* Clock big buttons */
.big {
  width: 100%;
  padding: 22px;
  font-size: 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  color: white;
}
.big.primary { background: var(--accent); }
.big.danger  { background: var(--danger); }

/* Login */
.login {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
}
.login label { color: var(--muted); font-size: 14px; }
.login input {
  font-size: 28px;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.login button {
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 17px;
}

/* Flash */
.flashes { list-style: none; padding: 0; margin: 0 0 8px; }
.flash {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  margin: 6px 0;
}
.flash-error { background: #fbe7e3; color: var(--danger); }
.flash-ok { background: #dff3e6; color: #1f6b3f; }

/* Manual photo */
.manual-photo {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
}

/* This-week list */
.week-list { list-style: none; padding: 0; margin: 0; }
.day-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.day-row:last-child { border-bottom: 0; }
.day-label {
  font-weight: 600;
  min-width: 90px;
}
.day-display {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-variant-numeric: tabular-nums;
}
.day-display .time { font-weight: 500; }
.arrow { color: var(--muted); font-size: 14px; }
.edit-link {
  margin-left: auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}
.day-edit {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}
.day-edit input[type="text"] {
  flex: 1;
  min-width: 70px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
}
.save {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.del {
  width: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

/* Past-weeks history */
.past-week {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.past-week:last-child { border-bottom: 0; }
.past-week summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
  list-style: none;
}
.past-week summary::-webkit-details-marker { display: none; }
.past-label { flex: 1; font-weight: 500; }
.past-total { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.past-entries {
  list-style: none;
  padding: 6px 0 6px 0;
  margin: 0;
  font-size: 14px;
}
.past-entries li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--muted);
}
.past-day { font-weight: 500; }
.past-time { font-variant-numeric: tabular-nums; }
.past-approve { margin-top: 8px; }
.past-approve button { width: 100%; }

/* Week header + total + approval badge */
.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.week-header h2 { margin: 0; }
.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-pending {
  background: #fff3d6;
  color: #8a6300;
  border: 1px solid #f1d98a;
}
.badge-ok {
  background: #dff3e6;
  color: #1f6b3f;
  border: 1px solid #aedfbf;
}
.week-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.week-total strong { font-size: 18px; font-variant-numeric: tabular-nums; }

/* Add another day */
.add-prev {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 0;
  list-style: none;
}
.add-prev::-webkit-details-marker { display: none; }
.add-days-form { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.missing-day {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.missing-day:last-of-type { border-bottom: 0; }
.missing-day input[type="checkbox"] {
  width: 22px; height: 22px;
  accent-color: var(--accent);
}
.missing-day .day-name {
  font-weight: 600;
  min-width: 90px;
}
.missing-day input[type="text"] {
  flex: 1;
  min-width: 70px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
}

/* AI dinner editor */
.ai-dinner { background: linear-gradient(135deg, #fefcf8, #f4f1ea); }
.ai-form { display: flex; flex-direction: column; gap: 10px; }
.ai-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: white;
  font-family: inherit;
  resize: vertical;
}

/* Menu (weekly dinners) */
.menu-day.menu-today { border-left: 3px solid var(--accent); }
.menu-day-head { display: flex; align-items: center; justify-content: space-between; }
.menu-day-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.menu-title {
  font-weight: 600;
  color: var(--accent);
  font-size: 16px;
  margin: 4px 0 6px;
}
.menu-section-2 {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

/* Admin dashboard — week history */
.day-history {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.day-history:last-child { border-bottom: 0; }
.day-history-label {
  font-size: 15px;
  color: var(--ink);
  margin: 0 0 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.today-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.history-list { list-style: none; padding: 0; margin: 0; }
.history-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.history-item:last-child { border-bottom: 0; }
.history-item.done .history-text { color: var(--muted); text-decoration: line-through; }
.history-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent);
  margin-top: 2px;
}
.history-item.done .history-check {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.history-body { flex: 1; min-width: 0; }
.history-text { font-size: 16px; }
.empty-day { color: var(--muted); font-size: 14px; margin: 0; font-style: italic; }

/* Admin dashboard */
.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: white; }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}
.thread-block {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.thread-block:last-child { border-bottom: 0; }
.thread-source {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.thread-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: #e8f1ec;
  padding: 2px 8px;
  border-radius: 999px;
}
.thread-text {
  font-size: 14px;
  color: var(--ink);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thread-block .thread { padding-left: 0; }

/* Sitters page */
.payment-reminder {
  background: #fff3d6;
  color: #8a6300;
  border: 1px solid #f1d98a;
  text-align: center;
}
.sitter-card.is-paid { opacity: 0.7; }
.sitter-card.unpaid {
  border-left: 4px solid var(--danger);
  background: #fef6f4;
}
.sitter-card.unpaid h2 { color: var(--danger); }
.sitter-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.sitter-card-head h2 { margin: 0; }
.rate-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8f1ec;
  color: var(--accent);
}
.sitter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.sitter-form input[type="number"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.three-day-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.three-day-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.three-day-grid input { width: 100%; text-align: center; }
.scarlet-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 16px;
}
.scarlet-toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.sitter-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.sitter-summary strong { font-size: 18px; }
.paid-form { margin-top: 12px; }
.paid-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.paid-btn.is-paid {
  background: var(--accent);
  color: white;
}

/* Past weeks (sitters) */
.past-sitter-week {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.past-sitter-week:last-child { border-bottom: 0; }
.past-sitter-week summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  font-weight: 500;
}
.past-sitter-week summary::-webkit-details-marker { display: none; }
.past-sitter-week.unpaid summary {
  color: var(--danger);
  font-weight: 700;
}
.past-unpaid {
  font-weight: 700;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}
.past-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.past-worker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.past-worker.unpaid { color: var(--danger); }
.paid-btn-small {
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}
.paid-btn-small.is-paid {
  background: var(--accent);
  color: white;
}

/* Inline editing within past-week details */
.past-worker { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.past-worker:last-child { border-bottom: 0; }
.past-worker-line {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.past-worker-line > strong { font-size: 15px; }
.inline-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.inline-edit input[type="text"] {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  font-variant-numeric: tabular-nums;
  width: 70px;
}
.inline-edit .three-day-grid { width: 100%; }
.inline-edit .three-day-grid input { width: 100%; }
.past-worker-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}
.save-mini {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.scarlet-toggle-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.scarlet-toggle-mini input { width: 18px; height: 18px; accent-color: var(--accent); }
.past-worker .muted { color: var(--muted); font-size: 13px; }

/* Bottom tab bar — scrolls horizontally if it overflows */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  gap: 2px;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar a {
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 8px;
  text-align: center;
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 52px;
  border-radius: 8px;
}
.tabbar a.active {
  color: var(--accent);
  font-weight: 700;
  background: rgba(47,107,79,0.08);
}
