/* Single-line punch-list cards and the read-only task-details dialog. */
.punch-screen {
  container-type: inline-size;
  min-width: 0;
  margin-top: 24px;
}
.punch-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.punch-toolbar {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}
.punch-toolbar label {
  margin: 0;
}
.punch-job-field {
  flex: 0 1 220px;
  min-width: 170px;
}
.punch-search-field {
  flex: 1 1 200px;
  min-width: 180px;
}
.punch-toolbar input,
.punch-toolbar select {
  min-height: 44px;
  margin: 5px 0 0;
  font-size: 15px;
}
.punch-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.punch-toolbar-actions button {
  min-height: 44px;
  white-space: nowrap;
}
.punch-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 20px;
}
.punch-filters {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 3px;
  margin: -3px;
  scrollbar-width: thin;
}
.punch-filter {
  flex: 0 0 auto;
  border: 1px solid #d4dfdf;
  border-radius: 7px;
  background: #fff;
  color: #27434c;
  padding: 10px 14px;
  min-height: 42px;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.punch-filter:hover {
  border-color: var(--teal);
}
.punch-filter.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.punch-results {
  margin: 0;
  font-size: 13px;
  color: #62777d;
  white-space: nowrap;
}
.punch-list-head,
.punch-row {
  display: grid;
  grid-template-columns: 28px minmax(220px, 1fr) minmax(95px, .46fr) minmax(100px, .5fr) minmax(152px, .6fr) 36px;
  align-items: center;
  gap: 16px;
  padding-left: 18px;
  padding-right: 14px;
}
.punch-list-head {
  margin: 0 0 12px;
  color: #617780;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.punch-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.punch-row {
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
  border: 1px solid #d8e3e2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 4px #12374706;
}
.punch-row:focus-within {
  border-color: var(--teal);
}
.punch-completion-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #789097;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}
.punch-completion-indicator.is-complete {
  background: #267b69;
  border-color: #267b69;
}
.punch-task-name {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #102d38;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.punch-task-name:hover .punch-task-text {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.punch-item-number {
  flex: 0 0 auto;
  min-width: 22px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 650;
  color: #657d84;
}
.punch-task-text,
.punch-row-location,
.punch-row-assignee {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.punch-row-location,
.punch-row-assignee {
  color: #344f59;
  font-size: 15px;
}
.punch-row-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: start;
  max-width: 100%;
  min-height: 29px;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: .1px;
  white-space: nowrap;
}
.punch-row-status.open {
  color: #244e55;
  background: #e5efee;
}
.punch-row-status.in_progress {
  color: #865410;
  background: #fff0cc;
}
.punch-row-status.awaiting_verification {
  color: #66488c;
  background: #eee7f7;
}
.punch-row-status.completed {
  color: #256a54;
  background: #e4f2e9;
}
.punch-status-symbol {
  display: none;
}
.punch-open-details,
.punch-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #4e6972;
  background: transparent;
  cursor: pointer;
}
.punch-open-details:hover,
.punch-detail-close:hover {
  background: #edf4f1;
  color: var(--teal);
}
.punch-screen button:focus-visible,
.punch-screen input:focus-visible,
.punch-screen select:focus-visible,
.punch-details-dialog button:focus-visible,
.punch-details-dialog a:focus-visible {
  outline: 3px solid #26877c;
  outline-offset: 3px;
}
.punch-list-hint {
  margin: 18px 3px 0;
  color: #60777e;
  font-size: 13px;
  line-height: 1.5;
}
.punch-empty {
  padding: 34px 24px;
  border: 1px solid #d8e3e2;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}
.punch-empty h2 {
  margin: 0 0 8px;
  color: #143b47;
  font: 700 20px system-ui, sans-serif;
}
.punch-empty p {
  color: #617780;
  margin: 0 0 18px;
}
.punch-dialog-open {
  overflow: hidden;
}
.punch-details-dialog {
  width: min(720px, calc(100% - 32px));
  max-width: none;
  max-height: min(900px, calc(100dvh - 48px));
  padding: 0;
  border: 1px solid #cfdddb;
  border-radius: 16px;
  background: #fff;
  color: #17313b;
  box-shadow: 0 20px 90px #062c3b44;
  overflow: hidden;
}
.punch-details-dialog[open] {
  display: flex;
  flex-direction: column;
}
.punch-details-dialog::backdrop {
  background: #102f3c99;
}
.punch-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 26px 28px 22px;
  border-bottom: 1px solid #e0e8e5;
}
.punch-detail-header > div {
  min-width: 0;
}
.punch-detail-eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.punch-detail-header h2 {
  margin: 0 0 12px;
  font: 700 27px/1.25 system-ui, sans-serif;
  color: #123c48;
  overflow-wrap: anywhere;
}
.punch-detail-header h2:focus {
  outline: none;
}
.punch-detail-close {
  width: 44px;
  margin: -6px -8px 0 0;
}
.punch-detail-body {
  padding: 24px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  scrollbar-gutter: stable;
}
.punch-detail-body h3 {
  margin: 0 0 10px;
  color: #214551;
  font-size: 14px;
  font-weight: 750;
}
.punch-detail-description p,
.punch-detail-comment p {
  margin: 0;
  color: #304b55;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.punch-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin: 24px 0 0;
}
.punch-detail-fields dt {
  margin-bottom: 6px;
  color: #647d82;
  font-size: 12px;
  font-weight: 600;
}
.punch-detail-fields dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.punch-detail-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e2eae7;
}
.punch-detail-section .punch-detail-fields {
  margin-top: 14px;
}
.punch-detail-empty {
  margin: 0;
  color: #667c83;
  font-size: 14px;
}
.punch-detail-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.punch-detail-photo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--teal);
  font-size: 12px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.punch-detail-photo:hover {
  text-decoration: underline;
}
.punch-detail-photo img,
.punch-photo-file {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #d5e2de;
  border-radius: 7px;
  object-fit: cover;
}
.punch-photo-file {
  display: grid;
  place-items: center;
  background: #edf4f1;
}
.punch-detail-photo small {
  color: #607a80;
  font-size: 12px;
}
.punch-detail-comment + .punch-detail-comment {
  border-top: 1px solid #e4ebe8;
  margin-top: 14px;
  padding-top: 14px;
}
.punch-detail-comment small {
  display: block;
  margin-top: 6px;
  color: #647c83;
  font-size: 12px;
}
.punch-detail-record {
  border-top: 1px solid #e2eae7;
  padding-top: 22px;
}
.punch-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.punch-detail-actions button {
  min-height: 44px;
}
.punch-detail-actions .punch-delete-action {
  color: #9b3c35;
  border-color: #e2c9c6;
}
.punch-detail-error {
  margin: 14px 0 0;
  color: #a53e34;
  font-size: 14px;
}
.punch-detail-footer {
  padding: 18px 28px;
  border-top: 1px solid #dce6e2;
  background: #f8fbf9;
}
.punch-detail-footer button {
  display: block;
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 700;
}
@container (max-width: 1060px) {
  .punch-toolbar-actions {
    flex: 1 0 100%;
    justify-content: flex-end;
  }
}
@container (max-width: 820px) {
  .punch-list-head {
    display: none;
  }
  .punch-row {
    grid-template-columns: 28px minmax(0, 1fr) 156px 36px;
    gap: 12px;
  }
  .punch-row-location,
  .punch-row-assignee {
    display: none;
  }
  .punch-task-name {
    gap: 9px;
    font-size: 17px;
  }
}
@container (max-width: 560px) {
  .punch-job-field,
  .punch-search-field {
    flex: 1 0 100%;
  }
  .punch-toolbar {
    gap: 9px;
  }
  .punch-toolbar-actions {
    justify-content: flex-start;
    gap: 8px;
  }
  .punch-toolbar-actions button {
    flex: 1 1 auto;
    font-size: 12px;
    padding: 10px 11px;
  }
  .punch-toolbar-actions #new-punch {
    flex: 1 0 100%;
    font-size: 14px;
  }
  .punch-filter-bar {
    margin-bottom: 16px;
    gap: 10px;
  }
  .punch-filter {
    font-size: 13px;
    padding: 9px 12px;
  }
  .punch-row {
    grid-template-columns: 23px minmax(0, 1fr) 25px 28px;
    gap: 8px;
    min-height: 66px;
    padding: 10px 11px;
  }
  .punch-task-name {
    font-size: 16px;
  }
  .punch-item-number {
    display: none;
  }
  .punch-completion-indicator {
    width: 20px;
    height: 20px;
  }
  .punch-row > .punch-row-status {
    padding: 0;
    width: 25px;
    height: 29px;
    background: transparent;
  }
  .punch-row .punch-status-symbol {
    display: inline;
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
  }
  .punch-row .punch-status-text {
    display: none;
  }
  .punch-open-details {
    width: 28px;
  }
}
@media (max-width: 600px) {
  .punch-details-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 12px;
  }
  .punch-detail-header {
    padding: 20px 20px 18px;
  }
  .punch-detail-header h2 {
    font-size: 23px;
  }
  .punch-detail-body {
    padding: 20px;
  }
  .punch-detail-fields {
    gap: 18px 16px;
  }
  .punch-detail-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .punch-detail-footer {
    padding: 14px 20px max(14px, env(safe-area-inset-bottom));
  }
}
