/* Capewide Construction - portal styles.
   Built for a phone in bright sun, held by someone wearing gloves.
   That means: big type, big targets, high contrast, no thin grey text. */

:root {
  --red:  #CE1126;
  --blue: #1F4E9C;
  --ink:  #14181F;
  --muted: #55606E;
  --line: #D6DBE2;
  --bg:   #F4F6F9;
  --ok:   #15803D;
  --warn: #B45309;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

/* ---------- worker topbar (form only) ---------- */
.topbar {
  background: var(--blue);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { font-weight: 800; letter-spacing: .02em; font-size: 18px; }
.brand span { color: #FFD9DE; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 96px; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 18px 16px 80px; }

/* ---------- office shell: sidebar + content ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 0 16px;
}
.side-brand { padding: 0 20px 24px; }
.side-logo {
  font-weight: 800; font-size: 21px; letter-spacing: .04em; line-height: 1;
}
.side-sub {
  color: #FFD9DE; font-weight: 700; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; margin-top: 4px;
}

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.nav-item {
  display: block;
  padding: 12px 14px;
  color: #D8E3F5;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border-radius: 9px;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-left-color: var(--red);
}
/* Settings + who's signed in, pinned to the bottom of the sidebar. */
.side-foot {
  margin-top: auto;
  padding: 12px 12px 0;
  border-top: 1px solid rgba(255,255,255,.15);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 4px;
}
.side-avatar {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.side-who { min-width: 0; }
.side-name {
  font-weight: 700; font-size: 14px; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-signout {
  color: #A9C0E2; font-size: 13px; font-weight: 600; text-decoration: none;
}
.side-signout:hover { color: #fff; text-decoration: underline; }

/* ---------- settings ---------- */
.settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
  margin-bottom: 16px;
}
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.readonly {
  padding: 12px 14px;
  background: #EEF1F5;
  border-radius: 10px;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--muted);
}
.login-note {
  text-align: center; color: var(--muted); font-size: 14px;
  margin-top: 18px; padding: 0 8px;
}

.side-role {
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: #FFD9DE; margin-bottom: 2px;
}

/* ---------- employee dashboard ---------- */
.today-status { display: flex; align-items: center; gap: 14px; }
.today-status > div:nth-child(2) { flex: 1; min-width: 0; }
.today-tick {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--ok); color: #fff;
  font-size: 24px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.today-tick.miss { background: var(--red); }
.today-head { font-weight: 800; font-size: 17px; }
.today-sub  { color: var(--muted); font-size: 14px; font-weight: 600; }

/* ---------- "same as last time" quick fill ---------- */
.repeat-card {
  border: 2px solid var(--blue);
  background: #EEF3FB;
  text-align: center;
}
.repeat-head { font-weight: 800; font-size: 18px; }
.repeat-sum { color: var(--muted); font-weight: 700; margin: 4px 0 14px; }
.repeat-big {
  width: 100%;
  padding: 18px;
  font-size: 19px;
}

/* "optional" tag on a step label */
.opt {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: none; letter-spacing: 0;
  background: #EEF1F5; padding: 2px 8px; border-radius: 999px;
  margin-left: 6px;
}

/* ---------- clock in / out ---------- */
.clock-card { text-align: center; padding: 28px 20px; }
.clock-card.on  { border-color: var(--ok); border-width: 2px; }
.clock-state {
  font-size: 14px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.clock-card.on .clock-state { color: var(--ok); }
.clock-job { font-size: 26px; font-weight: 800; margin-top: 8px; }
.clock-since { color: var(--muted); font-weight: 600; margin-top: 2px; }
.clock-elapsed { font-size: 44px; font-weight: 800; margin: 14px 0 20px; }

.clock-btn {
  width: 100%;
  padding: 26px;
  font-size: 24px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
}
.clock-btn.in  { background: var(--ok); margin-top: 18px; }
.clock-btn.out { background: var(--red); }
.clock-btn:disabled { background: #9AA4B2; }
.clock-card .job-grid { margin: 12px 0; text-align: left; }

/* ---------- crew ---------- */
.inline-form { display: inline; }
.rowacts { display: flex; gap: 6px; flex-wrap: wrap; }

.reveal-x {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px;
  border: none; background: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer; border-radius: 8px;
}
.reveal-x:hover { background: #EEF1F5; color: var(--ink); }

.pw-reveal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pw-lbl {
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); width: 76px;
}
.pw-code {
  font-size: 17px; font-weight: 700; padding: 10px 14px;
  background: #EEF1F5; border-radius: 8px; letter-spacing: .01em;
}
.ucode {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; background: #EEF1F5; padding: 3px 7px; border-radius: 5px;
}

/* Row for someone/something switched off. Still visible - their hours are
   still the record - just clearly not in play. */
.row-off { opacity: .5; }
.row-off td { background: #FAFBFC; }

.tree-in { color: var(--muted); font-weight: 600; }

.checkline {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; cursor: pointer; line-height: 1.4;
}
.checkline input[type="checkbox"] {
  width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--blue);
}

.toggle {
  border: 2px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 5px 13px; font-weight: 800; font-size: 13px;
  cursor: pointer; min-width: 52px;
}
.toggle.on { border-color: var(--ok); background: #DCFCE7; color: #166534; }

.yes { color: var(--ok); font-weight: 700; }
.muted-cell { color: var(--muted); }

/* Board tables (Crew, Job Sites): tighter, with a wrapping action column so
   the buttons never run off the right edge. */
table.board th, table.board td { padding: 10px 10px; }
table.board td.acts, table.board td.rowacts {
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
table.board .chip { margin: 0; }
.chip.danger { border-color: #FCA5A5; color: var(--red); }
.chip.danger:hover { background: #FEE2E2; }

/* The "+ Add someone" / "+ Add a job site" disclosure. */
.adder {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.adder > summary {
  cursor: pointer; font-weight: 800; color: var(--blue);
  list-style: none; user-select: none;
}
.adder > summary::-webkit-details-marker { display: none; }
.adder[open] > summary { margin-bottom: 4px; }

/* Inline edit form inside an expanded row. */
.edit-row > td { background: #F4F6F9; padding: 16px !important; }
.edit-grid {
  display: grid;
  gap: 12px 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
.edit-grid .field { margin-bottom: 5px; }
.edit-grid input, .edit-grid select { padding: 10px 12px; font-size: 15px; }
.edit-acts {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  grid-column: 1 / -1;
}
.edit-public { grid-column: 1 / -1; }

@media (max-width: 520px) {
  .today-status { flex-wrap: wrap; }
  .today-status .btn { width: 100%; text-align: center; }
}

.content {
  flex: 1;
  min-width: 0;                 /* lets wide tables scroll instead of stretching */
  padding: 26px 30px 60px;
  overflow-x: hidden;
}

.menu-btn {
  display: none;
  background: var(--blue); color: #fff; border: none;
  font-size: 22px; padding: 8px 14px; border-radius: 9px;
  cursor: pointer; margin-bottom: 14px;
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    transform: translateX(-100%); transition: transform .2s;
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: block; }
  .content { padding: 16px 16px 60px; }
}

/* ---------- worker form ---------- */
.greet { margin: 8px 0 4px; font-size: 28px; font-weight: 800; }
.date  { color: var(--muted); font-weight: 600; margin-bottom: 20px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.step-label {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Big two-way choice. Thumb-sized on purpose. */
.choice { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.btn-big {
  display: block;
  width: 100%;
  padding: 24px 16px;
  font-size: 19px;
  font-weight: 800;
  text-align: center;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  background: #fff;
  color: var(--blue);
  text-decoration: none;
  cursor: pointer;
}
.btn-big.primary { background: var(--blue); color: #fff; }

/* Job cards (still used by the office proxy form) */
.jobs { display: grid; gap: 10px; }
.job-opt { position: relative; }
.job-opt input { position: absolute; opacity: 0; pointer-events: none; }
.job-opt label {
  display: block;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}
.job-opt input:checked + label {
  border-color: var(--blue);
  background: #EEF3FB;
  box-shadow: inset 0 0 0 1px var(--blue);
}
.job-opt .sub { display: block; font-weight: 600; font-size: 14px; color: var(--muted); }

/* ---------- the entry unit: job + times + check ---------- */
.entry-card { border-color: var(--blue); border-width: 2px; }

.job-grid { display: grid; gap: 10px; }
.job-btn {
  display: block;
  width: 100%;
  padding: 17px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.job-btn.sel {
  border-color: var(--blue);
  background: #EEF3FB;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.entry-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid var(--line);
}
.entry-hint { color: var(--muted); font-weight: 700; font-size: 15px; }
.entry-hint.warnhint { color: var(--red); }

/* Big enough to hit with a glove, and it's the only green thing on screen. */
.check-btn {
  width: 66px; height: 66px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.check-btn:disabled { background: #C4CBD4; cursor: default; }

/* ---------- the running list of what's been added ---------- */
.added-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.added-row:last-child { border-bottom: none; }
.added-main { flex: 1; min-width: 0; }
.added-job {
  font-weight: 800; font-size: 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.added-time { color: var(--muted); font-size: 14px; font-weight: 600; }
.added-hrs { font-weight: 800; font-size: 17px; }
.added-x {
  width: 36px; height: 36px;
  border: none; background: none;
  color: var(--muted); font-size: 26px; line-height: 1;
  cursor: pointer; flex-shrink: 0;
}
.added-x:active { color: var(--red); }

.added-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
  font-weight: 800;
  font-size: 17px;
}
.added-total span { color: var(--muted); }

/* ---------- card-based job entry (new) ---------- */
.job-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.job-card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.job-card-n {
  font-weight: 800; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.job-card-x {
  background: none; border: none; color: var(--red);
  font-weight: 700; font-size: 14px; cursor: pointer; padding: 4px;
}
.job-select {
  width: 100%; padding: 14px; font-size: 18px; font-weight: 600;
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink); font-family: inherit;
}
.job-select:focus { outline: none; border-color: var(--blue); }
.job-card .times { margin-top: 14px; }
.job-card .shift-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.job-card-hrs {
  text-align: right; font-weight: 800; font-size: 18px;
  margin-top: 10px; color: var(--ink);
}
.job-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.job-note .field { margin-bottom: 6px; }
.job-notes {
  width: 100%; padding: 12px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  resize: vertical; min-height: 56px;
}
.job-notes:focus { outline: none; border-color: var(--blue); }
.add-job-btn {
  width: 100%; padding: 16px; font-size: 17px; font-weight: 800;
  color: var(--blue); background: #fff;
  border: 2px dashed var(--blue); border-radius: var(--radius);
  cursor: pointer; margin-bottom: 16px;
}
.add-job-btn:active { background: #EEF3FB; }
.day-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px 4px; font-weight: 800; font-size: 19px; margin-bottom: 12px;
}
.day-total-row span { color: var(--muted); }

/* ---------- machines used (excavation), inside each job card ---------- */
.machines-block {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.machines-block > .field { margin-bottom: 10px; }
.add-machine-btn {
  margin-top: 4px; padding: 8px 14px; font-size: 15px; font-family: inherit;
  font-weight: 600; color: var(--blue); background: none;
  border: 2px dashed var(--line); border-radius: 10px; cursor: pointer;
}
.add-machine-btn:active { border-color: var(--blue); }
.machine-row {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px;
}
.machine-main { flex: 1; min-width: 0; }
.machine-main .machine-rented { margin-top: 8px; }
.machine-hrs { display: flex; align-items: center; gap: 6px; }
.machine-name, .machine-rented, .machine-hours {
  width: 100%; padding: 12px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.machine-name:focus, .machine-rented:focus, .machine-hours:focus {
  outline: none; border-color: var(--blue);
}
.machine-hours { width: 84px; text-align: center; }
.machine-x {
  width: 40px; height: 40px; flex-shrink: 0;
  border: none; background: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.machine-x:active { color: var(--red); }

/* Time entry: numeric keypad, never a time picker. */
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label.field { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
input[type="time"], input[type="text"], input[type="number"], input[type="password"],
input[type="date"], select, textarea {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue);
}
textarea { min-height: 110px; resize: vertical; }

/* Suggested times from his own history. Suggested - never prefilled.
   A prefilled 8.0 every day is a default value, not a record. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 9px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: var(--ink);
}
.chip:active { background: #EEF3FB; border-color: var(--blue); }

/* Lunch: asked every day, no default selected. */
.lunch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lunch .job-opt label { text-align: center; padding: 16px 8px; font-size: 17px; }

.submit {
  width: 100%;
  padding: 22px;
  font-size: 21px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius);
  background: var(--ok);
  color: #fff;
  cursor: pointer;
}
.submit:disabled { background: #9AA4B2; }

.attest {
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0 18px;
  line-height: 1.5;
}

.add-job {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  margin-bottom: 16px;
}

.seg-block { border-top: 2px solid var(--line); margin-top: 18px; padding-top: 18px; }
.seg-block:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.seg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.seg-head h3 { margin: 0; font-size: 17px; }
.seg-remove { background: none; border: none; color: var(--red); font-weight: 700; cursor: pointer; font-size: 15px; }

/* ---------- confirmation ---------- */
.done { text-align: center; padding: 48px 20px; }
.done .tick {
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--ok); color: #fff;
  font-size: 52px; line-height: 92px;
  margin: 0 auto 20px;
}
.done h1 { font-size: 30px; margin: 0 0 8px; }
.done p { color: var(--muted); font-size: 18px; margin: 0; }

/* ---------- office ---------- */
h1.title { font-size: 26px; margin: 4px 0 2px; }
h2.section-h { font-size: 19px; margin: 26px 0 10px; }

/* ---------- job extras: a per-job note on the log form (staff only) ---------- */
.extra-block {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.extra-block .job-extra {
  width: 100%; padding: 12px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  resize: vertical; min-height: 52px;
}
.extra-block .job-extra:focus { outline: none; border-color: var(--blue); }

p.subtitle { margin: 0 0 18px; color: var(--muted); font-weight: 600; }

.notice.ok { background: #DCFCE7; color: #166534; }

.linkcell { color: var(--blue); font-weight: 600; text-decoration: none; margin-right: 8px; }
.linkcell:hover { text-decoration: underline; }

code {
  background: #EEF1F5; padding: 2px 6px; border-radius: 5px;
  font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat .l { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.stat.bad .n { color: var(--red); }

.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 18px;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}
.filters label.field { font-size: 13px; }
.filters select, .filters input { padding: 10px; font-size: 15px; }
.filters .actions { display: flex; gap: 8px; }
.btn {
  padding: 11px 16px; border-radius: 10px; border: 2px solid var(--blue);
  background: var(--blue); color: #fff; font-weight: 700; cursor: pointer;
  text-decoration: none; display: inline-block; font-size: 15px;
}
.btn.ghost { background: #fff; color: var(--blue); }

.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #EEF1F5; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td.notes { white-space: normal; min-width: 260px; color: var(--muted); }
tr:last-child td { border-bottom: none; }

/* Proxy entries must never look like a normal entry. */
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.badge.proxy { background: #FEF3C7; color: #92400E; }
.badge.public { background: #DBEAFE; color: #1E40AF; }
.badge.ok-badge { background: #DCFCE7; color: #166534; }

/* Account-type labels: a distinct color per type. Admin/Supervisor are bold
   pills; Carpenter/Excavation are plain unbolded text. */
.rolebadge { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.rolebadge.pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-weight: 800;
}
.role-admin.pill      { background: #DBEAFE; color: #1E40AF; }  /* blue */
.role-supervisor.pill { background: #EDE9FE; color: #6D28D9; }  /* purple */
.role-carpenter       { color: #15803D; font-weight: 500; }    /* green */
.role-excavation      { color: #C2410C; font-weight: 500; }    /* rust */

/* ---------- branded confirm modal (replaces native confirm()) ---------- */
.cw-modal-back {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 24, 31, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.cw-modal-back[hidden] { display: none; }
.cw-modal {
  background: #fff;
  border-radius: var(--radius);
  border-top: 6px solid var(--blue);
  max-width: 440px; width: 100%;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(20, 24, 31, .35);
}
.cw-modal-msg {
  font-size: 18px; font-weight: 700; line-height: 1.45; color: var(--ink);
}
.cw-modal-acts {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px;
}
.cw-modal-acts .btn { padding: 12px 20px; font-size: 16px; }
.cw-modal-acts .btn.danger-btn {
  background: var(--red); border-color: var(--red); color: #fff;
}

.empty { padding: 44px; text-align: center; color: var(--muted); }

.ai {
  background: #fff; border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius); padding: 16px; margin-bottom: 18px;
}
.ai h2 { margin: 0 0 4px; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); }
.ai .disclaimer { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.ai p.body { margin: 0; }
.ai ul { margin: 10px 0 0; padding-left: 20px; }
.ai li { margin-bottom: 4px; }

.missing-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.missing-list .who {
  background: #FEE2E2; color: #991B1B; border-radius: 999px;
  padding: 6px 12px; font-weight: 700; font-size: 14px;
}

.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.notice.warn { background: #FEF3C7; color: #92400E; }
.notice.err  { background: #FEE2E2; color: #991B1B; }

/* ---------- login ---------- */
.login { max-width: 380px; margin: 12vh auto; padding: 0 16px; }
.login .card { padding: 24px; }
.login h1 { margin: 0 0 4px; font-size: 24px; }
.login p.sub { margin: 0 0 20px; color: var(--muted); font-size: 15px; }

@media (max-width: 420px) {
  .times { grid-template-columns: 1fr; }
  .choice { grid-template-columns: 1fr; }
}
