/* Pelican Loyalty: clear separation between open scans and completed point bookings. */

.staff-scan-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 18px;
  margin-top: 4px;
}

.staff-scan-lane {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.staff-scan-lane-pending {
  box-shadow: 0 0 0 1px rgba(20, 20, 20, .025);
}

.staff-scan-lane-processed {
  background: var(--soft);
}

.staff-scan-lane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.staff-scan-lane-head strong,
.staff-scan-lane-head span {
  display: block;
}

.staff-scan-lane-head strong {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
}

.staff-scan-lane-head > div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.staff-scan-lane-head .staff-lane-count {
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
}

.staff-scan-lane-head .staff-lane-count-done {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.staff-scan-lane #scan-queue,
.staff-processed-scan-list {
  gap: 10px;
}

.staff-processed-item {
  border-style: solid;
  background: #fff;
}

.staff-added-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}

.staff-processed-status {
  font-weight: 800;
}

.staff-processed-item .queue-actions {
  align-items: center;
}

.staff-processed-item [data-add-more-processed] {
  white-space: nowrap;
}

.staff-card-undo {
  white-space: nowrap;
  border-color: rgba(180, 35, 24, .24);
  color: var(--danger);
}

.staff-card-undo:hover {
  border-color: var(--danger);
}

.staff-processed-empty {
  background: rgba(255, 255, 255, .7);
}

.staff-today-processed {
  background: var(--soft);
}

.staff-today-added-badge {
  margin-left: 6px;
}

.staff-processed-actions {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  align-items: center;
  gap: 8px;
}

.staff-processed-more-controls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.staff-processed-more-controls.hidden {
  display: none;
}

/* Keep status metadata inline so Refresh and Logout sit on the same visual axis. */
.staff-header-actions.staff-header-actions-polished {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.staff-header-actions-polished .system-live-status {
  order: 1;
}

.staff-header-actions-polished .staff-last-refresh-inline {
  order: 2;
  margin: 0 6px 0 0;
  align-self: center;
  line-height: 1.2;
}

.staff-header-actions-polished .staff-refresh-group {
  order: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.staff-header-actions-polished .staff-refresh-group .staff-refresh-button {
  margin: 0;
}

.staff-header-actions-polished #logout {
  order: 4;
  margin: 0;
}

@media (max-width: 980px) {
  .staff-scan-lanes {
    grid-template-columns: 1fr;
  }

  .staff-scan-lane-processed {
    order: 2;
  }
}

@media (max-width: 760px) {
  .staff-header-actions.staff-header-actions-polished {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
  }

  .staff-header-actions-polished .system-live-status,
  .staff-header-actions-polished .staff-last-refresh-inline,
  .staff-header-actions-polished .staff-refresh-group,
  .staff-header-actions-polished #logout {
    width: auto;
    align-self: center;
  }

  .staff-header-actions-polished .staff-last-refresh-inline {
    justify-self: start;
    margin: 0;
  }
}

@media (max-width: 620px) {
  .staff-scan-lane {
    padding: 13px;
  }

  .staff-scan-lane-head strong {
    font-size: 18px;
  }

  .staff-processed-item .queue-actions,
  .staff-processed-item [data-add-more-processed] {
    width: 100%;
  }

  .staff-processed-actions {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    justify-items: stretch;
  }

  .staff-processed-actions > .btn {
    width: 100%;
  }

  .staff-processed-more-controls {
    width: 100%;
    justify-content: stretch;
  }

  .staff-processed-more-controls .btn {
    flex: 1 1 calc(50% - 6px);
  }

  .staff-header-actions.staff-header-actions-polished {
    grid-template-columns: 1fr auto;
  }

  .staff-header-actions-polished .system-live-status {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .staff-header-actions-polished .staff-last-refresh-inline {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }

  .staff-header-actions-polished .staff-refresh-group {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
  }

  .staff-header-actions-polished #logout {
    grid-column: 2;
    grid-row: 2;
  }

  .staff-header-actions-polished .staff-refresh-button,
  .staff-header-actions-polished #logout {
    width: 100%;
  }
}
