/* ---------- Facturación (modules/billing.js) ---------- */
.bill-note { margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.bill-help { margin: 0; color: var(--text2); font-size: 13px; line-height: 1.5; max-width: 70ch; }
.bill-err { margin-top: 4px; color: var(--red); font-size: 12.5px; line-height: 1.4; max-width: 46ch; white-space: normal; }
.bill-warn { color: var(--amber); }

/* The route each delivered order follows: the one memorable piece of this screen. */
.bill-flow { padding: 0; overflow: hidden; }
.bill-flow-route { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.3fr) 40px minmax(0, 1fr); align-items: stretch; padding: 22px 24px; gap: 0; }
.bill-node { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.bill-node-k { font-size: 12px; color: var(--text3); font-weight: 500; }
.bill-node-v { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; }
.bill-node.is-us { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bill-node.is-us .bill-node-k { color: var(--on-accent); opacity: .7; font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.bill-node.is-target { background: var(--surface); border-width: 2px; border-color: var(--text); }
.bill-arrow { position: relative; align-self: center; height: 2px; margin: 0 6px; background: var(--border-strong, var(--text3)); }
.bill-arrow::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--border-strong, var(--text3)); border-right: 0; }
.bill-flow-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.bill-flow-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.bill-flow-meta .bill-err { margin: 0; }
.bill-flow-actions { display: flex; gap: 8px; }

.bill-providers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bill-provider { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: auto; padding: 14px 16px; text-align: left; white-space: normal; border-radius: 12px; background: var(--surface); }
.bill-provider strong { font-size: 15px; font-weight: 600; }
.bill-provider span { font-size: 12.5px; color: var(--text2); font-weight: 400; line-height: 1.45; }
.bill-provider.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.bill-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.bill-form > .bill-help, .bill-options, .bill-form-actions { grid-column: 1 / -1; }
.bill-form small { font-weight: 400; color: var(--text3); }
.bill-options { display: flex; gap: 24px; flex-wrap: wrap; }
.bill-options .field { gap: 8px; }
.bill-tax { max-width: 160px; }
.bill-form-actions { display: flex; justify-content: flex-end; }

.bill-toolbar { justify-content: space-between; flex-wrap: wrap; }
.bill-toolbar-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bill-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); cursor: pointer; }
#billMonth { height: 30px; font-size: 12.5px; width: auto; }
.bill-cb { width: 36px; }
#billPendingTable input[type=checkbox], .bill-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.section-label .count { font-size: 12.5px; color: var(--text3); font-weight: 500; }

.bill-export-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.bill-export-row .field { width: 180px; }
.bill-export-formats { align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.bill-export-k { font-size: 12.5px; color: var(--text3); margin-right: 4px; }
.bill-countries { margin-left: 8px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--text3); }
.bill-pay { max-width: 280px; }
.bill-pay small { font-size: 12px; color: var(--text3); }

.chip.bill-order { margin-left: 6px; cursor: pointer; }

@media (max-width: 900px) {
  .bill-flow-route { grid-template-columns: 1fr; gap: 0; padding: 18px; }
  .bill-arrow { justify-self: center; width: 2px; height: 22px; margin: 4px 0; }
  .bill-arrow::after { right: auto; left: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 7px solid var(--border-strong, var(--text3)); border-bottom: 0; }
  .bill-providers, .bill-form { grid-template-columns: 1fr; }
}
