/* Buyer validation portal — standalone page surface, not Canopy ERP */

.bv-portal {
  position: fixed; inset: 0;
  background: #f6f4ef; /* parchment-adjacent / warm neutral */
  z-index: 1200;
  display: flex; flex-direction: column;
  font-family: "Space Grotesk", "Inter", sans-serif;
  color: #0b1f1c;
  overflow: auto;
}

/* Header */
.bv-header {
  background: #0b1f1c; color: #f5f1e8;
  border-bottom: 1px solid #0b1f1c;
}
.bv-header-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 14px 28px; display: flex; align-items: center; justify-content: space-between;
}
.bv-header-brand { display: flex; align-items: center; gap: 16px; }
.bv-logo { height: 22px; filter: brightness(0) invert(1); }
.bv-header-divider { width: 1px; height: 22px; background: rgba(245,241,232,0.18); }
.bv-header-label { font-size: 12px; font-weight: 500; color: rgba(245,241,232,0.62); letter-spacing: 0.04em; text-transform: uppercase; }
.bv-header-sub { font-size: 14.5px; font-weight: 500; margin-top: 1px; letter-spacing: -0.005em; }
.bv-header-actions { display: flex; align-items: center; gap: 14px; }
.bv-secure {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: rgba(245,241,232,0.72);
  padding: 6px 12px; background: rgba(45,255,204,0.08);
  border: 1px solid rgba(45,255,204,0.2); border-radius: 999px;
}
.bv-secure svg { color: #2dffcc; }
.bv-close {
  width: 34px; height: 34px; border-radius: 8px;
  background: transparent; border: 1px solid rgba(245,241,232,0.18);
  display: grid; place-items: center; cursor: pointer;
  color: rgba(245,241,232,0.72);
  transition: all 100ms;
}
.bv-close:hover { background: rgba(245,241,232,0.08); color: #f5f1e8; }

/* Main layout */
.bv-main {
  flex: 1; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 28px 28px 48px;
  display: grid; grid-template-columns: 1.65fr 1fr; gap: 24px;
  align-items: flex-start;
}
@media (max-width: 960px) {
  .bv-main { grid-template-columns: 1fr; }
}

/* Invoice column */
.bv-invoice { display: flex; flex-direction: column; gap: 16px; }

.bv-assign-banner {
  display: flex; gap: 14px;
  padding: 16px 18px;
  background: #0b1f1c;
  color: #f5f1e8;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(11,31,28,0.18);
}
.bv-assign-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(45,255,204,0.12); color: #2dffcc;
  display: grid; place-items: center; flex-shrink: 0;
  border: 1px solid rgba(45,255,204,0.2);
}
.bv-assign-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.bv-assign-sub { font-size: 12.5px; color: rgba(245,241,232,0.72); line-height: 1.55; margin-top: 3px; }
.bv-assign-sub b { color: #f5f1e8; font-weight: 600; }

.bv-paper {
  background: #fff; border: 1px solid #e8e4d9; border-radius: 12px;
  padding: 28px 30px; box-shadow: 0 1px 2px rgba(11,31,28,0.04);
}
.bv-paper-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 18px; border-bottom: 1px solid #eae5d7;
}
.bv-paper-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6858; }
.bv-paper-id { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: #0b1f1c; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bv-paper-dates { display: flex; gap: 24px; font-size: 12px; text-align: right; }
.bv-paper-dates > div span { display: block; color: #6b6858; font-weight: 500; margin-bottom: 3px; }
.bv-paper-dates > div b { color: #0b1f1c; font-weight: 500; font-variant-numeric: tabular-nums; }

.bv-parties {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  padding: 18px 0; border-bottom: 1px solid #eae5d7;
}
.bv-party-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6858; margin-bottom: 6px; }
.bv-party-name { font-size: 14px; font-weight: 600; color: #0b1f1c; }
.bv-party-sub { font-size: 12px; color: #6b6858; margin-top: 2px; line-height: 1.5; }

.bv-lines {
  width: 100%; border-collapse: collapse;
  margin-top: 6px;
}
.bv-lines th {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #6b6858;
  text-align: left; padding: 12px 0; border-bottom: 1px solid #eae5d7;
}
.bv-lines th.num { text-align: right; }
.bv-lines td {
  font-size: 13px; padding: 12px 0;
  border-bottom: 1px solid #f1ede1; color: #0b1f1c;
}
.bv-lines td.num { text-align: right; font-variant-numeric: tabular-nums; }

.bv-totals {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 14px;
  padding-left: 50%;
}
.bv-totals-row { display: flex; justify-content: space-between; font-size: 13px; color: #3a3a33; padding: 4px 0; }
.bv-totals-row b { font-weight: 500; color: #0b1f1c; font-variant-numeric: tabular-nums; }
.bv-totals-sep { height: 1px; background: #eae5d7; margin: 4px 0; }
.bv-totals-row.total { font-size: 16px; padding-top: 6px; }
.bv-totals-row.total span { font-weight: 600; color: #0b1f1c; }
.bv-totals-row.total b { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* Payment block — replaces the usual "pay to my IBAN" footer */
.bv-pay {
  margin-top: 24px;
  border: 2px solid #0b1f1c;
  border-radius: 12px;
  background: #fafbf7;
  overflow: hidden;
}
.bv-pay-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 16px 18px 14px; background: #fff; border-bottom: 1px solid #eae5d7;
}
.bv-pay-title { font-size: 14px; font-weight: 600; color: #0b1f1c; letter-spacing: -0.005em; }
.bv-pay-sub { font-size: 12px; color: #6b6858; margin-top: 3px; }
.bv-pay-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #0b1f1c; color: #f5f1e8;
  border-radius: 999px; font-size: 11.5px; font-weight: 500;
}
.bv-pay-badge img { height: 12px; filter: brightness(0) invert(1); }

.bv-iban-grid { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.bv-iban-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 14px; }
.bv-iban-k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6b6858; }
.bv-iban-v { font-size: 13px; color: #0b1f1c; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bv-iban-v b { font-weight: 500; }
.bv-iban-vsub { color: #6b6858; font-size: 11.5px; font-weight: 400; }
.bv-iban-mono { font-family: "JetBrains Mono", Menlo, monospace; font-size: 13px; letter-spacing: 0.03em; }

.bv-iban-copy {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 6px;
  background: #0b1f1c; color: #f5f1e8; border: 0; cursor: pointer;
  font: inherit; font-size: 11.5px; font-weight: 500;
  transition: background 100ms;
}
.bv-iban-copy:hover { background: #1a3532; }

.bv-pay-warn {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 18px 14px;
  background: #fef5e7;
  border-top: 1px solid #f5e8c8;
  color: #6b3f10;
  font-size: 12px; line-height: 1.55;
}
.bv-pay-warn svg { color: #b45309; flex-shrink: 0; margin-top: 1px; }
.bv-pay-warn b { font-weight: 600; color: #6b3f10; }

.bv-footer-note {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px dashed #eae5d7;
  font-size: 11.5px; color: #6b6858; line-height: 1.6;
}

/* Sidebar — confirmation panel */
.bv-side { position: sticky; top: 28px; }
.bv-confirm {
  background: #fff; border: 1px solid #e8e4d9; border-radius: 12px;
  padding: 22px 22px 20px;
  box-shadow: 0 1px 2px rgba(11,31,28,0.04);
  display: flex; flex-direction: column; gap: 14px;
}
.bv-confirm-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6858; }
.bv-confirm-title { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; color: #0b1f1c; margin-top: 3px; }
.bv-confirm-sub { font-size: 13px; color: #3a3a33; line-height: 1.55; margin-top: 6px; }

.bv-summary {
  background: #fafbf7; border: 1px solid #eae5d7; border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
}
.bv-summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.bv-summary-row span { color: #6b6858; }
.bv-summary-row b { color: #0b1f1c; font-weight: 500; font-variant-numeric: tabular-nums; }
.bv-summary-row.big {
  margin-top: 2px; padding-top: 10px; border-top: 1px solid #eae5d7; align-items: baseline;
}
.bv-summary-row.big b { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

.bv-check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: #3a3a33; line-height: 1.55;
  padding: 12px 14px; border: 1px solid #eae5d7; border-radius: 10px;
  background: #fafbf7; cursor: pointer;
}
.bv-check input { margin-top: 2px; accent-color: #0b1f1c; flex-shrink: 0; }
.bv-check b { color: #0b1f1c; font-weight: 600; }

.bv-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px;
  background: #0b1f1c; color: #f5f1e8;
  border: 0; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em; cursor: pointer;
  transition: all 120ms;
}
.bv-btn-primary:hover { background: #1a3532; }
.bv-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.bv-btn-primary:disabled:hover { background: #0b1f1c; }

.bv-btn-secondary {
  padding: 11px 16px; background: #fafbf7; color: #0b1f1c;
  border: 1px solid #d6d2c4; border-radius: 10px;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  margin-top: 4px;
}
.bv-btn-secondary:hover { background: #f1ede1; }

.bv-spinner {
  width: 14px; height: 14px; border-radius: 999px;
  border: 2px solid rgba(245,241,232,0.25); border-top-color: #2dffcc;
  animation: bv-spin 800ms linear infinite;
}
@keyframes bv-spin { to { transform: rotate(360deg); } }

.bv-trust {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 11px; color: #6b6858; line-height: 1.5;
  padding-top: 10px; border-top: 1px dashed #eae5d7;
}
.bv-trust svg { color: #98a2b3; flex-shrink: 0; margin-top: 1px; }

.bv-altrow { display: flex; gap: 10px; }
.bv-link {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 10px; font-size: 12px; font-weight: 500;
  color: #3a3a33; background: transparent;
  border: 1px solid #eae5d7; border-radius: 8px; cursor: pointer;
  transition: all 100ms;
}
.bv-link:hover { background: #fafbf7; border-color: #d6d2c4; }
.bv-link svg { color: #6b6858; }

/* Done state */
.bv-done { text-align: center; gap: 10px; padding: 28px 22px; }
.bv-done-check {
  width: 64px; height: 64px; border-radius: 999px;
  background: #dcfce7; color: #047857;
  display: grid; place-items: center;
  margin: 0 auto 4px;
}
.bv-done-title { font-size: 20px; font-weight: 600; color: #0b1f1c; letter-spacing: -0.01em; }
.bv-done-sub { font-size: 13px; color: #3a3a33; line-height: 1.55; }
.bv-done-next {
  margin-top: 10px; text-align: left;
  background: #fafbf7; border: 1px solid #eae5d7; border-radius: 10px;
  padding: 14px 16px;
}
.bv-done-next-title { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6858; margin-bottom: 8px; }
.bv-done-next ol { margin: 0; padding-left: 18px; font-size: 12.5px; color: #3a3a33; line-height: 1.7; }
.bv-done-next b { color: #0b1f1c; font-weight: 600; }

/* Footer */
.bv-footer {
  background: transparent;
  border-top: 1px solid #eae5d7;
  padding: 18px 0;
  font-size: 11.5px; color: #6b6858;
}
.bv-footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.bv-footer-links { display: flex; gap: 18px; }
.bv-footer-links span { cursor: pointer; }
.bv-footer-links span:hover { color: #0b1f1c; }
