/*
 * ALM-877 — homeowner-facing receipts triage queue.
 *
 * Keeps the home surface's warm palette and dot-paper backdrop while
 * leaning on the same `home__btn--*` button vocabulary so the visual
 * weight is consistent with the rest of the authenticated app.
 */

.receipts {
  --rc-bg: #FEFCF8;
  --rc-fg: #2A2520;
  --rc-fg-muted: #5C5347;
  --rc-accent: #2C4A3E;
  --rc-rule: rgba(44, 74, 62, 0.12);
  --rc-row-bg: #FFFFFF;
  --rc-row-bg-unassigned: #FFF8E6;
  --rc-pill-bg: #F1ECE0;
  --rc-pill-fg: #3A332B;
  --rc-pill-unassigned-bg: #FBE3A2;
  --rc-pill-unassigned-fg: #6B4A00;
  --rc-pill-danger-bg: #FAE0DA;
  --rc-pill-danger-fg: #6B2C1F;
  --rc-danger: #B85440;

  background: var(--rc-bg);
  color: var(--rc-fg);
  min-height: calc(100vh - 64px);
  padding: 32px 24px 96px;
  max-width: 880px;
  margin: 0 auto;
}

.receipts__hero { margin-bottom: 24px; }
.receipts__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rc-accent);
  margin: 0 0 4px;
}
.receipts__title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.receipts__subtitle {
  color: var(--rc-fg-muted);
  margin: 0;
  line-height: 1.5;
}

.receipts__section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rc-fg-muted);
  margin: 24px 0 12px;
}

.receipts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.receipts__row {
  background: var(--rc-row-bg);
  border: 1px solid var(--rc-rule);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.receipts__row--unassigned { background: var(--rc-row-bg-unassigned); }

.receipts__row-main { display: grid; gap: 6px; }
.receipts__row-headline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}
.receipts__vendor { font-weight: 600; font-size: 1rem; }
.receipts__amount { font-weight: 600; font-variant-numeric: tabular-nums; }

.receipts__row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--rc-fg-muted);
  font-size: 0.875rem;
  align-items: center;
}

.receipts__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--rc-pill-bg);
  color: var(--rc-pill-fg);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.receipts__pill--unassigned {
  background: var(--rc-pill-unassigned-bg);
  color: var(--rc-pill-unassigned-fg);
}
.receipts__pill--pending {
  background: #E6F0EA;
  color: var(--rc-accent);
}
.receipts__pill--failed {
  background: var(--rc-pill-danger-bg);
  color: var(--rc-pill-danger-fg);
}

.receipts__row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* `button_to` wraps the submit in a <form> — kill default form margins
   so the action group lays out as a single row. */
.receipts__row-actions form { margin: 0; }

.receipts__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.receipts__btn--primary {
  background: var(--rc-accent);
  color: #FFFFFF;
}
.receipts__btn--primary:hover { background: #234038; }
.receipts__btn--danger {
  background: transparent;
  border-color: var(--rc-danger);
  color: var(--rc-danger);
}
.receipts__btn--danger:hover { background: var(--rc-danger); color: #FFFFFF; }
.receipts__btn--secondary {
  border-color: var(--rc-accent);
  color: var(--rc-accent);
}
.receipts__btn--secondary:hover { background: rgba(44, 74, 62, 0.08); }

.receipts__upload-form { display: grid; gap: 8px; }
.receipts__upload-field {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.receipts__file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.receipts__file-input:focus-visible + label {
  outline: 2px solid var(--rc-accent);
  outline-offset: 2px;
}
.receipts__upload-hint {
  color: var(--rc-fg-muted);
  font-size: 0.875rem;
  margin: 0;
}

.receipts__empty {
  padding: 32px;
  text-align: center;
  background: var(--rc-row-bg);
  border: 1px dashed var(--rc-rule);
  border-radius: 12px;
  color: var(--rc-fg-muted);
}
.receipts__empty-headline {
  font-weight: 600;
  color: var(--rc-fg);
  margin: 0 0 8px;
}
.receipts__empty-body {
  margin: 0;
  line-height: 1.5;
}
