/* invoices-view.css — Invoices module per the brief. */

.invoices-view {
  background: var(--paper);
  min-height: 100%;
}

/* ---------- Quotes / Invoices toggle ---------- */
.invoices-mode-toggle {
  display: inline-flex;
  gap: 6px;
  margin-right: 4px;
}
/* Quote statuses stay in the typographic chip system: accepted reads in
   full ink (a win), declined and expired stay muted. */
.status.accepted { color: var(--ink); font-weight: 600; }
.status.accepted::before { color: var(--ink); }

/* ---------- Yet to invoice strip ---------- */
.invoices-unbilled {
  padding: 24px 28px;
  border-bottom: 1px solid var(--rule);
}
.invoices-unbilled-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 48px;
}
.invoices-unbilled-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.invoices-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: calc(100vh - 240px);
}

/* ---------- List rail ---------- */
.invoices-list {
  border-right: 1px solid var(--rule);
  overflow-y: auto;
}
.invoices-list-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 20px 28px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background var(--dur-fast) ease;
}
.invoices-list-item:hover { background: rgba(80, 80, 80, 0.04); }
.invoices-list-item.active { background: var(--paper-2); }
.invoices-list-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.invoices-list-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
}

/* ---------- Detail pane ---------- */
.invoices-detail {
  padding: 32px 56px 56px;
}
.invoices-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  gap: 24px;
  flex-wrap: wrap;
}
.invoices-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- Big-three totals ---------- */
.invoices-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

/* ---------- Line items table ---------- */
.invoices-table {
  width: 100%;
  border-collapse: collapse;
}
.invoices-table th,
.invoices-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.invoices-table th {
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  padding-top: 10px;
  padding-bottom: 10px;
}
.invoices-table tr:hover td { background: rgba(26, 26, 26, 0.02); }
.invoices-table input.field {
  font-size: 13px;
  padding: 6px 8px;
}

/* ---------- Detail footer ---------- */
.invoices-detail-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .invoices-body {
    grid-template-columns: 1fr;
  }
  .invoices-list {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    max-height: 60vh;
  }
  .invoices-detail {
    padding: 24px 20px 56px;
  }
  .invoices-totals {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
