/* ============================================
   INVOICE TEMPLATES — RENDERED OUTPUT STYLES
   ============================================ */

/* All templates share a base invoice container */
.invoice-page {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0F172A;
  font-size: 13px;
  line-height: 1.5;
  background: white;
}

/* Keep logos from being squeezed by the flex header. SVG logos need width/height
   attributes (the server adds them on upload) or they collapse to 0px. */
.invoice-page .inv-logo { flex-shrink: 0; }
.invoice-page .inv-logo img { display: block; }

/* ============================================
   TEMPLATE 1: MODERN
   ============================================ */
.invoice-modern {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.invoice-modern .accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #4F46E5, #818CF8);
}

.invoice-modern .inv-content {
  padding: 48px 48px 48px 54px;
}

.invoice-modern .inv-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.invoice-modern .inv-logo img {
  max-height: 60px;
  max-width: 200px;
}

.invoice-modern .inv-title {
  text-align: right;
}

.invoice-modern .inv-title h1 {
  font-size: 32px;
  font-weight: 800;
  color: #4F46E5;
  letter-spacing: -0.03em;
  margin: 0;
}

.invoice-modern .inv-title .inv-number {
  font-size: 14px;
  color: #64748B;
  margin-top: 4px;
}

.invoice-modern .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px solid #F1F5F9;
}

.invoice-modern .inv-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
  margin-bottom: 6px;
}

.invoice-modern .inv-meta-value {
  font-size: 13px;
  color: #0F172A;
  white-space: pre-line;
}

.invoice-modern .inv-meta-value strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.invoice-modern .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.invoice-modern .inv-items-table thead th {
  background: #4F46E5;
  color: white;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.invoice-modern .inv-items-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.invoice-modern .inv-items-table thead th:last-child {
  border-radius: 0 8px 0 0;
  text-align: right;
}

.invoice-modern .inv-items-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
}

.invoice-modern .inv-items-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
}

.invoice-modern .inv-items-table tbody tr:nth-child(even) {
  background: #FAFAFF;
}

.invoice-modern .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}

.invoice-modern .inv-totals-box {
  width: 280px;
}

.invoice-modern .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.invoice-modern .inv-totals-row.final {
  border-top: 2px solid #4F46E5;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #4F46E5;
}

.invoice-modern .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid #F1F5F9;
}

.invoice-modern .inv-footer-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4F46E5;
  margin-bottom: 6px;
}

.invoice-modern .inv-footer-section p {
  font-size: 12px;
  color: #64748B;
  white-space: pre-line;
}

/* ============================================
   TEMPLATE 2: CLASSIC
   ============================================ */
.invoice-classic {
  padding: 48px;
  border: 1px solid #E2E8F0;
}

.invoice-classic .inv-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 3px solid #1E293B;
  margin-bottom: 32px;
}

.invoice-classic .inv-logo img {
  max-height: 56px;
  max-width: 200px;
}

.invoice-classic .inv-title h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1E293B;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.invoice-classic .inv-title .inv-number {
  font-size: 13px;
  color: #64748B;
  text-align: right;
  margin-top: 4px;
}

.invoice-classic .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.invoice-classic .inv-meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1E293B;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #E2E8F0;
}

.invoice-classic .inv-meta-value {
  font-size: 13px;
  color: #334155;
  white-space: pre-line;
}

.invoice-classic .inv-meta-value strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.invoice-classic .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.invoice-classic .inv-items-table thead th {
  background: #1E293B;
  color: white;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.invoice-classic .inv-items-table thead th:last-child {
  text-align: right;
}

.invoice-classic .inv-items-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #E2E8F0;
}

.invoice-classic .inv-items-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
}

.invoice-classic .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}

.invoice-classic .inv-totals-box {
  width: 280px;
  background: #F8FAFC;
  padding: 16px;
  border: 1px solid #E2E8F0;
}

.invoice-classic .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.invoice-classic .inv-totals-row.final {
  border-top: 2px solid #1E293B;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 17px;
  font-weight: 800;
}

.invoice-classic .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 2px solid #1E293B;
}

.invoice-classic .inv-footer-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1E293B;
  margin-bottom: 6px;
}

.invoice-classic .inv-footer-section p {
  font-size: 12px;
  color: #64748B;
  white-space: pre-line;
}

