/* ═══════════════════════════════════════════════════════════
   CREADOR DE FACTURAS — styles.css
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:        #2563eb;
  --primary-dark:   #1d4ed8;
  --primary-light:  #dbeafe;
  --secondary:      #475569;
  --success:        #16a34a;
  --success-dark:   #15803d;
  --danger:         #dc2626;
  --danger-dark:    #b91c1c;
  --warning:        #d97706;

  --gray-50:        #f8fafc;
  --gray-100:       #f1f5f9;
  --gray-200:       #e2e8f0;
  --gray-300:       #cbd5e1;
  --gray-400:       #94a3b8;
  --gray-500:       #64748b;
  --gray-700:       #334155;
  --gray-800:       #1e293b;
  --gray-900:       #0f172a;
  --white:          #ffffff;

  --radius:         8px;
  --radius-sm:      4px;
  --radius-lg:      12px;

  --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:      0 10px 25px -3px rgba(0,0,0,.12), 0 4px 6px -2px rgba(0,0,0,.05);

  --font:           system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:      'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --transition:     150ms ease;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-700);
  background:
    radial-gradient(circle at 0 0, #e7efff 0%, rgba(231,239,255,0) 35%),
    radial-gradient(circle at 100% 0, #e8f8f1 0%, rgba(232,248,241,0) 30%),
    var(--gray-100);
  min-height: 100vh;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── App Header ────────────────────────────────────────────── */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.brand svg { flex-shrink: 0; }

/* ── Tab Navigation ────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gray-500);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.tab-btn.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
}

.tab-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.tab-icon { font-size: .9rem; }
.tab-icon svg,
.btn-icon-inline svg {
  width: 1rem;
  height: 1rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Main Content ──────────────────────────────────────────── */
.app-main {
  max-width: 1260px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

/* ── Tab Panels ────────────────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Form Toolbar ──────────────────────────────────────────── */
.form-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.card-head h2 { margin-bottom: 0; }

.card h2, .card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gray-100);
}

/* ── Layout Grids ──────────────────────────────────────────── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.four-col-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Form Controls ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-group:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  display: block;
  width: 100%;
  padding: .55rem .75rem;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--gray-800);
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

input.input-error, select.input-error, textarea.input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}

.required { color: var(--danger); margin-left: .15rem; }

.field-error {
  display: block;
  font-size: .78rem;
  color: var(--danger);
  margin-top: .3rem;
  font-weight: 500;
  min-height: 1em;
}

.block-error {
  font-size: .875rem;
  margin-bottom: .75rem;
}

/* ── Logo Upload ───────────────────────────────────────────── */
.logo-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  text-align: center;
  background: var(--gray-50);
  transition: border-color var(--transition);
}

.logo-upload-area:hover { border-color: var(--primary); }

.logo-upload-area input[type="file"] {
  border: none;
  background: transparent;
  padding: .25rem;
  box-shadow: none;
  cursor: pointer;
}

.file-hint {
  font-size: .75rem;
  color: var(--gray-400);
  margin-top: .25rem;
}

.logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .75rem;
  padding: .5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.logo-preview-img {
  max-height: 64px;
  max-width: 180px;
  object-fit: contain;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}
.btn-secondary:hover {
  background: var(--gray-700);
  border-color: var(--gray-700);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover {
  background: var(--success-dark);
  border-color: var(--success-dark);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-dark);
  border-color: var(--danger-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}

.btn-link {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  padding-left: .25rem;
  padding-right: .25rem;
  font-size: .8rem;
}
.btn-link:hover { text-decoration: underline; }

.btn-sm {
  padding: .3rem .7rem;
  font-size: .8rem;
}

/* Icon button in table */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .95rem;
  transition: background var(--transition);
}
.btn-icon.btn-danger-icon {
  background: rgba(220,38,38,.1);
  color: var(--danger);
}
.btn-icon.btn-danger-icon:hover {
  background: var(--danger);
  color: var(--white);
}
.btn-icon:focus-visible {
  outline: 2px solid var(--danger);
  outline-offset: 1px;
}

