/* ============================================================================
   INVOICE-FORWARDING.CSS — scoped styles for js/invoice-forwarding.js
   Only what shared classes (.data-table, .metric-card, .tab-*, .btn) don't cover:
   status banner, metrics grid, toolbar, status dot, badges, modal, settings.
   ============================================================================ */

.if-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }

.if-status { margin: 12px 0; padding: 10px 14px; border-radius: var(--r-md); font-size: 13px; }
.if-status-info    { background: var(--surface-alt, #f1f5f9); color: var(--text); }
.if-status-ok      { background: rgba(34,197,94,.12); color: var(--success, #16a34a); }
.if-status-error   { background: rgba(239,68,68,.12); color: var(--danger, #dc2626); }

.if-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }

.if-toolbar { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.if-toolbar .search-input { margin-left: auto; max-width: 220px; }

.if-table { width: 100%; }
.if-strong { font-weight: 600; }
.if-small { font-size: 12px; }
.if-muted { color: var(--text-muted); }
.if-code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-alt, #f1f5f9); padding: 2px 6px; border-radius: 4px; }
.if-error-cell { color: var(--danger, #dc2626); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.if-ok-text { color: var(--success, #16a34a); }

.if-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.if-dot-on { background: var(--success, #22c55e); }
.if-dot-off { background: var(--text-muted, #94a3b8); }

.if-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.if-badge-sent    { background: rgba(34,197,94,.15); color: var(--success, #166534); }
.if-badge-failed  { background: rgba(239,68,68,.15); color: var(--danger, #991b1b); }
.if-badge-skipped { background: var(--surface-alt, #f3f4f6); color: var(--text-muted, #6b7280); }

.if-center { text-align: center; margin-top: 12px; }
.if-center-right { display: flex; justify-content: flex-end; margin-top: 8px; }

/* Settings */
.if-settings { max-width: 640px; }
.if-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; margin: 16px 0; }
.if-card h3 { margin: 0 0 12px; font-size: 15px; }
.if-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.if-row:last-child { border-bottom: 0; }
.if-row-title { display: block; font-size: 13px; font-weight: 600; }
.if-row-sub { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Modal (self-contained — v5 has no shared modal system) */
.if-modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.if-modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg, 0 10px 40px rgba(0,0,0,.2)); width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column; }
.if-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.if-modal-head h3 { margin: 0; font-size: 15px; }
.if-modal-x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-muted); }
.if-modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.if-modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.if-spacer { flex: 1; }

.if-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
.if-field input, .if-field textarea { padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; background: var(--surface); color: var(--text); }
.if-field textarea { resize: vertical; }
.if-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.if-danger { color: var(--danger, #dc2626); }

@media (max-width: 720px) {
  .if-metrics { grid-template-columns: repeat(2, 1fr); }
  .if-grid2 { grid-template-columns: 1fr; }
}
