/* v5.39 job cost + hour allocation (jc-). Linked from those views via
   content_for :head (JobCostHelper#jc_stylesheet). */
.jc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.jc-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.7rem 0.85rem; }
.jc-tile-label { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.03em; }
.jc-tile-value { font-size: 1.35rem; font-weight: 600; margin-top: 0.15rem; }
.jc-tile-sub { font-size: 0.8rem; color: var(--text-light); margin-top: 0.1rem; }
.jc-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jc-muted { color: var(--text-light); }
.jc-bar { display: inline-block; width: 3.25rem; height: 7px; background: #e5e7eb; border-radius: 4px; vertical-align: middle; margin-right: 0.4rem; overflow: hidden; }
.jc-bar-fill { display: block; height: 100%; background: #2563eb; }
.jc-bar.is-over .jc-bar-fill { background: #dc2626; }
.jc-over { color: #b91c1c; font-weight: 600; }
.jc-phase-row td { background: #f8fafc; font-weight: 600; }
.jc-general td:first-child { font-style: italic; }
.jc-unalloc td { color: #92400e; background: #fffbeb; }
.jc-total td { font-weight: 600; border-top: 2px solid var(--border); }
.jc-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin-bottom: 1rem; }
.jc-filters .filter-field { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; }
.jc-filters .input { min-width: 0; }
.jc-check { display: flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; padding-bottom: 0.45rem; }
.jc-scroll { overflow-x: auto; }
/* Allocation grid */
.jc-alloc input.jc-h { width: 4.25rem; text-align: right; padding: 0.25rem 0.35rem; }
.jc-alloc th.jc-sec { font-size: 0.78rem; text-align: right; max-width: 9rem; white-space: normal; }
.jc-alloc .jc-left.is-open { color: #92400e; font-weight: 600; }
.jc-alloc .jc-left.is-over { color: #b91c1c; font-weight: 600; }
.jc-alloc .jc-left.is-done { color: #166534; }
.jc-alloc tr.is-flagged td { background: #fffbeb; }
.jc-alloc td.jc-source { white-space: nowrap; }
/* v5.41 — who entered the hours: a dot marks a number entered in the office
   (the cell's hover says who and when); the History lists every save. */
.jc-alloc td.jc-by-office { position: relative; }
.jc-alloc td.jc-by-office .jc-dot { position: absolute; top: 0.05rem; right: 0.15rem; }
.jc-dot { color: var(--primary); font-weight: 700; line-height: 1; }
.jc-by { white-space: nowrap; }
.jc-legend { font-size: 0.85rem; color: var(--text-light); margin: 0.4rem 0 0; }
.jc-history { margin: 0.6rem 0; font-size: 0.85rem; }
.jc-history summary { cursor: pointer; color: var(--primary); }
.jc-history ol { margin: 0.4rem 0 0 1.2rem; padding: 0; }
.jc-history ul { margin: 0.15rem 0 0.45rem 1rem; padding: 0; }
.jc-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0 0.9rem; font-size: 0.9rem; }
.jc-sched { font-size: 0.9rem; margin: 0 0 0.75rem; }
.jc-sched li { margin: 0.15rem 0; }
.jc-source { font-size: 0.78rem; color: var(--text-light); }
.jc-phase-tag { display: block; font-weight: 400; color: var(--text-light); font-size: 0.7rem; }
/* v5.49: the classification under a section on PW jobs */
.jc-class-tag { display: block; font-weight: 600; font-size: 0.72rem; color: var(--primary, #2563eb); }
.jc-class-tag.is-missing { color: var(--warning, #b45309); font-weight: 400; font-style: italic; }
.jc-eod { width: auto; min-width: 8rem; font-size: 0.85rem; padding: 0.2rem 0.3rem; }
.jc-job { min-width: 12rem; }
.jc-jobnum { font-weight: 600; white-space: nowrap; }
.jc-jobname { font-size: 0.85rem; color: var(--text); margin-top: 0.1rem; }
.jc-person { white-space: nowrap; }
.jc-worker { min-width: 10rem; }
.jc-worker > a { white-space: nowrap; }
/* Lists (job cost, its job page, hour allocation): fit the 1100px content
   column without sideways scrolling — tighter cells, headers that wrap
   ("Labor at / bid rate"), and a DEMO badge that drops under the name. */
.jc-table th, .jc-table td { padding-left: 0.6rem; padding-right: 0.6rem; }
.jc-table th, .jc-table th.jc-num, .jc-table th a { white-space: normal; }
.jc-table th { vertical-align: bottom; font-size: 0.75rem; letter-spacing: 0.02em; }
.jc-table th.jc-num { text-align: right; }
.jc-table .jc-person { white-space: normal; min-width: 7rem; }
.jc-table .jc-person > a { white-space: nowrap; }
/* v5.45 — Labor Allocation by crew: the By job | By crew switch, the crew
   list's stops ("1749900 → 1760900"), and the crew-day page's stop cards. */
.jc-views { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 0 0 0.75rem; }
.jc-views a { padding: 0.35rem 0.9rem; font-size: 0.9rem; color: var(--text); text-decoration: none; background: #fff; }
.jc-views a + a { border-left: 1px solid var(--border); }
.jc-views a.is-current { background: var(--primary); color: #fff; font-weight: 600; }
.jc-stops { white-space: normal; min-width: 11rem; font-variant-numeric: tabular-nums; }
.jc-stop-num { font-weight: 600; white-space: nowrap; }
.jc-stop-num.is-unscheduled { border-bottom: 2px dotted #d97706; }
.jc-small { font-size: 0.78rem; }
.jc-daynav { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.jc-crewline { margin: -0.25rem 0 1rem; }
.jc-moves { margin: -0.5rem 0 1rem; font-size: 0.9rem; }
.jc-move { white-space: nowrap; }
.jc-stop { margin-bottom: 1rem; }
.jc-stop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.jc-stop-n { font-weight: 700; margin-right: 0.4rem; }
.jc-sched-line { font-size: 0.9rem; margin: 0.4rem 0 0.6rem; }
.jc-table tfoot th { border-top: 2px solid var(--border); }
/* v5.57 — Hours from: ExakTime | LDI Mobile */
.jc-source { display: flex; align-items: center; gap: 0.4rem; margin: -0.25rem 0 0.75rem; flex-wrap: wrap; }
.jc-source-label { font-size: 0.85rem; color: var(--text-light); margin-right: 0.15rem; }
/* v5.55 job hours reports (by employee, summary) and job sets */
.jh-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.jh-intro { margin: 0 0 0.75rem; max-width: 52rem; }
.jh-presets { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.jh-check { display: flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.jh-note-line { margin: -0.25rem 0 0.75rem; font-size: 0.85rem; }

.jh-totals { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; align-items: baseline; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.jh-source { flex-basis: 100%; font-size: 0.8rem; }

.jh-scroll { overflow-x: auto; }
.jh-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.jh-table th, .jh-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border, #e5e7eb); vertical-align: top; text-align: left; }
.jh-table th.jh-num, .jh-table td.jh-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jh-table tfoot th { border-top: 2px solid var(--border, #e5e7eb); border-bottom: none; }
.jh-table .jh-split { border-left: 2px solid var(--border, #e5e7eb); }
.jh-table .jh-id { width: 6.5rem; font-variant-numeric: tabular-nums; color: var(--text-light); white-space: nowrap; }
.jh-table th.jh-period { font-weight: 600; font-size: 0.8rem; white-space: nowrap; }
.jh-summary tbody tr:hover { background: rgba(0, 0, 0, 0.025); }
.jh-summary tr.jh-idle td { color: var(--text-light); }
.jh-job-cell { min-width: 14rem; }
.jh-office-cell { font-size: 0.82rem; color: var(--text-light); }

.jh-jobnum { font-weight: 600; white-space: nowrap; }
.jh-jobname { color: var(--text); }
.jh-note { font-size: 0.72rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: #f3f4f6; color: var(--text-light); white-space: nowrap; }
.jh-kicker { font-size: 0.85rem; font-weight: 400; color: var(--text-light); margin-left: 0.4rem; }

.jh-job { padding-top: 0.75rem; }
.jh-job-head { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: baseline; }
.jh-job-head h3 { margin: 0; font-size: 1rem; text-transform: none; letter-spacing: normal; }
/* Same column widths in every job's table, so the numbers line up down the page. */
.jh-job .jh-table { table-layout: fixed; }
.jh-job .jh-table th.jh-num { width: 5.5rem; }
.jh-job .jh-table th.jh-id { width: 5.5rem; }
.jh-office { font-size: 0.82rem; color: var(--text-light); }
.jh-job-total { margin-left: auto; font-weight: 600; white-space: nowrap; }
.jh-sites { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-size: 0.8rem; color: var(--text-light); margin: 0.35rem 0 0.5rem; }
.jh-sites-label { font-weight: 600; }
.jh-site-no { font-variant-numeric: tabular-nums; }
.jh-site-hours { font-variant-numeric: tabular-nums; color: var(--text); }

.jh-form { max-width: 40rem; }
.jh-form textarea, .jh-numbers { width: 100%; }
.jh-hint { font-size: 0.8rem; margin: 0.3rem 0 0; }
.jh-search-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-bottom: 0.75rem; }
.jh-search-form .form-group { margin: 0; min-width: 18rem; }
.jh-paste-form { margin-top: 1.25rem; max-width: 40rem; }
.jh-check-col { width: 2rem; }
form.jh-inline { display: inline; margin: 0; }
.jh-danger { display: flex; gap: 0.75rem; align-items: center; }
.jh-danger form { margin: 0; }
.jh-desc { max-width: 24rem; color: var(--text-light); font-size: 0.85rem; }

.jh-print-head { margin: 0 0 0.5rem; }
@media print {
  .jh-table { font-size: 0.72rem; }
  .jh-table th, .jh-table td { padding: 0.15rem 0.3rem; }
  .jh-job { break-inside: avoid-page; }
  .jh-job.jh-page { break-before: page; }
  .jh-scroll { overflow: visible; }
}
/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-link {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Section headings */
.section-heading {
  font-size: 1.1rem;
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Permission groups */
.permission-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.permission-group summary {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.permission-group summary:hover { background: #f1f5f9; }

.group-count {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-light);
}

.permission-list { padding: 0.25rem 0; }

/* Permission row */
.permission-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.permission-row:last-child { border-bottom: none; }
.permission-row:hover { background: #fafbfc; }

.permission-row label {
  flex: 1;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.permission-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.permission-row .scope-wrapper {
  width: 130px;
  flex-shrink: 0;
}

.permission-row .scope-wrapper select {
  width: 100%;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.permission-row-readonly { cursor: default; }
.permission-row-readonly label { cursor: default; }

.scope-badge {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

/* Customization dots */
.customized-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 0.25rem;
  vertical-align: middle;
}
.customized-dot.scope_changed { background: var(--warning); }
.customized-dot.added { background: var(--success); }
.customized-dot.removed { background: var(--danger); }

.customized-count {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--warning);
}

/* Role assignment card */
.role-assignment {
  margin-bottom: 1.5rem;
}

.role-assignment h3 {
  margin-bottom: 0.5rem;
}

.role-assign-form {
  margin-top: 0.5rem;
}

.role-assign-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.role-assign-row select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  min-width: 200px;
}
/* Photo Review */

.section-title {
  font-size: 1.1rem;
  margin: 2rem 0 1rem;
  color: var(--text);
}

.threshold-slider {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.threshold-slider label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.threshold-slider strong {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  margin-left: 0.25rem;
}

.threshold-slider input[type="range"] {
  width: 100%;
  max-width: 480px;
  vertical-align: middle;
}

.threshold-histogram-wrap {
  width: 100%;
  max-width: 480px;
  /* Half-thumb inset on each side so bar value N lines up with slider value N.
     The native range thumb is ~14-16px wide in macOS browsers; 8px is a good
     visual match without being noticeable when the data is centered. */
  padding: 0 8px;
  box-sizing: border-box;
  margin-top: 0.25rem;
}

.threshold-histogram {
  width: 100%;
  height: 32px;
  display: block;
}

.threshold-help {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0.4rem 0 0;
}

/* Inline review rows */
.review-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.review-row {
  display: grid;
  grid-template-columns: 170px 80px 170px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.review-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.review-photo img {
  width: 160px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #f1f5f9;
}

.review-photo .photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 200px;
  background: #f1f5f9;
  color: var(--text-light);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.35rem;
  border-radius: var(--radius);
}

.review-photo-caption {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
}

.review-score {
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  min-width: 0;
}

.review-meta-time {
  color: var(--text-light);
  font-size: 0.8rem;
}

.review-zoom-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  margin-top: 0.15rem;
}

.review-zoom-btn:hover {
  background: #f1f5f9;
  border-color: var(--primary);
}

.review-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
  min-width: 280px;
}

.review-verdict {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.review-verdict-option {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  user-select: none;
  transition: all 0.12s;
}

.review-verdict-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.review-verdict-option:hover {
  background: #f8fafc;
}

.review-accept:has(input:checked) {
  border-color: var(--success);
  background: #16a34a;
  color: #fff;
}

.review-reject:has(input:checked) {
  border-color: var(--danger);
  background: #dc2626;
  color: #fff;
}

.review-verdict-clear {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  line-height: 1;
}

.review-verdict-clear:hover { color: var(--text); }

.review-needs-update-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-light);
  cursor: pointer;
}

.review-notes {
  width: 100%;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
}

.review-notes:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.review-form-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-form-help {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Side-by-side photo comparison */
.photo-comparison {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.photo-panel {
  flex: 1;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.photo-panel h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.photo-frame {
  background: #f1f5f9;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  color: var(--text-light);
  font-size: 0.9rem;
}

.photo-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.photo-location {
  color: var(--primary);
  cursor: pointer;
}

/* Score display */
.score-display {
  margin-bottom: 1.5rem;
}

.score-row {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.score-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.score-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.score-pass { color: var(--success); }
.score-uncertain { color: var(--warning); }
.score-fail { color: var(--danger); }

/* Auto result badges */
.badge-pass { background: #dcfce7; color: #166534; }
.badge-fail { background: #fee2e2; color: #991b1b; }
.badge-uncertain { background: #fef3c7; color: #92400e; }

/* Review result badges */
.badge-confirmed { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* Verdict form */
.verdict-card {
  margin-bottom: 2rem;
}

.verdict-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.verdict-buttons {
  display: flex;
  gap: 1rem;
}

.verdict-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}

.verdict-option:hover {
  background: #f8fafc;
}

.verdict-option input[type="radio"] {
  margin-bottom: 0.5rem;
}

.verdict-option input[type="radio"]:checked ~ .verdict-label {
  font-weight: 700;
}

.verdict-confirm:has(input:checked) {
  border-color: var(--success);
  background: #f0fdf4;
}

.verdict-reject:has(input:checked) {
  border-color: var(--danger);
  background: #fef2f2;
}

.verdict-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.verdict-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

/* Textarea */
.form-textarea {
  width: 100%;
  max-width: 600px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* v5.48 prevailing wage pages: wage determinations, job PW setup. */
.pw-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pw-rates th.pw-num, .pw-rates td.pw-num { padding-left: 0.5rem; }
.pw-rates td.pw-class { min-width: 12rem; }
.pw-foot { font-size: 0.8rem; color: var(--text-light); white-space: pre-line; }
.pw-review { border-left: 4px solid var(--warning, #d97706); background: #fffbeb; }
.pw-review ul { margin: 0.25rem 0 0 1.1rem; padding: 0; }
.pw-review li { margin: 0.2rem 0; }
.pw-ok { color: var(--success, #166534); }
.pw-notes { white-space: pre-line; font-size: 0.85rem; }
.pw-filters { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: flex-end; }
.pw-filters .form-group { margin-bottom: 0; }
.pw-inline-form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pw-inline-form select, .pw-inline-form input[type="text"] { max-width: 22rem; }
.pw-muted-row td { color: var(--text-light); }
.pw-increase { font-size: 0.8rem; color: var(--text-light); }
.pw-rates tr.pw-sub td { border-top: none; padding-top: 0; padding-bottom: 0.6rem; }
.pw-rates td { vertical-align: top; }
.pw-foot-details summary { cursor: pointer; font-size: 0.8rem; color: var(--text-light); }

/* v5.49 — weekly PW hours */
.pw-weekly-how { font-size: 0.85rem; max-width: 70rem; }
.pw-weekly { margin-bottom: 1rem; }
.pw-weekly-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.pw-weekly-head h3 { margin: 0 0 .5rem; }
.pw-weekly-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.pw-weekly-table th, .pw-weekly-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border, #e5e7eb); vertical-align: top; }
.pw-weekly-table th.pw-num, .pw-weekly-table td.pw-num { text-align: right; white-space: nowrap; }
.pw-weekly-table .pw-weekend { background: rgba(217, 119, 6, 0.06); }
.pw-weekly-table tr.pw-cat-overtime td, .pw-weekly-table tr.pw-cat-double td { background: rgba(37, 99, 235, 0.04); }
.pw-weekly-table tr.pw-unassigned td { color: var(--warning, #d97706); }
.pw-weekly-table tfoot th { border-top: 2px solid var(--border, #e5e7eb); border-bottom: none; }
.pw-line-ref { font-size: 0.75rem; color: var(--text-light, #6b7280); }
.pw-missing { color: var(--warning, #d97706); }
.pw-withheld { color: var(--text-light, #6b7280); }
.pw-why { display: block; font-size: 0.72rem; white-space: normal; max-width: 12rem; margin-left: auto; }
.pw-weekly-flags { margin: .6rem 0 0; padding-left: 1.2rem; font-size: 0.85rem; color: var(--warning-dark, #92400e); }

/* v5.52 — PW weekly reports (ExakTime hours) */
.pw-xt-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.pw-xt-pick-form { display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.pw-xt-pick-label { font-size: 0.85rem; color: var(--text-light); }
.pw-xt-week { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pw-xt-week-line { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; font-size: 1.05rem; }
.pw-xt-weekno { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.pw-xt-weekno-1 { background: #fef3c7; color: #92400e; }
.pw-xt-weekno-2 { background: #dbeafe; color: #1e3a8a; }
.pw-xt-inprogress { font-size: 0.8rem; color: var(--text-light); font-style: italic; }
.pw-xt-period { margin-top: 0.3rem; font-size: 0.9rem; }
.pw-xt-source { margin-top: 0.3rem; font-size: 0.8rem; }
.pw-xt-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.pw-xt-card-head h3 { margin: 0 0 0.5rem; }
.pw-xt-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.pw-xt-table th, .pw-xt-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border, #e5e7eb); vertical-align: top; text-align: left; }
.pw-xt-table th.pw-num, .pw-xt-table td.pw-num { text-align: right; }
.pw-xt-table tfoot th { border-top: 2px solid var(--border, #e5e7eb); border-bottom: none; }
.pw-xt-table .pw-weekend { background: rgba(217, 119, 6, 0.06); }
.pw-xt-table tr.pw-xt-cont td { border-top: none; }
.pw-xt-narrow { width: auto; min-width: 24rem; }
.pw-xt-sites { font-size: 0.8rem; }
.pw-xt-site-no { font-variant-numeric: tabular-nums; color: var(--text-light); white-space: nowrap; }
.pw-xt-fed { margin-left: 0.3rem; font-size: 0.7rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: #ede9fe; color: #5b21b6; }
.pw-xt-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; white-space: nowrap; }
.pw-xt-class { font-size: 0.72rem; color: var(--text-light); white-space: nowrap; }
.pw-xt-classified { font-weight: 600; margin: 0.5rem 0 0; }
.pw-xt-idle summary { cursor: pointer; }
.pw-xt-idle ul { margin: 0.5rem 0 0 1.1rem; padding: 0; columns: 2; font-size: 0.88rem; }
.pw-xt-fill-all { display: flex; gap: 0.5rem; align-items: center; margin: 0.5rem 0 0.75rem; }
.pw-xt-classify select { width: 7.5rem; font-size: 0.78rem; }
.pw-xt-classify th, .pw-xt-classify td { padding: 0.3rem 0.35rem; }
.pw-xt-classify td.pw-xt-name { min-width: 9rem; }
.pw-xt-cell-hours { font-variant-numeric: tabular-nums; font-weight: 600; margin-bottom: 0.15rem; }
.pw-xt-save { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
@media print {
  .pw-xt-table { font-size: 0.75rem; }
  .pw-xt-table th, .pw-xt-table td { padding: 0.2rem 0.35rem; }
}
.pw-xt-job { min-width: 11rem; }
.pw-xt-job-name { display: block; font-size: 0.82rem; }
.pw-xt-table td.pw-xt-sites { min-width: 16rem; line-height: 1.35; }
.pw-xt-uncounted, .pw-xt-uncounted td { color: var(--text-light); text-decoration-line: none; }
.pw-xt-uncounted em { font-size: 0.75rem; }
form.pw-xt-inline { display: inline; margin: 0; }
/* v5.53 the job's wage determinations on the weekly report pages; split days on the classify grid */
.pw-xt-wd h3 { margin: 0 0 0.4rem; }
.pw-xt-wd-list { list-style: none; margin: 0; padding: 0; }
.pw-xt-wd-list li { margin: 0.25rem 0; }
.pw-xt-wd-kind { display: inline-block; min-width: 4.5rem; font-size: 0.8rem; font-weight: 600; color: var(--text-light); }
.pw-xt-wd-basis { margin-left: 4.5rem; font-size: 0.8rem; color: var(--text-light); }
.pw-xt-wd-review { margin: 0.4rem 0 0 1.1rem; padding: 0; font-size: 0.88rem; }
.pw-xt-nowd { display: block; font-size: 0.72rem; color: var(--warning, #d97706); }
.pw-split [hidden] { display: none !important; }
.pw-split-line { display: flex; gap: 0.2rem; align-items: center; margin-bottom: 0.15rem; white-space: nowrap; }
.pw-xt-classify .pw-split-hours { width: 3.6rem; font-size: 0.78rem; padding: 0.1rem 0.2rem; }
.pw-split-rest { min-width: 3.6rem; font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--text-light); text-align: right; }
.pw-split-tools { display: flex; gap: 0.25rem; }
.pw-split-btn { border: none; background: none; padding: 0 0.15rem; font-size: 0.72rem; color: var(--primary, #2563eb); cursor: pointer; }
.pw-split-btn:hover { text-decoration: underline; }
.pw-split-bad .pw-split-rest { color: var(--danger, #b91c1c); font-weight: 600; }
.pw-split-bad select:invalid, .pw-split-bad .pw-split-hours { border-color: var(--danger, #b91c1c); }
.pw-split-ot, .pw-split-note { font-size: 0.7rem; color: var(--warning, #d97706); max-width: 11rem; white-space: normal; line-height: 1.25; }
.pw-split-error { margin: 0.5rem 0 0; font-weight: 600; }
.pw-xt-spills { margin: 0.2rem 0 0 1.1rem; padding: 0; }
/* v5.54 the job's PW setup: determinations covering its county as one checklist */
.pw-add { margin-top: 1.25rem; padding-top: 0.75rem; border-top: 1px solid var(--border, #e5e7eb); }
.pw-add h4 { margin: 0 0 0.5rem; }
.pw-add-count { font-weight: 600; margin: 0.75rem 0 0.4rem; }
.pw-add-table td label { cursor: pointer; }
.pw-add-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.6rem; }
.pw-add-actions input[type="text"] { min-width: 16rem; }
.pw-search-all { margin-top: 1rem; }
.pw-search-all summary { cursor: pointer; color: var(--text-light); }
/* v5.35 crew schedule — board, calendar, day sheet, entry form.
   Linked from the schedule views (content_for :head). Every selector is
   prefixed sched- / job-picker so it can't leak into other pages.
   A chip's color comes from --job-hue (SchedulesHelper#job_hue): the same
   job site has the same color everywhere. */

:root {
  --sched-ink: var(--text, #1f2937);
  --sched-muted: var(--text-light, #6b7280);
  --sched-line: var(--border, #e5e7eb);
  --sched-accent: var(--primary, #2563eb);
  --sched-amber: var(--warning, #d97706);
  --sched-weekend: #f6f7f9;
  --sched-today: #eef4ff;
}

/* ---------- header, tabs, filters, nav ---------- */
.sched-viewtabs { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.sched-viewtabs a {
  padding: 0.35rem 0.8rem; border: 1px solid var(--sched-line); border-radius: 999px;
  text-decoration: none; color: var(--sched-muted); font-size: 0.85rem; background: #fff;
}
.sched-viewtabs a:hover { color: var(--sched-ink); }
.sched-viewtabs a.is-active { background: var(--sched-accent); border-color: var(--sched-accent); color: #fff; }

.sched-filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; margin: 0.25rem 0 0.75rem; }
.sched-filters .filter-field { display: flex; flex-direction: column; gap: 0.2rem; }
.sched-filters label, .sched-filters .filter-label, .sched-form .filter-label {
  font-size: 0.75rem; color: var(--sched-muted); text-transform: uppercase; letter-spacing: 0.03em;
}
.sched-seg { display: inline-flex; border: 1px solid var(--sched-line); border-radius: 6px; overflow: hidden; }
.sched-seg a { padding: 0.35rem 0.7rem; font-size: 0.85rem; text-decoration: none; color: var(--sched-muted); background: #fff; }
.sched-seg a + a { border-left: 1px solid var(--sched-line); }
.sched-seg a.is-active { background: var(--sched-accent); color: #fff; }

.sched-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-bottom: 0.75rem; }
.sched-nav-dates { display: flex; align-items: center; gap: 0.4rem; }
.sched-range { font-size: 1.05rem; min-width: 12rem; text-align: center; }
.sched-nav .is-current { opacity: 0.55; }
.sched-counts { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sched-count { font-size: 0.8rem; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid var(--sched-line); color: var(--sched-muted); }
.sched-count.is-committed { border-color: #9ca3af; color: var(--sched-ink); }
.sched-count.is-tentative { border-style: dashed; }
.sched-count.is-changed { border-color: var(--sched-amber); color: var(--sched-amber); }
.sched-actions { display: flex; gap: 0.5rem; margin-left: auto; align-items: center; }
.sched-actions form, form.inline-form { display: inline; margin: 0; }

.sched-hint { font-size: 0.8rem; margin: 0 0 0.4rem; }
.sched-flash { background: #fff4e5; border: 1px solid var(--sched-amber); color: #7a4a00; padding: 0.5rem 0.75rem; border-radius: 6px; margin-bottom: 0.75rem; }
.sched-empty { text-align: left; }

/* ---------- the board ---------- */
.sched-scroll {
  overflow: auto; max-height: calc(100vh - 230px);
  border: 1px solid var(--sched-line); border-radius: var(--radius, 8px); background: #fff;
}
.sched-board { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; margin: 0; }
.sched-board th, .sched-board td { border-bottom: 1px solid var(--sched-line); border-right: 1px solid var(--sched-line); vertical-align: top; }
.sched-board thead th {
  position: sticky; top: 0; z-index: 2; background: #fff; font-weight: 600; padding: 0.4rem 0.35rem;
  text-align: center; font-size: 0.8rem; border-bottom: 2px solid var(--sched-line);
}
.sched-board .sched-rowhead-col {
  position: sticky; left: 0; z-index: 1; background: #fff; width: 210px; text-align: left; padding: 0.45rem 0.6rem;
}
.sched-board thead .sched-rowhead-col { z-index: 3; }
/* table-layout: fixed takes column widths from the header row. */
.sched-board th.sched-day { width: 150px; }
.sched-board.span-2 th.sched-day { width: 76px; }
.sched-board.span-4 th.sched-day { width: 58px; }
.sched-board td.sched-cell { padding: 0.3rem; height: 3.2rem; position: relative; }
.sched-board.is-compact td.sched-cell { padding: 0.2rem; }
.sched-board.is-compact .sched-rowhead-col { width: 180px; }
.sched-board.span-4 .sched-chip { font-size: 0.62rem; }
/* wide-view bars: one line, the name truncates */
.sched-board td.sched-run { padding: 0.25rem 0.2rem; vertical-align: middle; }
.sched-run .sched-chip { white-space: nowrap; text-overflow: ellipsis; text-align: left; margin: 0 0 0.15rem; padding: 0.2rem 0.35rem; }
.sched-run .sched-chip .sched-chip-name { font-weight: 400; margin-left: 0.25rem; }
.sched-board.span-4 .sched-cell-actions { flex-wrap: wrap; }
.sched-board .is-weekend { background: var(--sched-weekend); }
.sched-board thead th.is-weekend { background: var(--sched-weekend); }
.sched-board .is-today { background: var(--sched-today); }
.sched-board thead th.is-today { background: var(--sched-today); color: var(--sched-accent); }
.sched-board .is-week-start { border-left: 2px solid #cbd5e1; }
.sched-board .is-holiday { background-image: repeating-linear-gradient(45deg, transparent 0 8px, rgba(217,119,6,0.06) 8px 16px); }
.sched-day .sched-dow { display: block; text-transform: uppercase; font-size: 0.7rem; color: var(--sched-muted); letter-spacing: 0.04em; }
.sched-day .sched-md { display: block; font-size: 0.9rem; }
.sched-day.is-today .sched-dow { color: var(--sched-accent); }
.sched-daylink { text-decoration: none; color: inherit; display: block; }
.sched-daylink:hover .sched-md { text-decoration: underline; }
.sched-holiday { display: block; font-size: 0.65rem; color: var(--sched-amber); font-weight: 600; line-height: 1.1; margin-top: 0.15rem; }

.sched-rowhead-title { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; font-weight: 600; font-size: 0.88rem; }
.sched-rowhead-title a { text-decoration: none; }
.sched-rowhead-meta { font-size: 0.74rem; color: var(--sched-muted); font-weight: 400; line-height: 1.3; margin-top: 0.1rem; }
/* A long crew name wraps (the global `table th a` rule keeps header links on
   one line) — otherwise it pushes the ⋯ out over Monday's +. */
.sched-rowhead-name { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.sched-rowmenu { position: relative; font-weight: 400; flex: none; align-self: flex-start; }
/* The open menu's row head sits above the rows below (each is its own
   sticky layer), so they don't cover the menu's left edge. */
.sched-board tbody .sched-rowhead-col:has(.sched-rowmenu[open]) { z-index: 2; }
.sched-rowmenu summary { list-style: none; cursor: pointer; padding: 0 0.35rem; border-radius: 4px; color: var(--sched-muted); }
.sched-rowmenu summary::-webkit-details-marker { display: none; }
.sched-rowmenu[open] summary, .sched-rowmenu summary:hover { background: #f1f5f9; color: var(--sched-ink); }
.sched-rowmenu-body {
  position: absolute; left: 0; top: 1.4rem; z-index: 10; background: #fff; border: 1px solid var(--sched-line);
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,0.12); padding: 0.3rem; min-width: 14rem;
  text-transform: none; letter-spacing: normal; /* not the row head's caps */
}
.sched-rowmenu-body a, .sched-rowmenu-body .linklike {
  display: block; width: 100%; text-align: left; padding: 0.35rem 0.5rem; font-size: 0.82rem; color: var(--sched-ink);
  text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: 4px; font-family: inherit;
}
.sched-rowmenu-body a:hover, .sched-rowmenu-body .linklike:hover { background: #f1f5f9; }
.sched-rowmenu-body form { margin: 0; }

.sched-swatch {
  display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 3px; vertical-align: baseline; margin-right: 0.3rem;
  background: hsl(var(--job-hue, 210) 55% 45%);
}

/* chips */
.sched-chip {
  display: block; position: relative; margin: 0 0 0.25rem; padding: 0.25rem 0.4rem 0.3rem 0.45rem;
  border-radius: 6px; font-size: 0.78rem; line-height: 1.25; color: var(--sched-ink); text-decoration: none;
  background: hsl(var(--job-hue, 210) 70% 93%);
  border: 1px solid hsl(var(--job-hue, 210) 45% 80%);
  border-left: 4px solid hsl(var(--job-hue, 210) 55% 42%);
  overflow: hidden; word-break: break-word;
}
a.sched-chip:hover { filter: brightness(0.97); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.sched-chip.is-tentative, .sched-chip.is-changed {
  background: repeating-linear-gradient(135deg, hsl(var(--job-hue, 210) 70% 96%) 0 6px, #fff 6px 12px);
  border-style: dashed; border-left-style: dashed;
}
.sched-chip.is-changed { box-shadow: inset 0 0 0 1px var(--sched-amber); }
.sched-chip[draggable="true"] { cursor: grab; }
.sched-chip.is-dragging { opacity: 0.45; }
.sched-chip-main { display: block; font-weight: 600; }
.sched-chip-num { font-variant-numeric: tabular-nums; }
.sched-chip-name { font-weight: 500; }
.sched-chip-time, .sched-chip-tasks, .sched-chip-note { display: block; color: #374151; font-size: 0.72rem; }
.sched-chip-tasks { font-style: normal; }
.sched-chip-note { color: var(--sched-muted); }
.sched-chip-pw { display: inline-block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em; padding: 0 0.25rem;
  border-radius: 3px; background: #7c2d12; color: #fff; vertical-align: 1px; }
.sched-chip-flag {
  display: inline-block; margin-top: 0.15rem; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--sched-muted); border: 1px dashed #9ca3af; border-radius: 3px; padding: 0 0.25rem; background: #fff;
}
.sched-chip.is-changed .sched-chip-flag { color: var(--sched-amber); border-color: var(--sched-amber); }
.sched-board.is-compact .sched-chip { padding: 0.15rem 0.2rem 0.15rem 0.3rem; font-size: 0.68rem; border-left-width: 3px; text-align: center; }

/* cell actions: easy to see (Gary, 2026-10-10 — they used to be faint
   until hovered); a little softer where the day already has chips */
.sched-cell-actions { display: flex; gap: 0.25rem; opacity: 0.7; transition: opacity 0.12s; }
td.sched-cell:hover .sched-cell-actions, td.sched-cell:focus-within .sched-cell-actions,
td.sched-cell.is-empty .sched-cell-actions { opacity: 1; }
.sched-add, .sched-copy {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem;
  border: 1px dashed #6b7280; border-radius: 5px; background: #fff; color: #1f2937; font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer; line-height: 1; font-family: inherit;
}

/* v5.42: a crew's day — hours on site added up, overlap / overtime warnings */
.sched-dayload { font-size: 0.72rem; color: var(--sched-muted); margin: 0.1rem 0 0.2rem; line-height: 1.35; }
.sched-dayload-warn {
  display: inline-block; color: var(--sched-amber); font-weight: 600; border: 1px solid var(--sched-amber);
  border-radius: 3px; padding: 0 0.25rem; background: #fff; cursor: help;
}
.sched-day-others { margin: 0 0 0.75rem; font-size: 0.85rem; }
.sched-day-others ul { list-style: none; margin: 0.25rem 0 0; padding: 0; }
.sched-day-others li { display: flex; align-items: center; gap: 0.35rem; padding: 0.1rem 0; }
/* base labor cost on the entry form (_labor_cost.html.erb) */
.sched-cost { margin: 0.25rem 0 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--sched-line);
  border-radius: var(--radius, 8px); background: #f8fafc; font-size: 0.9rem; }
.sched-cost p { margin: 0.25rem 0 0; }
.sched-cost-table { width: auto; margin: 0.35rem 0 0; border-collapse: collapse; background: transparent; }
.sched-cost-table th, .sched-cost-table td { padding: 0.15rem 0.75rem 0.15rem 0; border: 0; background: transparent;
  text-align: left; font-weight: normal; vertical-align: baseline; }
.sched-cost-table th { color: #374151; white-space: nowrap; }
.sched-cost-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sched-cost-table strong { font-size: 1.05rem; }
.sched-cost-missing { color: #92400e; }
.sched-add:hover, .sched-copy:hover { border-style: solid; border-color: var(--sched-accent); color: var(--sched-accent); }
td.sched-cell.is-drop-target { outline: 2px solid var(--sched-accent); outline-offset: -2px; background: #f0f6ff; }
/* arrived from a calendar bubble or a 2/4-week bar (schedule_board.js):
   the day keeps a ring; it and the crew's name flash once */
.sched-board td.sched-cell.is-arrived { box-shadow: inset 0 0 0 2px var(--sched-accent); animation: sched-arrived 2.5s ease-out; }
.sched-board th.is-arrived { animation: sched-arrived 2.5s ease-out; }
@keyframes sched-arrived { 0%, 35% { background-color: #d6e4ff; } }

.sched-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin-top: 0.75rem; font-size: 0.8rem; }
.sched-legend-chip { display: inline-block; margin: 0; }

/* ---------- calendar ---------- */
.sched-cal { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: #fff;
  border: 1px solid var(--sched-line); border-radius: var(--radius, 8px); overflow: hidden; }
.sched-cal th { font-size: 0.75rem; text-transform: uppercase; color: var(--sched-muted); padding: 0.4rem; text-align: left;
  border-bottom: 1px solid var(--sched-line); background: #fff; }
.sched-cal th.is-weekend { background: var(--sched-weekend); }
.sched-cal-day { vertical-align: top; height: 8.5rem; padding: 0.3rem; border-right: 1px solid var(--sched-line); border-bottom: 1px solid var(--sched-line); }
.sched-cal-day.is-weekend { background: var(--sched-weekend); }
.sched-cal-day.is-today { background: var(--sched-today); }
/* Days before today fade (full strength again on hover); days from the
   previous/next month are grayed, not faded — faded reads as "past". */
.sched-cal-day.is-past { opacity: 0.5; transition: opacity 0.12s; }
.sched-cal-day.is-past:hover { opacity: 1; }
.sched-cal-day.is-other-month { background: #eef0f3; }
.sched-cal-day.is-other-month .sched-cal-num { color: var(--sched-muted); font-weight: 600; }
.sched-cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.2rem; }
.sched-cal-num { font-weight: 700; text-decoration: none; color: var(--sched-ink); font-size: 0.9rem; }
.sched-cal-day.is-today .sched-cal-num { color: var(--sched-accent); }
.sched-cal-count, .sched-cal-more { font-size: 0.7rem; color: var(--sched-muted); }
.sched-cal-line { display: flex; justify-content: space-between; gap: 0.3rem; font-size: 0.7rem; padding: 0.1rem 0.3rem 0.1rem 0.35rem;
  margin-bottom: 0.15rem; border-left-width: 3px; }
.sched-cal-crew { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- day sheet + repeat preview ---------- */
.sched-daysheet, .sched-repeat { width: 100%; }
.sched-daysheet td, .sched-repeat td { vertical-align: top; }
.sched-daysheet tr.sched-daysheet-first td { border-top: 2px solid var(--sched-line); }
.sched-daysheet-crew { width: 220px; }
.sched-status { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.1rem 0.45rem;
  border-radius: 4px; border: 1px solid #9ca3af; color: var(--sched-ink); vertical-align: middle; font-weight: 600; }
.sched-status.is-tentative { border-style: dashed; color: var(--sched-muted); }
.sched-status.is-changed { border-style: dashed; border-color: var(--sched-amber); color: var(--sched-amber); }
.sched-unscheduled { margin-top: 1rem; font-size: 0.85rem; color: var(--sched-muted); }
.sched-print-row { margin: 0 0 0.75rem; }
.sched-print-title { margin-bottom: 0.2rem; }
.sched-repeat-list { list-style: none; margin: 0; padding: 0; }
.sched-repeat-list li { margin-bottom: 0.2rem; font-size: 0.85rem; }
.sched-repeat-day { display: inline-block; min-width: 4.5rem; color: var(--sched-muted); font-variant-numeric: tabular-nums; }

/* ---------- entry form ---------- */
.sched-crewcard { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 1rem; max-width: 56rem; }
.sched-form { max-width: 56rem; }
.sched-fieldset { border: 1px solid var(--sched-line); border-radius: var(--radius, 8px); padding: 0.75rem 1rem 0.9rem; margin: 0 0 1rem; background: #fff; }
.sched-fieldset legend { font-weight: 700; padding: 0 0.35rem; }
.sched-field-hint { font-size: 0.78rem; margin: 0.35rem 0 0; }

.job-picker { position: relative; }
.job-picker-current { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem;
  padding: 0.45rem 0.6rem; border-radius: 6px; background: #f8fafc; border: 1px solid var(--sched-line); }
.job-picker-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.job-picker-input { flex: 1 1 18rem; max-width: 26rem; }
.job-picker-select { flex: 1 1 18rem; max-width: 26rem; }
.job-picker-results { position: absolute; z-index: 20; left: 0; right: 0; max-width: 40rem; max-height: 20rem; overflow-y: auto;
  background: #fff; border: 1px solid var(--sched-line); border-radius: 6px; box-shadow: 0 8px 22px rgba(0,0,0,0.14); }
.job-picker-result { display: block; width: 100%; text-align: left; padding: 0.45rem 0.65rem; border: 0; background: none;
  cursor: pointer; font: inherit; font-size: 0.88rem; border-bottom: 1px solid #f1f5f9; }
.job-picker-result:hover, .job-picker-result.is-active { background: #eef4ff; }
.job-picker-empty { padding: 0.5rem 0.65rem; color: var(--sched-muted); font-size: 0.85rem; }

.sched-quickpicks { margin-bottom: 0.5rem; }
.sched-quickpick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.35rem; }
.sched-quickpick-label { font-size: 0.75rem; color: var(--sched-muted); min-width: 9rem; }
.sched-quickpick { font: inherit; font-size: 0.8rem; padding: 0.25rem 0.55rem; border-radius: 999px; cursor: pointer;
  border: 1px solid hsl(var(--job-hue, 210) 45% 75%); background: hsl(var(--job-hue, 210) 70% 96%); }
.sched-quickpick:hover, .sched-quickpick.is-chosen { background: hsl(var(--job-hue, 210) 70% 88%); border-color: hsl(var(--job-hue, 210) 55% 42%); }

.sched-taskgrid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.sched-taskgrid-common { padding-top: 0.4rem; border-top: 1px dashed var(--sched-line); align-items: center; }
.sched-task { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.6rem; border: 1px solid var(--sched-line);
  border-radius: 6px; cursor: pointer; font-size: 0.85rem; background: #fff; }
.sched-task:has(input:checked) { border-color: var(--sched-accent); background: #eef4ff; }
.sched-task.is-common { font-size: 0.8rem; }
.sched-task-code { font-size: 0.7rem; color: var(--sched-muted); font-variant-numeric: tabular-nums; }
.sched-task-src { font-size: 0.65rem; color: var(--sched-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.sched-days { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.sched-day-toggle { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.55rem; border: 1px solid var(--sched-line);
  border-radius: 6px; cursor: pointer; font-size: 0.85rem; background: #fff; }
.sched-day-toggle.is-weekend { background: var(--sched-weekend); }
.sched-day-toggle:has(input:checked) { border-color: var(--sched-accent); background: #eef4ff; }
.sched-day-toggle small { color: var(--sched-muted); }
.sched-time { max-width: 10rem; }
.sched-status-choice label { margin-right: 1rem; font-weight: 500; }
.sched-provenance { font-size: 0.8rem; padding: 0.6rem 1rem; }

@media print {
  .sched-viewtabs, .sched-filters, .sched-nav, .sched-print-row, .sched-cell-actions, .sched-rowmenu, .sched-hint { display: none !important; }
  .sched-scroll { max-height: none; overflow: visible; border: 0; }
  .sched-chip, .sched-swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* author display rules beat the UA's [hidden] — keep hidden things hidden */
.sched-flash[hidden], .job-picker-current[hidden], .job-picker-results[hidden] { display: none; }

/* ---------- v5.36: the foreman's phone ---------- */
.sched-chip.is-removed {
  background: #fff; color: var(--sched-muted); border-style: dashed; border-color: #d1d5db;
  border-left: 4px dashed #9ca3af;
}
.sched-chip.is-removed .sched-chip-main { text-decoration: line-through; font-weight: 500; }
.sched-count.is-removed { border-style: dashed; border-color: #9ca3af; }
.sched-phone { text-decoration: none; color: var(--sched-muted); }
a.sched-phone:hover { text-decoration: underline; }
.sched-phone.is-waiting { color: var(--sched-amber); }
.sched-phone.is-received { color: var(--sched-ink); }
.sched-phone.is-viewed { color: var(--success, #15803d); }
.sched-phone.is-none { font-style: italic; }
.sched-commit-form { display: inline-flex; align-items: center; gap: 0.5rem; }
.sched-notify { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--sched-muted); cursor: pointer; }

.sched-intro { margin: 0 0 0.75rem; }
.sched-pubs { width: 100%; }
.sched-pubs td { vertical-align: top; }
.sched-pubs tr.is-superseded td { color: var(--sched-muted); }
.sched-pub-head { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.sched-pub-subhead { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }

/* "what the phone shows" — a narrow column like the phone's Schedule tab */
.sched-phoneview { max-width: 26rem; display: flex; flex-direction: column; gap: 0.75rem; }
.sched-phoneday { border: 1px solid var(--sched-line); border-radius: 10px; background: #fff; overflow: hidden; }
.sched-phoneday-date { font-weight: 600; padding: 0.45rem 0.75rem; background: #f8fafc; border-bottom: 1px solid var(--sched-line); }
.sched-phonevisit { padding: 0.55rem 0.75rem; font-size: 0.88rem; line-height: 1.35; }
.sched-phonevisit + .sched-phonevisit { border-top: 1px dashed var(--sched-line); }
.sched-phonevisit-site { font-size: 0.95rem; }
.sched-phonevisit-notes { margin-top: 0.2rem; padding: 0.3rem 0.45rem; background: #fffbeb; border-radius: 4px; }
.sched-pubs.is-narrow { width: auto; min-width: 26rem; }
/*


 */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #3b82f6;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 1.5rem 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  text-align: center;
}

.sidebar-header h2 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0;
}

.sidebar-header .company-name {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.sidebar-header .subtitle {
  font-size: 0.8rem;
  color: var(--sidebar-text);
}

.sidebar ul { list-style: none; }

.sidebar li a {
  display: block;
  padding: 0.6rem 1.25rem 0.6rem 3.25rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.sidebar li a:hover { background: rgba(255,255,255,0.08); }
.sidebar li a.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 500;
}

/* Top-level link (Dashboard) sits flush with section-header text. */
.sidebar > ul > li > a { padding-left: 1.25rem; }

.sidebar-section { margin-top: 1rem; }
.sidebar-section-header {
  width: 100%;
  text-align: left;
  background: rgba(234, 179, 8, 0.15);
  border: 0;
  padding: 0.55rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fde68a;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: inherit;
  transition: background 0.15s;
}
.sidebar-section-header:hover {
  background: rgba(234, 179, 8, 0.25);
}
.sidebar-section-header::before {
  content: "▾";
  display: inline-block;
  font-size: 0.75em;
  color: #fde68a;
  opacity: 0.7;
  transition: transform 0.15s;
  width: 0.8em;
}
.sidebar-section.collapsed .sidebar-section-header::before {
  transform: rotate(-90deg);
}
.sidebar-section.collapsed > ul {
  display: none;
}
.sidebar li a.sidebar-sublink {
  padding-left: 4.25rem;
  font-size: 0.85rem;
}
/* Collapsible section inside a section (Prevailing Wage under Time & Pay):
   a smaller section band, indented under its parent, with a rule down the
   left of its links. Sized so "SALARIO PREVALECIENTE" stays on one line
   in the 220px sidebar. */
.sidebar-section.sidebar-subsection { margin: 0.35rem 0 0.35rem 1.25rem; }
.sidebar-section-header.sidebar-subsection-header {
  background: rgba(234, 179, 8, 0.12);
  border-left: 2px solid rgba(234, 179, 8, 0.6);
  padding: 0.45rem 0.5rem 0.45rem 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  gap: 0.4rem;
}
.sidebar-section-header.sidebar-subsection-header:hover {
  background: rgba(234, 179, 8, 0.22);
}
.sidebar-subsection > ul {
  border-left: 2px solid rgba(234, 179, 8, 0.25);
}
/* Same text column as other sub-links (4.25rem from the sidebar edge);
   a narrower right pad keeps "Wage determinations" on one line. */
.sidebar-subsection li a.sidebar-sublink {
  padding-left: calc(4.25rem - 1.25rem - 2px);
  padding-right: 0.75rem;
}
/* Non-clickable grouping label inside a sidebar section (e.g. "Samsara"
   and "Fleetio" under Fleet). Sits below the section header but above
   the items it groups. */
.sidebar li.sidebar-subhead {
  padding: 0.6rem 1.25rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  list-style: none;
  cursor: default;
  user-select: none;
}
.sidebar-badge {
  display: inline-block;
  background: #d97706;
  color: #fff;
  font-size: 0.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  font-weight: 600;
}
.sidebar-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  background: #ef4444;
  border-radius: 999px;
  margin-left: 0.45rem;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

/* Sidebar logo */
.sidebar-logo {
  display: flex;
  justify-content: center;
  padding: 0 1.25rem 1rem;
}
.sidebar-logo img {
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  border-radius: var(--radius);
}

/* Form sections (used by system_settings) */
.form-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.form-section-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.form-section-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0 0 1rem;
}
.form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.form-label-static {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.logo-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.logo-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.logo-pair[hidden] { display: none; }
.logo-pair .form-label-static { margin-bottom: 0.35rem; }
.logo-preview {
  display: inline-block;
  padding: 0.5rem;
  background: var(--sidebar-bg);
  border-radius: var(--radius);
}
.logo-preview img {
  max-width: 120px;
  max-height: 120px;
  display: block;
}
/* Content */
.content {
  flex: 1;
  padding: 2rem;
  max-width: 1100px;
}

/* Wide tables (job cost, hour allocation) opt in with
   content_for(:main_class, "content-wide"). */
.content.content-wide {
  max-width: 1280px;
}

.content h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Flash messages */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.flash.notice { background: #dcfce7; color: #166534; border: 1px solid #86efac; word-break: break-all; }
.flash.alert { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

th, td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

th {
  background: #f1f5f9;
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* Buttons & links */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: #f1f5f9; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* The `hidden` attribute must win over any display rule (e.g. .btn's
   inline-block), otherwise a hidden button still shows. */
[hidden] { display: none !important; }

/* File input driven by a <label for> styled as a button: keep the native
   input focusable for keyboard users, just not visible. */
.form-group input.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.form-group label.btn-file {
  display: inline-block;
  margin-bottom: 0;
}
.form-group input.file-input-hidden:focus-visible + div label.btn-file {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* A text input with a live status note to its right (employee form: email
   in use → link to that employee). Wraps under the field when narrow. */
.field-with-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.form-group .field-with-status input {
  width: auto;
  flex: 0 1 400px;
  min-width: 0;
}
.field-status {
  display: inline;
  margin-top: 0;
}
.field-status.is-warning { color: var(--danger); }
.field-status.is-warning a { color: inherit; font-weight: 500; }

/* Grouped choices (employee form: Back Office account — radios, or checkboxes
   for an existing account). */
.form-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 1rem;
  max-width: 520px;
}
.form-fieldset legend {
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0 0.3rem;
}
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
  width: auto;
  margin: 0.2rem 0 0;
  flex: none;
}
.radio-option .form-hint { margin-top: 0.1rem; }
#account_password_fields { margin-top: 0.75rem; }
.form-group label.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  cursor: pointer;
}
.btn:disabled:hover,
.btn[disabled]:hover {
  background: inherit;
}

.actions { display: flex; gap: 0.5rem; align-items: center; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.page-header h1 { margin-bottom: 0; }
.page-header .timecard-next { white-space: nowrap; }

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* Checkboxes must not inherit the 100%-width text-input sizing above —
   a stretched checkbox leaves a huge gap before its label text. */
.form-group input[type="checkbox"] {
  width: auto;
  padding: 0;
}

/* Sortable column headers: keep "Label ↑" on one line. */
table th a {
  white-space: nowrap;
}

/* Filter-bar Apply/Clear sit side by side; the submit input must not
   take the 100%-width text-input sizing. */
.filter-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-buttons input[type="submit"] {
  width: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: normal;
  margin-top: 0.35rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-errors {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: #991b1b;
  font-size: 0.85rem;
}
.form-errors ul { margin-left: 1.2rem; }

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

/* Dashboard cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.card h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.card .detail {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-terminated { background: #fee2e2; color: #991b1b; }
.badge-lost { background: #fef3c7; color: #92400e; }
.badge-warn { background: #fef3c7; color: #92400e; }
/* A punch outside its job site's geofence (TimePunchesHelper#punch_gps_link):
   an amber pill that still links to the map. */
a.geo-outside { font-size: 0.8rem; font-weight: 600; text-decoration: none; white-space: normal; border: 1px solid #f59e0b; }
a.geo-outside:hover { text-decoration: underline; }
.geo-elsewhere { font-size: 0.8rem; margin-top: 0.15rem; }
.geo-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; font-size: 0.9rem; }
.badge-voided { background: #fee2e2; color: #991b1b; }
.badge-pw { background: #ede9fe; color: #5b21b6; }
.badge-fed { background: #dbeafe; color: #1e40af; }       /* v5.48 federal PW */
.badge-verified { background: #dcfce7; color: #166534; }  /* v5.48 wage determinations */
.badge-imported { background: #f3f4f6; color: #374151; }
.badge-foreman { background: #dbeafe; color: #1e40af; }
.badge-primary { background: #dcfce7; color: #166534; }
.badge-secondary { background: #f1f5f9; color: #64748b; }
.membership-select { padding: 0.2rem 0.4rem; font-size: 0.85rem; }

/* Crew forms: foreman search + workers list (crew_roster.js) */
.crew-roster-table { margin-top: 0.6rem; }
.crew-roster-table[hidden] { display: none; }
.crew-roster-table td { vertical-align: top; }
.form-group .crew-roster-table select { width: auto; padding: 0.25rem 0.4rem; font-size: 0.85rem; }
.crew-member-note { font-size: 0.85rem; }
.crew-move-note,
.crew-roster-warning {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #7a5a00;
}
.crew-roster-warning {
  padding: 0.4rem 0.6rem;
  background: #fff7e6;
  border: 1px solid #f5b400;
  border-radius: 4px;
  max-width: 32rem;
}
.crew-move-note[hidden],
.crew-roster-warning[hidden],
.crew-roster-message[hidden] { display: none; }
.crew-roster-message { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--text-light); }
.crew-roster-form { margin-top: 1rem; }
.badge-sheet-received { background: #f1f5f9; color: #64748b; }
/* v5.39 demo data (DemoData): made-up rows next to real ones. */
.badge-demo { background: #fce7f3; color: #9d174d; margin-left: 0.3rem; letter-spacing: 0.03em; }
.badge-test-person { background: #e0f2fe; color: #075985; margin-left: 0.3rem; letter-spacing: 0.03em; }
.badge-plain-site { background: #dcfce7; color: #166534; margin-left: 0.3rem; }
.demo-banner {
  background: #fdf2f8; color: #831843; border: 1px solid #f9a8d4;
  border-radius: var(--radius); padding: 0.55rem 0.85rem; margin-bottom: 1rem; font-size: 0.9rem;
}
.badge-sheet-deciphered { background: #dbeafe; color: #1e40af; }
.badge-sheet-failed { background: #fee2e2; color: #991b1b; }
.badge-sheet-confirmed { background: #dcfce7; color: #166534; }

.text-warn { color: #92400e; }

/* Code display */
.code-display {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--primary);
}

/* Auth pages */
.auth-body {
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.auth-header h1 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
}

.auth-card h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.auth-card .form-group input {
  max-width: 100%;
}

.auth-card .form-actions {
  margin-top: 1.25rem;
}

.auth-card .btn-primary {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
}

.auth-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.auth-links {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
}

.auth-links p { margin-bottom: 0.4rem; }
.auth-links a { color: var(--primary); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* Sidebar user info */
.sidebar-user {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
  font-size: 0.8rem;
}

.sidebar-user .user-name {
  color: #fff;
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.sidebar-user a {
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.8rem;
}

.sidebar-user a:hover { color: #fff; }

.locale-switcher {
  margin: 0 1.25rem 1rem;
}
.locale-switcher select {
  width: 100%;
  background: rgba(255,255,255,0.06);
  color: var(--sidebar-text);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  appearance: auto;
}
.locale-switcher select:hover { background: rgba(255,255,255,0.1); color: #fff; }
.locale-switcher select:focus {
  outline: none;
  border-color: var(--sidebar-active);
}
/* Native <option> rendering follows OS conventions; explicit styling is
   intentionally omitted so system dark-mode defaults apply. */

/* Utility */
.text-muted { color: var(--text-light); }

/* Form rows (side-by-side fields) */
.form-row {
  display: flex;
  gap: 1rem;
}
.form-row .form-group { flex: 1; }

/* Textarea */
.form-group textarea {
  width: 100%;
  max-width: 600px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Filters bar */
.filters {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.filters .form-group {
  margin-bottom: 0;
}
.filters .form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
}
.filters .form-group select,
.filters .form-group input {
  max-width: 200px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

/* Additional badge styles */
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-accepted { background: #dcfce7; color: #166534; }
.badge-discarded { background: #f1f5f9; color: #64748b; }
.badge-pushed { background: #e0e7ff; color: #3730a3; }
.badge-delivered { background: #dbeafe; color: #1e40af; }
.badge-read { background: #dcfce7; color: #166534; }

/* Punch type badges */
.badge-punch-clock_in { background: #dcfce7; color: #166534; }
.badge-punch-clock_out { background: #fee2e2; color: #991b1b; }
.badge-punch-break_start { background: #fef3c7; color: #92400e; }
.badge-punch-break_end { background: #e0e7ff; color: #3730a3; }
.badge-punch-meal_start { background: #ffedd5; color: #9a3412; }
.badge-punch-meal_end   { background: #fed7aa; color: #7c2d12; }
.badge-punch-context_change { background: #f1f5f9; color: #64748b; }

/* Attestation answers list */
.attestation-answers dt { font-weight: 500; margin-top: 0.5rem; }
.attestation-answers dd { margin-left: 0; margin-bottom: 0.5rem; }

/* Filter form */
.filter-form { width: 100%; }
.filter-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filter-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}
.filter-field .input {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  min-width: 160px;
}
.filter-field .input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Native <input type="date"> shows its placeholder text in browser-default
   light grey, which reads as "disabled". Force the inner edit fields to use
   the same text color as the rest of the form so the field looks active. */
.filter-field input[type="date"] { color: var(--text); }
.filter-field input[type="date"]::-webkit-datetime-edit { color: var(--text); }
.filter-field input[type="date"]::-webkit-datetime-edit-text,
.filter-field input[type="date"]::-webkit-datetime-edit-month-field,
.filter-field input[type="date"]::-webkit-datetime-edit-day-field,
.filter-field input[type="date"]::-webkit-datetime-edit-year-field { color: var(--text); }

.filter-date-range .date-range-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.filter-date-range .date-range-controls .input { min-width: 130px; }
.filter-date-range .date-range-separator {
  color: var(--text-light);
  font-size: 0.9rem;
}
.filter-date-range .date-range-arrow {
  font-size: 1rem;
  line-height: 1;
  padding: 0.4rem 0.5rem;
  min-width: auto;
}
.filter-date-range .date-range-arrow.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}
.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding-bottom: 1px;
}
/* Employee picker sitting inside the standard filter bar (Timecards):
   size its search box like the bar's other inputs. */
.filter-field .employee-picker { min-width: 220px; max-width: 22rem; }
.filter-field .employee-picker-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  border-radius: var(--radius);
}
/* Match button vertical padding to the inputs' so Apply/Clear sit at the
   same visual height as the selects beside them. Default .btn padding is
   0.5rem 1rem; .input is 0.4rem 0.6rem. */
.filter-actions .btn {
  padding: 0.4rem 0.9rem;
}

/* Count line under a filter bar, e.g. "42 employees". Sits between the
   filter bar and the table. */
.results-count {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Detail card */
.detail-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.detail-section dl { display: grid; grid-template-columns: 120px 1fr; gap: 0.4rem 1rem; }
.detail-section dt { font-size: 0.85rem; color: var(--text-light); font-weight: 500; }
.detail-section dd { font-size: 0.85rem; }
.monospace { font-family: "SF Mono", "Fira Code", monospace; font-size: 0.8rem; }

/* Punch photo */
.punch-photo { margin-top: 0.5rem; }
.photo-preview {
  max-width: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Side-by-side reference + punch comparison */
.photo-pair {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.photo-pair-item { margin: 0; }
.photo-pair-item figcaption {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.photo-missing {
  width: 300px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: 0.85rem;
}
.photo-match-controls {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.photo-match-result {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: var(--surface, #fafafa);
}
.photo-match-score {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  display: inline-block;
  color: #fff;
}
.photo-match-score--green  { background: #16a34a; }
.photo-match-score--yellow { background: #eab308; color: #1f2937; }
.photo-match-score--orange { background: #ea580c; }
.photo-match-score--red    { background: #dc2626; }
.photo-match-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Map */
.map-container {
  height: 350px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.map-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

/* Punch correction / timeline */
.corrections-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.corrections-timeline li {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--border);
  margin-bottom: 0.5rem;
  background: #f8fafc;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
}
.corrections-timeline li.void    { border-left-color: #991b1b; }
.corrections-timeline li.unvoid  { border-left-color: #166534; }
.corrections-timeline li.adjust  { border-left-color: #92400e; }
.corrections-timeline .meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}
.corrections-timeline .reason {
  font-style: italic;
  color: var(--text);
  margin-top: 0.25rem;
}
.corrections-timeline .change {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85rem;
}
.corrections-timeline .change del { color: #991b1b; text-decoration: line-through; }
.corrections-timeline .change ins { color: #166534; text-decoration: none; background: #dcfce7; padding: 0 0.2rem; }

.supervisor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}
.supervisor-actions details {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}
.supervisor-actions details[open] { background: white; }
.supervisor-actions summary {
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}
.supervisor-actions form { margin-top: 0.75rem; display: grid; gap: 0.5rem; }
.supervisor-actions label { font-size: 0.85rem; color: var(--text-light); }
.supervisor-actions input[type="text"],
.supervisor-actions input[type="datetime-local"],
.supervisor-actions select,
.supervisor-actions textarea {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}
.supervisor-actions textarea { min-height: 3rem; }

.voided-banner {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Timecard page */
.filter-bar {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.filter-bar .filter-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filter-bar label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-weight: 500;
}
.filter-bar select,
.filter-bar input[type="date"] {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  min-width: 180px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  font-weight: normal;
}
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

.timecard-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.timecard-header h2 { margin: 0; }
.timecard-week { color: var(--text-light); font-size: 0.95rem; }

table.timecard {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}
.timecard th,
.timecard td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-size: 0.9rem;
}
.timecard th { font-weight: 500; color: var(--text-light); background: #f8fafc; }
.timecard .timecard-row-label { text-align: left; font-weight: 500; color: var(--text); min-width: 160px; }
.timecard .timecard-cell.weekend,
.timecard th.weekend { background: #f8fafc; color: #94a3b8; }
.timecard .timecard-week-divider { border-left: 2px solid #64748b; }
.timecard--biweekly th,
.timecard--biweekly td { padding: 0.4rem 0.4rem; font-size: 0.85rem; }
.timecard-summary-total th,
.timecard-summary-total td { background: #f1f5f9; font-weight: 600; }
.timecard .timecard-total-col { font-weight: 600; border-left: 1px solid var(--border); background: #f8fafc; }
.timecard .timecard-totals-row td { border-top: 2px solid var(--text-light); font-weight: 600; background: #f1f5f9; }
.timecard-day-header { display: flex; flex-direction: column; align-items: center; }
.timecard-day-dow { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.04em; }
.timecard-day-date { font-weight: 500; color: var(--text); }

table.timecard-summary {
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-variant-numeric: tabular-nums;
}
.timecard-summary th,
.timecard-summary td {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  text-align: right;
  font-size: 0.9rem;
}
.timecard-summary th { background: #f8fafc; font-weight: 500; text-align: center; }
.timecard-summary tbody th { text-align: left; }

/* v5.56 — missing punches on the timecard */
.timecard-missing-flag { color: var(--danger, #b91c1c); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.timecard-missing { margin-top: 1.5rem; border-top: 1px dashed var(--border); padding-top: 1rem; }
.timecard-missing h3 { color: var(--danger, #b91c1c); }
.timecard-missing ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.timecard-corrections { margin-top: 1.5rem; border-top: 1px dashed var(--border); padding-top: 1rem; }
.timecard-corrections h3 { margin-top: 0; font-size: 1rem; }

/* v5.49 — prevailing wage hours on the timecard */
.timecard-pw { margin-top: 1.5rem; border-top: 1px dashed var(--border); padding-top: 1rem; }
.timecard-pw h3 { margin: 0 0 .5rem; font-size: 1rem; }
.timecard-pw-job { margin: .75rem 0 .35rem; }
.timecard-pw-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.timecard-pw-table th, .timecard-pw-table td { padding: 0.3rem 0.45rem; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.timecard-pw-table th:first-child, .timecard-pw-table td:first-child { text-align: left; white-space: normal; }
.timecard-pw-unassigned td { color: var(--warning); }
.timecard-blocks { margin-top: 1.5rem; border-top: 1px dashed var(--border); padding-top: 1rem; }
.timecard-blocks summary { cursor: pointer; font-weight: 500; color: var(--text-light); }
.timecard-blocks-table { width: 100%; margin-top: 0.75rem; border-collapse: collapse; font-size: 0.85rem; }
.timecard-blocks-table th,
.timecard-blocks-table td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--border); text-align: left; }
.timecard-blocks-table a { margin-right: 0.35rem; color: var(--primary); text-decoration: none; }
.timecard-blocks-type-col { width: 1px; white-space: nowrap; text-align: right; padding-left: 0.25rem; padding-right: 0.5rem; }
.timecard-blocks-meal td { color: var(--text-light); }

/* ── Print version of timecard ──────────────────────────────────────── */
.timecard-actions { margin-left: auto; }
.print-page { background: #fff; }
.print-content { padding: 1rem 1.5rem; }
.print-back-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}
.print-back-bar .print-hint { font-size: 0.8rem; }
.print-sheet { max-width: 60rem; }
.print-header { text-align: center; margin-bottom: 1.25rem; }
.print-header h1 { font-size: 1.1rem; margin: 0; color: var(--text-light); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.print-header h2 { font-size: 1.5rem; margin: 0.25rem 0 0; }
.print-employee-block {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.print-footer {
  margin-top: 2rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: right;
}

@media print {
  .no-print { display: none !important; }
  body, .print-page { background: #fff !important; }
  .print-content { padding: 0; }
  .print-sheet { max-width: none; }
  table.timecard,
  table.timecard-summary { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* Inline employee picker (typeahead) */
.employee-picker {
  position: relative;
  max-width: 32rem;
}
.employee-picker-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
}
.employee-picker-current[hidden] { display: none; }
.employee-picker-clear-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1;
  font-size: 1.1rem;
  cursor: pointer;
  color: #64748b;
  padding: 0;
}
.employee-picker-clear-btn:hover {
  background: #fff;
  color: #0f172a;
}
.employee-picker-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  background: #fff;
}
.employee-picker-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.employee-picker-results {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 2px;
  max-height: 18rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}
.employee-picker-result {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.employee-picker-result:last-child { border-bottom: 0; }
.employee-picker-result:hover,
.employee-picker-result.is-active {
  background: #eff6ff;
}
.employee-picker-result strong {
  font-weight: 600;
}
.employee-picker-note {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.1rem;
}
.employee-picker-empty {
  padding: 0.7rem;
  color: #64748b;
  font-style: italic;
  font-size: 0.9rem;
}