/* ============================================
   TEMPLATE 3: MINIMAL
   ============================================ */
.invoice-minimal {
  padding: 56px 48px;
}

.invoice-minimal .inv-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

.invoice-minimal .inv-logo img {
  max-height: 48px;
  max-width: 180px;
}

.invoice-minimal .inv-title h1 {
  font-size: 14px;
  font-weight: 400;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0;
}

.invoice-minimal .inv-title .inv-number {
  font-size: 28px;
  font-weight: 300;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.invoice-minimal .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.invoice-minimal .inv-meta-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94A3B8;
  margin-bottom: 8px;
}

.invoice-minimal .inv-meta-value {
  font-size: 13px;
  color: #334155;
  white-space: pre-line;
  font-weight: 300;
}

.invoice-minimal .inv-meta-value strong {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.invoice-minimal .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}

.invoice-minimal .inv-items-table thead th {
  padding: 12px 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94A3B8;
  text-align: left;
  border-bottom: 1px solid #E2E8F0;
}

.invoice-minimal .inv-items-table thead th:last-child {
  text-align: right;
}

.invoice-minimal .inv-items-table tbody td {
  padding: 14px 0;
  border-bottom: 1px solid #F1F5F9;
  font-weight: 300;
}

.invoice-minimal .inv-items-table tbody td:last-child {
  text-align: right;
  font-weight: 500;
}

.invoice-minimal .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 48px;
}

.invoice-minimal .inv-totals-box {
  width: 240px;
}

.invoice-minimal .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 300;
  color: #64748B;
}

.invoice-minimal .inv-totals-row span:last-child {
  color: #0F172A;
  font-weight: 400;
}

.invoice-minimal .inv-totals-row.final {
  border-top: 1px solid #0F172A;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 22px;
  font-weight: 300;
  color: #0F172A;
}

.invoice-minimal .inv-totals-row.final span:last-child {
  font-weight: 600;
}

.invoice-minimal .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid #F1F5F9;
}

.invoice-minimal .inv-footer-section h4 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94A3B8;
  margin-bottom: 8px;
}

.invoice-minimal .inv-footer-section p {
  font-size: 12px;
  color: #64748B;
  white-space: pre-line;
  font-weight: 300;
}

/* ============================================
   TEMPLATE 4: BOLD
   ============================================ */
.invoice-bold {
  padding: 0;
  overflow: hidden;
}

.invoice-bold .inv-header-bar {
  background: #0F172A;
  padding: 40px 48px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.invoice-bold .inv-header-bar .inv-logo img {
  max-height: 56px;
  max-width: 180px;
  filter: brightness(0) invert(1);
}

.invoice-bold .inv-title h1 {
  font-size: 36px;
  font-weight: 900;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.invoice-bold .inv-title .inv-number {
  font-size: 14px;
  color: #94A3B8;
  text-align: right;
  margin-top: 4px;
}

.invoice-bold .inv-body {
  padding: 36px 48px 48px;
}

.invoice-bold .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.invoice-bold .inv-meta-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0F172A;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 3px solid #0F172A;
}

.invoice-bold .inv-meta-value {
  font-size: 13px;
  color: #334155;
  white-space: pre-line;
}

.invoice-bold .inv-meta-value strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.invoice-bold .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.invoice-bold .inv-items-table thead th {
  background: #0F172A;
  color: white;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

.invoice-bold .inv-items-table thead th:last-child { text-align: right; }

.invoice-bold .inv-items-table tbody td {
  padding: 12px 16px;
  border-bottom: 2px solid #F1F5F9;
  font-weight: 500;
}

.invoice-bold .inv-items-table tbody td:last-child {
  text-align: right;
  font-weight: 700;
}

.invoice-bold .inv-items-table tbody tr:hover { background: #F8FAFC; }

.invoice-bold .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}

.invoice-bold .inv-totals-box {
  width: 280px;
  background: #0F172A;
  color: white;
  padding: 20px;
  border-radius: 8px;
}

.invoice-bold .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #CBD5E1;
}

.invoice-bold .inv-totals-row span:last-child { color: white; font-weight: 600; }

.invoice-bold .inv-totals-row.final {
  border-top: 2px solid #334155;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 20px;
  font-weight: 900;
  color: white;
}

.invoice-bold .inv-totals-row.final span:last-child { color: #FACC15; }

.invoice-bold .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 3px solid #0F172A;
}

.invoice-bold .inv-footer-section h4 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0F172A;
  margin-bottom: 6px;
}