/* ── Items Table ────────────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  font-size: .875rem;
}

.items-table th {
  background: var(--gray-50);
  color: var(--gray-600, #4b5563);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .65rem .75rem;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

.items-table td {
  padding: .5rem .5rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.items-table tbody tr:hover { background: var(--gray-50); }

.col-num { width: 110px; }
.col-subtotal { width: 110px; font-weight: 600; }
.col-action { width: 44px; text-align: center; }

.item-input {
  width: 100%;
  padding: .4rem .55rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition);
}

.item-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

.item-input.input-error { border-color: var(--danger); }

.num-input { text-align: right; font-family: var(--font-mono); }

.subtotal-cell {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
}

.empty-cell {
  text-align: center;
  color: var(--gray-400);
  padding: 2rem 1rem;
  font-size: .9rem;
}

/* ── Totals ─────────────────────────────────────────────────── */
.totals-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.totals-table { min-width: 280px; }

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.totals-row:last-child { border-bottom: none; }

.totals-label {
  font-size: .875rem;
  color: var(--gray-500);
}

.totals-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .95rem;
  color: var(--gray-800);
}

.totals-discount { color: var(--danger); }

.totals-final-row {
  padding-top: .75rem;
  margin-top: .25rem;
  border-top: 2px solid var(--gray-300);
}

.totals-final-row .totals-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-800);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.totals-final-row .totals-value {
  font-size: 1.2rem;
  color: var(--primary);
}

/* ── Preview Page ───────────────────────────────────────────── */
.preview-toolbar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* ── Invoice Document ──────────────────────────────────────── */
.invoice-doc {
  background: var(--white);
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 3.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--gray-800);
}

/* Issuer + Meta header */
.inv-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--primary);
}

.inv-from { flex: 1; min-width: 0; }

.inv-logo {
  max-height: 80px;
  max-width: 200px;
  object-fit: contain;
  display: block;
  margin-bottom: .75rem;
}

.inv-company {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: .25rem;
}

.inv-from p {
  font-size: .85rem;
  color: var(--gray-500);
  margin-bottom: .15rem;
}

.inv-meta { text-align: right; flex-shrink: 0; }

.inv-title-label {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.inv-meta-tbl {
  border-collapse: collapse;
  font-size: .875rem;
  margin-left: auto;
}

.inv-meta-tbl td {
  padding: .2rem .5rem;
  color: var(--gray-600, #4b5563);
}

.inv-meta-tbl td:first-child {
  color: var(--gray-400);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: right;
}

.inv-meta-tbl td:last-child { text-align: right; font-weight: 600; }

/* Client section */
.inv-client {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 2rem;
}

.inv-client-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-400);
  margin-bottom: .35rem;
}

.inv-client-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .15rem;
}

.inv-client p {
  font-size: .85rem;
  color: var(--gray-500);
  margin-bottom: .1rem;
}

/* Items table inside invoice */
.inv-items {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .875rem;
}

.inv-items th {
  background: var(--primary);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .6rem .75rem;
  text-align: left;
}

.inv-items th.text-right { text-align: right; }

.inv-items td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--gray-100);
}

.inv-items tbody tr:last-child td { border-bottom: 2px solid var(--gray-200); }
.inv-items tbody tr:hover { background: var(--gray-50); }

.item-num { width: 30px; text-align: center; color: var(--gray-400); font-size: .8rem; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }

/* Invoice totals */
.inv-totals-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.inv-totals {
  border-collapse: collapse;
  min-width: 260px;
  font-size: .9rem;
}

.inv-totals td {
  padding: .4rem .75rem;
  border-bottom: 1px solid var(--gray-100);
}

.inv-totals td:first-child { color: var(--gray-500); }
.inv-totals td:last-child { font-family: var(--font-mono); font-weight: 600; }

.inv-total-final td {
  padding-top: .75rem;
  border-top: 2px solid var(--gray-700);
  border-bottom: none;
  font-size: 1rem;
  color: var(--gray-900);
}

/* Notes */
.inv-notes {
  border-top: 1px solid var(--gray-200);
  padding-top: 1.25rem;
  margin-top: .5rem;
}

.inv-notes h4 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: .4rem;
}

.inv-notes p {
  font-size: .875rem;
  color: var(--gray-600, #4b5563);
  line-height: 1.7;
}

/* ── History ────────────────────────────────────────────────── */
.section-header { margin-bottom: 1.5rem; }

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: .25rem;
}

