/* facture.css - customer billing portal, styled to sit inside the medinix.ca
   site chrome (loaded alongside css/style.css). Navy/blue palette, Bricolage
   headings, the site nav + footer + .btn-primary/.btn-secondary. */

.portal-main { max-width: 760px; margin: 0 auto; padding: 44px 20px 72px; }
.portal-main h1, .portal-main h2 { font-family: var(--font-display); color: #fff; letter-spacing: .3px; }
.portal-main h1 { font-size: 26px; margin: 0 0 6px; }
.portal-lead { color: var(--muted); margin: 0 0 26px; }

/* Cards / surfaces */
.portal-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 26px;
}
.portal-card + .portal-card { margin-top: 18px; }

/* Form fields */
.pf-field { margin-bottom: 14px; }
.pf-field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pf-field input {
  width: 100%; box-sizing: border-box; padding: 11px 12px; font-size: 15px;
  color: #fff; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16); border-radius: 7px;
}
.pf-field input::placeholder { color: rgba(255,255,255,.35); }
.pf-field input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(86,180,211,.25); }
.portal-error { color: #fca5a5; font-size: 14px; min-height: 1.2em; margin-top: 10px; }

/* Invoice document */
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.inv-seller strong { color: #fff; font-size: 16px; }
.inv-seller span { color: var(--muted); font-size: 13px; }
.inv-meta { color: var(--muted); font-size: 14px; margin: 2px 0 16px; }
.inv-badge { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.inv-badge.sent { color: #93c5fd; background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.5); }
.inv-badge.paid { color: #86efac; background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.5); }
.inv-badge.void { color: #fca5a5; background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.5); text-decoration: line-through; }

table.inv-lines { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 14px; }
table.inv-lines th, table.inv-lines td { text-align: left; padding: 9px 8px; border-bottom: 1px solid rgba(255,255,255,.10); }
table.inv-lines th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
table.inv-lines td.num, table.inv-lines th.num { text-align: right; white-space: nowrap; }
table.inv-lines tr.inv-total td { border-bottom: none; font-size: 16px; color: #fff; padding-top: 14px; }
.inv-notes { color: var(--muted); font-size: 13px; margin-top: 14px; }

.portal-pay { margin-top: 22px; text-align: center; }
.portal-pay .btn-primary { font-size: 16px; padding: 14px 34px; }

/* Confirmation page */
.portal-confirm { text-align: center; max-width: 520px; margin: 0 auto; }
.confirm-check {
  width: 72px; height: 72px; margin: 8px auto 18px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 38px; line-height: 72px;
  box-shadow: 0 8px 28px rgba(22,163,74,.4);
}
.portal-confirm h1 { font-size: 28px; }
.confirm-card { text-align: left; margin: 24px 0; }
.confirm-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.confirm-row:last-child { border-bottom: none; }
.confirm-row span { color: var(--muted); }
.confirm-row strong { color: #fff; }
.confirm-row code { color: var(--cyan); font-size: 12px; word-break: break-all; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

@media (max-width: 480px) {
  .portal-main { padding: 28px 14px 56px; }
  .confirm-actions .btn-primary, .confirm-actions .btn-secondary { width: 100%; text-align: center; }
}

/* Printable invoice: drop site chrome, white paper */
@media print {
  nav, footer, .portal-pay, .confirm-actions, .portal-lead { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .portal-card { border: none; background: #fff; padding: 0; }
  .portal-main h1, .portal-main h2, .inv-seller strong, table.inv-lines tr.inv-total td, .confirm-row strong { color: #000 !important; }
  .inv-meta, .inv-seller span, table.inv-lines th, .inv-notes { color: #333 !important; }
  table.inv-lines th, table.inv-lines td { border-color: #ccc !important; }
}