.invoice-bold .inv-footer-section p {
  font-size: 12px;
  color: #64748B;
  white-space: pre-line;
}

/* ============================================
   TEMPLATE 5: GRADIENT
   ============================================ */
.invoice-gradient {
  padding: 0;
  overflow: hidden;
}

.invoice-gradient .inv-header-bar {
  background: linear-gradient(135deg, #EC4899, #8B5CF6, #3B82F6);
  padding: 40px 48px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.invoice-gradient .inv-header-bar .inv-logo img {
  max-height: 56px;
  max-width: 180px;
  filter: brightness(0) invert(1);
}

.invoice-gradient .inv-title h1 {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin: 0;
}

.invoice-gradient .inv-title .inv-number {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  text-align: right;
  margin-top: 4px;
}

.invoice-gradient .inv-body {
  padding: 36px 48px 48px;
}

.invoice-gradient .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.invoice-gradient .inv-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8B5CF6;
  margin-bottom: 6px;
}

.invoice-gradient .inv-meta-value {
  font-size: 13px;
  color: #334155;
  white-space: pre-line;
}

.invoice-gradient .inv-meta-value strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.invoice-gradient .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.invoice-gradient .inv-items-table thead th {
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  color: white;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.invoice-gradient .inv-items-table thead th:first-child { border-radius: 8px 0 0 0; }
.invoice-gradient .inv-items-table thead th:last-child { border-radius: 0 8px 0 0; text-align: right; }

.invoice-gradient .inv-items-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
}

.invoice-gradient .inv-items-table tbody td:last-child { text-align: right; font-weight: 600; }
.invoice-gradient .inv-items-table tbody tr:nth-child(even) { background: #FAF5FF; }

.invoice-gradient .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}

.invoice-gradient .inv-totals-box { width: 280px; }

.invoice-gradient .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.invoice-gradient .inv-totals-row.final {
  border-top: 2px solid #8B5CF6;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #8B5CF6;
}

.invoice-gradient .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid #F1F5F9;
}

.invoice-gradient .inv-footer-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8B5CF6;
  margin-bottom: 6px;
}

.invoice-gradient .inv-footer-section p {
  font-size: 12px;
  color: #64748B;
  white-space: pre-line;
}

/* ============================================
   TEMPLATE 6: EXECUTIVE
   ============================================ */
.invoice-executive {
  padding: 48px;
  border: 1px solid #D6D3D1;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.invoice-executive .inv-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 2px solid #B8860B;
  margin-bottom: 32px;
}

.invoice-executive .inv-logo img {
  max-height: 56px;
  max-width: 200px;
}

.invoice-executive .inv-title h1 {
  font-size: 28px;
  font-weight: 400;
  color: #44403C;
  font-style: italic;
  margin: 0;
}

.invoice-executive .inv-title .inv-number {
  font-size: 13px;
  color: #B8860B;
  text-align: right;
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.invoice-executive .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.invoice-executive .inv-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #B8860B;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}

.invoice-executive .inv-meta-value {
  font-size: 13px;
  color: #44403C;
  white-space: pre-line;
}

.invoice-executive .inv-meta-value strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.invoice-executive .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
}

.invoice-executive .inv-items-table thead th {
  background: #78716C;
  color: white;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.invoice-executive .inv-items-table thead th:last-child { text-align: right; }

.invoice-executive .inv-items-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #E7E5E4;
}

.invoice-executive .inv-items-table tbody td:last-child { text-align: right; font-weight: 600; }

.invoice-executive .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
  font-family: 'Inter', sans-serif;
}

.invoice-executive .inv-totals-box {
  width: 280px;
  border: 1px solid #D6D3D1;
  padding: 16px;
}

.invoice-executive .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.invoice-executive .inv-totals-row.final {
  border-top: 2px solid #B8860B;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 17px;
  font-weight: 800;
  color: #B8860B;
}

.invoice-executive .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 2px solid #B8860B;
}

