/* invoicing.css — invoices area + per-client invoice panel + invoice modal */
.invoices-area { padding: 36px 48px 64px; max-width: 1200px; margin: 0 auto; }
.invoices-head { display: flex; flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 28px; }
.invoices-head-actions { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.invoices-title {
  font-family: var(--font-display); font-size: 96px; font-weight: 800;
  letter-spacing: -0.04em; line-height: 0.9; margin: 8px 0 0;
  font-variation-settings: 'wdth' 100, 'wght' 800;
}
.invoices-stats { display: flex; gap: 0; padding: 16px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); margin-bottom: 24px; }
.invoices-stats .dirA-stat { padding: 0 28px 0 0; margin-right: 28px; border-right: 1px solid var(--border-soft); }
.invoices-stats .dirA-stat:last-child { border-right: 0; }

.invoices-table {
  width: 100%; border-collapse: collapse; margin-top: 12px;
}
.invoices-table th {
  text-align: left; font-family: var(--font-display); font-size: 11px;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 12px 12px 0; border-bottom: 2px solid var(--fg);
}
.invoices-table td {
  padding: 16px 12px 16px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.invoices-table tr { cursor: pointer; transition: background 140ms; }
.invoices-table tbody tr:hover { background: rgba(234, 229, 218, 0.5); }
.invoices-table .mono { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.invoices-empty { padding: 24px 0; color: var(--fg-subtle); font-size: 13px; text-align: center; }

/* Per-client embedded panel */
.client-invoices { padding: 24px 48px; border-top: 2px solid var(--fg); }
.client-invoices-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.client-invoice-list { list-style: none; margin: 0; padding: 0; }
.client-invoice-list li {
  display: grid; grid-template-columns: 100px 1fr auto auto; gap: 18px;
  padding: 12px 0; align-items: center; border-top: 1px solid var(--border-soft);
  cursor: pointer; transition: padding 140ms;
}
.client-invoice-list li:hover { padding-left: 6px; }
.client-invoice-list .mono { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

/* Invoice detail modal pane */
.invoice-pane {
  background: var(--bg); border: 2px solid var(--fg); box-shadow: 8px 8px 0 var(--fg);
  width: min(960px, 96vw); max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column;
  animation: pop 220ms var(--ease-out);
}
.invoice-pane > header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 2px solid var(--fg);
}
.modeswitch { display: inline-flex; border: 1.5px solid var(--fg); }
.modeswitch button {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 14px; background: transparent; border: 0; cursor: pointer;
}
.modeswitch button.active { background: var(--fg); color: var(--bg); }

.invoice-body { padding: 32px 36px 56px; overflow: auto; display: flex; flex-direction: column; gap: 22px; }
.invoice-body .invoice-print { padding-bottom: 24px; }
.invoice-body .invoice-print .footer { margin-top: 56px !important; padding-top: 24px; }
.invoice-body .invoice-print > div[style*="text-align: right"] { margin-bottom: 8px; }
.invoice-body .invoice-print table { margin: 28px 0 !important; }
.invoice-body .invoice-print .totals { margin-top: 24px !important; }
.invoice-edit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.invoice-lines { width: 100%; border-collapse: collapse; }
.invoice-lines th {
  text-align: left; font-family: var(--font-display); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  padding: 8px 8px 8px 0; border-bottom: 1.5px solid var(--fg);
}
.invoice-lines td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--border-soft); }
.invoice-lines tr.blank-line td { padding: 6px 0; border-bottom: 1px dashed var(--border-soft); background: rgba(0,0,0,0.015); }
.invoice-lines input, .invoice-lines select {
  font: inherit; font-size: 14px; background: transparent; border: 0;
  border-bottom: 1px solid var(--border-soft); padding: 4px 0; width: 100%;
  outline: none;
}
.invoice-lines input:focus, .invoice-lines select:focus { border-bottom-color: var(--fg); }

.invoice-totals { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.invoice-totals > div { display: flex; gap: 48px; min-width: 280px; justify-content: space-between; font-size: 14px; }
.invoice-total-final {
  font-family: var(--font-display); font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em; padding-top: 10px; border-top: 2px solid var(--fg); margin-top: 6px;
}

/* Picker list */
.picker-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto; border: 1.5px solid var(--fg); }
.picker-list li {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-top: 1px solid var(--border-soft); cursor: pointer;
}
.picker-list li:first-child { border-top: 0; }
.picker-list li:hover { background: var(--botf-sand); }

/* Top nav */
.dirA-nav { display: flex; gap: 4px; margin-left: 24px; }
.dirA-nav button {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 12px; border: 0; background: transparent; cursor: pointer;
  color: var(--fg-muted);
}
.dirA-nav button:hover { color: var(--fg); }
.dirA-nav button.active { color: var(--fg); border-bottom: 2px solid var(--fg); }