.section-subtitle { font-size: .875rem; color: var(--gray-400); }

.history-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  transition: box-shadow var(--transition);
}

.history-card:hover { box-shadow: var(--shadow); }

.history-card.history-active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.history-info {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  align-items: center;
  min-width: 0;
}

.hist-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .875rem;
  color: var(--primary);
}

.hist-client {
  font-weight: 600;
  color: var(--gray-800);
  font-size: .875rem;
}

.hist-total {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--success);
  font-size: .9rem;
}

.hist-date { font-size: .8rem; color: var(--gray-400); }

.history-actions { display: flex; gap: .5rem; flex-shrink: 0; }

.empty-msg {
  text-align: center;
  color: var(--gray-400);
  padding: 3rem 1rem;
  font-size: .95rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--gray-300);
}

/* ── Settings ───────────────────────────────────────────────── */
.settings-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-start;
}

/* ── Toast Notification ─────────────────────────────────────── */
.notification {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--gray-900);
  color: var(--white);
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 250ms ease, transform 250ms ease;
  pointer-events: none;
  z-index: 9999;
  max-width: 340px;
}

.notification.show { opacity: 1; transform: translateY(0); }
.notification.notification-success { background: var(--success); }
.notification.notification-error   { background: var(--danger); }
.notification.notification-info    { background: var(--primary); }

/* ── Cards inside main layout spacing ──────────────────────── */
.card + .card,
section.card + section.card { margin-top: 0; }

section.card { margin-bottom: 1.25rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .four-col-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  body {
    background: #e9eef6;
  }
  .two-col-grid {
    grid-template-columns: 1fr;
  }
  .four-col-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-inner {
    padding: .6rem 1rem;
    min-height: 62px;
  }
  .tab-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    justify-content: stretch;
    gap: .25rem;
    padding: .45rem .55rem calc(.5rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(8px);
    z-index: 140;
  }
  .tab-btn {
    flex: 1;
    justify-content: center;
    flex-direction: column;
    gap: .2rem;
    font-size: .68rem;
    padding: .45rem .2rem;
    border-radius: 10px;
  }
  .tab-label {
    display: block;
    line-height: 1;
  }
  .tab-icon svg {
    width: 1.12rem;
    height: 1.12rem;
  }
  .app-main {
    background: var(--white);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, .2);
    padding: 1rem .9rem 5.9rem;
    min-height: calc(100vh - 68px);
  }
  .invoice-doc {
    padding: 1.5rem 1.25rem;
  }
  .inv-top {
    flex-direction: column;
    gap: 1.25rem;
  }
  .inv-meta { text-align: left; }
  .inv-meta-tbl td:first-child { text-align: left; }
  .inv-meta-tbl { margin-left: 0; }
}

@media (max-width: 480px) {
  .app-main { padding: 1rem .75rem 6rem; }
  .card { padding: 1.1rem 1rem; }
  .form-row-2 { grid-template-columns: 1fr; }
  .four-col-grid { grid-template-columns: 1fr; }
  .form-toolbar { flex-direction: column; }
  .form-toolbar .btn { width: 100%; justify-content: center; }
  .history-card { flex-direction: column; align-items: flex-start; }
  .history-actions { width: 100%; justify-content: flex-start; }
}

/* ═══════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════ */
@media print {
  @page {
    size: A4 portrait;
    margin: 15mm 18mm;
  }

  /* Hide everything except the invoice doc */
  .app-header,
  .form-toolbar,
  .preview-toolbar,
  #tab-form,
  #tab-history,
  #tab-settings,
  .notification,
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    font-size: 10pt;
    color: #000;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .app-main { max-width: 100%; padding: 0; margin: 0; }

  #tab-preview {
    display: block !important;
    padding: 0;
  }

  .invoice-doc {
    box-shadow: none;
    border-radius: 0;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .inv-top {
    border-bottom-color: #1d4ed8;
  }

  .inv-items th {
    background: #1d4ed8 !important;
    color: white !important;
  }

  .inv-title-label {
    color: #1d4ed8 !important;
  }

  /* Force page breaks for very long invoices */
  .inv-notes { page-break-inside: avoid; }
  .inv-totals-wrap { page-break-inside: avoid; }
}