.invoice-executive .inv-footer-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #B8860B;
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}

.invoice-executive .inv-footer-section p {
  font-size: 12px;
  color: #78716C;
  white-space: pre-line;
}

/* ============================================
   TEMPLATE 7: COMPACT
   ============================================ */
.invoice-compact {
  padding: 32px 36px;
  font-size: 12px;
}

.invoice-compact .inv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid #0284C7;
}

.invoice-compact .inv-logo img {
  max-height: 40px;
  max-width: 160px;
}

.invoice-compact .inv-title h1 {
  font-size: 20px;
  font-weight: 800;
  color: #0284C7;
  margin: 0;
}

.invoice-compact .inv-title .inv-number {
  font-size: 12px;
  color: #64748B;
  text-align: right;
}

.invoice-compact .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.invoice-compact .inv-meta-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0284C7;
  margin-bottom: 4px;
}

.invoice-compact .inv-meta-value {
  font-size: 11px;
  color: #334155;
  white-space: pre-line;
  line-height: 1.4;
}

.invoice-compact .inv-meta-value strong {
  font-weight: 700;
  display: block;
  margin-bottom: 1px;
}

.invoice-compact .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.invoice-compact .inv-items-table thead th {
  background: #0284C7;
  color: white;
  padding: 6px 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

.invoice-compact .inv-items-table thead th:last-child { text-align: right; }

.invoice-compact .inv-items-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 11px;
}

.invoice-compact .inv-items-table tbody td:last-child { text-align: right; font-weight: 600; }
.invoice-compact .inv-items-table tbody tr:nth-child(even) { background: #F0F9FF; }

.invoice-compact .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.invoice-compact .inv-totals-box { width: 220px; }

.invoice-compact .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 11px;
}

.invoice-compact .inv-totals-row.final {
  border-top: 2px solid #0284C7;
  margin-top: 6px;
  padding-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0284C7;
}

.invoice-compact .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
}

.invoice-compact .inv-footer-section h4 {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0284C7;
  margin-bottom: 4px;
}

.invoice-compact .inv-footer-section p {
  font-size: 10px;
  color: #64748B;
  white-space: pre-line;
}

/* ============================================
   TEMPLATE 8: CREATIVE
   ============================================ */
.invoice-creative {
  padding: 0;
  overflow: hidden;
}

.invoice-creative .inv-header-bar {
  background: linear-gradient(120deg, #F97316, #FACC15);
  padding: 40px 48px 44px;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.invoice-creative .inv-header-bar .inv-logo img {
  max-height: 56px;
  max-width: 180px;
}

.invoice-creative .inv-title h1 {
  font-size: 32px;
  font-weight: 900;
  color: white;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-creative .inv-title .inv-number {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  text-align: right;
  margin-top: 4px;
}

.invoice-creative .inv-body {
  padding: 24px 48px 48px;
}

.invoice-creative .inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.invoice-creative .inv-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #F97316;
  margin-bottom: 6px;
}

.invoice-creative .inv-meta-value {
  font-size: 13px;
  color: #334155;
  white-space: pre-line;
}

.invoice-creative .inv-meta-value strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.invoice-creative .inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.invoice-creative .inv-items-table thead th {
  background: #F97316;
  color: white;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.invoice-creative .inv-items-table thead th:first-child { border-radius: 8px 0 0 0; }
.invoice-creative .inv-items-table thead th:last-child { border-radius: 0 8px 0 0; text-align: right; }

.invoice-creative .inv-items-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #FEF3C7;
}

.invoice-creative .inv-items-table tbody td:last-child { text-align: right; font-weight: 600; }
.invoice-creative .inv-items-table tbody tr:nth-child(even) { background: #FFFBEB; }

.invoice-creative .inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}

.invoice-creative .inv-totals-box { width: 280px; }

.invoice-creative .inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.invoice-creative .inv-totals-row.final {
  border-top: 3px solid #F97316;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #F97316;
}

.invoice-creative .inv-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid #FEF3C7;
}

.invoice-creative .inv-footer-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #F97316;
  margin-bottom: 6px;
}

.invoice-creative .inv-footer-section p {
  font-size: 12px;
  color: #64748B;
  white-space: pre-line;
}
