/* Homebuilder frame — Invoices (office). Desktop: the card list on the left,
   the open bill on the right with its one question or one Approve button.
   Phone: the list, then the bill on its own with "All bills" to go back. */

.hm-inv-tabs { margin: 0 0 16px; }
.hm-inv-tabs .hm-tab { min-height: 48px; padding: 0 14px; font-size: 16px; }
.hm-count.is-due { color: #fff; background: #c2410c; }

.hm-inv-layout { display: grid; gap: 16px; }
.hm-inv-layout.has-detail .hm-inv-list { display: none; }
.hm-inv-layout:not(.has-detail) .hm-inv-detail { display: none; }

.hm-inv-card { display: grid; gap: 4px; padding: 14px 16px; transition: background var(--motion-fast), border-color var(--motion-fast); }
.hm-inv-card:hover { background: var(--app-surface-2); }
.hm-inv-card.is-selected { border-color: var(--app-accent); box-shadow: 0 0 0 2px var(--app-accent-soft); }
.hm-inv-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hm-inv-card-top b { font-size: 16px; color: var(--hm-ink); overflow-wrap: anywhere; }
.hm-inv-amt { flex: none; font-size: 16px; font-weight: 700; color: var(--hm-ink); font-variant-numeric: tabular-nums; }
.hm-inv-card-q { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; color: var(--hm-text); }
.hm-inv-card-q.is-q { font-weight: 700; color: #c2410c; }
.hm-inv-card small { font-size: 14px; color: var(--hm-muted); }
.hm-inv-pick { display: flex; align-items: center; gap: 8px; padding: 40px 0; font-size: 16px; color: var(--hm-muted); }

.hm-inv-doc { display: grid; gap: 14px; }
.hm-inv-dhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hm-inv-dhead h2 { margin: 0; font-size: 22px; color: var(--app-navy); overflow-wrap: anywhere; }
.hm-inv-big { font-size: 26px; font-weight: 750; color: var(--hm-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-inv-source { margin: -6px 0 0; font-size: 14px; color: var(--hm-muted); }
.hm-inv-links { margin-top: 0; }
.hm-inv-qtext { font-size: 20px !important; line-height: 1.35; }
.hm-inv-answers .hm-btn-big { min-width: 180px; }
.hm-inv-other { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; }
.hm-inv-other .hm-field { flex: 1 1 240px; }
.hm-inv-split { display: grid; gap: 8px; margin-top: 12px; }
.hm-inv-splitrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
.hm-inv-splitsum { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--hm-text); }
.hm-inv-skip { margin-top: 12px; text-align: right; }
.hm-inv-sec { padding: 14px 16px; background: var(--app-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius); }
.hm-inv-sec h3 { margin: 0 0 10px; font-size: 16px; color: var(--hm-ink); }
.hm-inv-sec .hm-section-head h3 { margin: 0; }
.hm-inv-sec .hm-section-head { margin-bottom: 10px; }
.hm-inv-quotes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hm-inv-quotes li { padding: 8px 12px; font-size: 15px; line-height: 1.5; color: var(--hm-text); background: var(--app-surface-2); border-left: 3px solid var(--hm-line-strong); border-radius: 6px; }
.hm-inv-reasons { margin: 14px 0 0; padding: 0; border: 0; }

.hm-inv-bill { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; }
.hm-inv-bill-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

@media (min-width: 1024px) {
  .hm-inv-layout, .hm-inv-layout.has-detail { grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }
  .hm-inv-layout .hm-inv-list, .hm-inv-layout .hm-inv-detail { display: block !important; }
  .hm-inv-list { position: sticky; top: 76px; max-height: calc(100dvh - 220px); overflow-y: auto; padding: 2px; }
}
