/* ATEC work management: compact card summaries and trailing add tiles. */
/* Mobile-first: full-width title row, clear summary row, no squeezed columns. */
.site-card .siteHeadline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 0;
}
.site-card .siteTitleBlock { min-width: 0; flex: 1; }
.site-card .siteTitleBlock .site-title {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 19px;
  line-height: 1.4;
}
.site-card .siteTitleBlock p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #76818b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.site-card .sitePct {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid #f1dce4;
  border-radius: 9px;
  padding: 6px 10px;
  background: #fff8fb;
  white-space: nowrap;
}
.site-card .sitePctLabel { font-size: 10px; color: #a05f75; }
.site-card .sitePct {
  border-color: #b9e7cf;
  background: #eaf8f0;
}
.site-card .sitePctLabel { color: #15734b; }
.site-card .sitePct strong { color: #15734b; font-size: 16px; font-weight: 800; }
.site-card .sitePct.hasIssues {
  border-color: #f1dce4;
  background: #fff8fb;
}
.site-card .sitePct.hasIssues .sitePctLabel { color: #a05f75; }
.site-card .sitePct.hasIssues strong { color: #ce0051; }
.site-card .siteSummary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #eef0f3;
  margin: 12px 0 9px;
  padding-top: 10px;
  line-height: 1.5;
}
.site-card .siteSummary > span {
  flex: none;
  color: #4f5a65;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.site-card .siteSummary .cardbottom {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
  color: #76818b;
}
.site-card .siteSummary .cardbottom > span:first-child { white-space: nowrap; }
.site-card .siteSummary .cardbottom .pill {
  font-size: 10px;
  padding: 3px 6px;
  white-space: nowrap;
}
.site-card > .bar { height: 5px; }
.site-card .siteSecondary { margin-top: 10px; padding-top: 9px; }

/* Keep device identity at left and both completion lines at right. */
.deviceCard {
  display: flex;
  flex-direction: column;
  padding: 16px 17px;
}
.deviceCard .deviceCardTop {
  gap: 8px;
}
.deviceCard .deviceCardMain {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 12px;
}
.deviceCard .deviceCardIdentity {
  flex: 0 0 36%;
  min-width: 0;
}
.deviceCard .devicePassage {
  margin: 2px 0 5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.deviceCard .deviceCardIdentity h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.deviceCard .deviceCardIdentity h3 small {
  display: inline-block;
  margin-left: 4px;
}
.deviceCard .deviceQuickStats {
  min-width: 0;
  flex: 1;
}
.deviceCard .deviceQuickStat + .deviceQuickStat {
  margin-top: 10px;
}
.deviceCard .deviceQuickStat .deviceProgress {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  margin: 0 0 5px;
  font-size: 10px;
  line-height: 1.25;
}
.deviceCard .deviceQuickStat .deviceProgress span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.deviceCard .deviceQuickStat .deviceProgress strong {
  white-space: nowrap;
  font-size: 10px;
}
.deviceCard .deviceQuickStat .bar {
  height: 4px;
}
.deviceCard .deviceCardActions {
  margin-top: 15px;
}
.deviceCard .legacyNote {
  margin: 12px 0 0;
}

/* Last slot: a dotted card with a single prominent + action. */
.site-grid > .addGhostCard,
.deviceGrid > .addGhostCard {
  width: 100%;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1.5px dashed #cbd2dc;
  border-radius: 11px;
  background: rgba(255,255,255,.40);
  color: #67717e;
  padding: 18px;
  text-align: center;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.site-grid > .addGhostCard:hover,
.deviceGrid > .addGhostCard:hover,
.site-grid > .addGhostCard:focus-visible,
.deviceGrid > .addGhostCard:focus-visible {
  background: #fff7fa;
  border-color: #db7097;
  color: #ba0049;
}
.site-grid > .addGhostCard:active,
.deviceGrid > .addGhostCard:active {
  transform: scale(.99);
}
.addGhostCircle {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #e7c3d1;
  border-radius: 50%;
  background: #fff6fa;
  color: #d70051;
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(215,0,81,.06);
}
.addGhostLabel {
  font-size: 13px;
  font-weight: 700;
}
.addGhostHint {
  font-size: 10px;
  font-weight: 400;
  color: #8c939e;
}
.addGhostCard:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.deviceAddChoices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 8px;
}
.deviceAddChoices button {
  min-height: 70px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ecc4d5;
  color: #bd004a;
  background: #fff7fa;
  font-size: 14px;
}
@media (max-width: 640px) {
  .site-card .siteTitleBlock .site-title { font-size: 18px; }
  .site-card .siteSummary > span { font-size: 10px; }
  .site-card .siteSummary .cardbottom { font-size: 10px; }
  .deviceCard .deviceCardMain { gap: 10px; margin-top: 9px; }
  .deviceCard .deviceCardIdentity { flex-basis: 37%; }
  .deviceCard .deviceCardIdentity h3 { font-size: 20px; }
  .deviceCard .deviceQuickStat + .deviceQuickStat { margin-top: 9px; }
  .site-grid > .addGhostCard,
  .deviceGrid > .addGhostCard { min-height: 150px; }
}
@media (max-width: 360px) {
  .site-card .siteSummary { align-items: flex-start; flex-direction: column; gap: 5px; }
  .site-card .siteSummary .cardbottom { justify-content: flex-start; }
  .site-card .sitePct { padding: 5px 7px; }
  .deviceCard .deviceCardIdentity { flex-basis: 32%; }
  .deviceCard .deviceQuickStat .deviceProgress strong { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .addGhostCard { transition: none !important; }
}

/* 2026-10-30: Each equipment card exposes its installation/setup issue total. */
.deviceCard .deviceCardTop .deviceIssueBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: none;
  margin-left: auto;
  border: 1px solid #b9e7cf;
  border-radius: 999px;
  background: #eaf8f0;
  color: #15734b;
  padding: 4px 9px;
  min-height: 28px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.deviceCard .deviceCardTop .deviceIssueBadge strong {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.deviceCard .deviceCardTop .deviceIssueBadge.hasIssues {
  border-color: #e9b7c7;
  background: #fff0f5;
  color: #bc0047;
}
.deviceCard .deviceCardTop > div { margin-left: 0; }
.scheduleContent { padding-top: 20px; }
.scheduleContent .notice-settings { margin-top: 0; }
@media (max-width: 640px) {
  .deviceCard .deviceCardTop .deviceIssueBadge { padding: 4px 7px; font-size: 10px; min-height: 27px; }
  .deviceCard .deviceCardTop .deviceIssueBadge strong { font-size: 12px; }
  .scheduleContent { padding-top: 16px; }
}
