.ig-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
  }

  .ig-header {
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .theme-dark .ig-header {
    background: #0f172a;
    border-color: #1e293b;
  }

  .ig-action-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.25rem;
  }

  .ig-action-text p {
    color: #64748b;
    font-size: 0.95rem;
  }

  .theme-dark .ig-action-text p {
    color: #94a3b8;
  }

  .ig-print-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
  }

  .ig-print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  }

  .ig-a4-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px dashed #cbd5e1;
  }

  .theme-dark .ig-a4-wrapper {
    background: #1e293b;
    border-color: #334155;
  }

  .ig-add-row-wrap {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
  }

  .ig-add-btn {
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.9rem;
    background: #eef2ff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
  }

  .ig-add-btn:hover {
    background: #e0e7ff;
    color: #3730a3;
  }

  .invoice-document {
    background: #fff;
    width: 794px;
    min-height: 1123px;
    padding: 76px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    color: #1e293b;
    position: relative;
    transform-origin: top center;
  }

  @media (max-width: 900px) {
    .invoice-document {
      transform: scale(0.8);
      margin-bottom: -227px;
    }
  }

  @media (max-width: 600px) {
    .invoice-document {
      transform: scale(0.6);
      margin-bottom: -416px;
    }
  }

  @media (max-width: 450px) {
    .invoice-document {
      transform: scale(0.45);
      margin: -151px -151px -605px -227px;
    }
  }

  .editable {
    position: relative;
    border-bottom: 1px dashed transparent;
    transition: all 0.2s ease;
    outline: none;
    min-width: 2ch;
    display: inline-block;
  }

  .editable:hover,
  .editable:focus {
    border-bottom-color: #a5b4fc;
    background-color: #eef2ff;
    cursor: text;
    border-radius: 2px;
  }

  .editable.empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    display: inline-block;
    pointer-events: none;
    font-style: italic;
    opacity: 0.7;
    white-space: nowrap;
  }

  .editable.block {
    display: block;
  }

  .editable.block.empty::before {
    white-space: pre-wrap;
    width: 100%;
  }

  .seamless-number {
    background: #f8fafc;
    border: 1px solid transparent;
    border-bottom: 1px dashed #cbd5e1;
    outline: none;
    color: inherit;
    font-size: inherit;
    transition: all 0.2s;
    appearance: textfield;
    border-radius: 4px;
    padding: 2px;
  }

  .seamless-number::-webkit-outer-spin-button,
  .seamless-number::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
  }

  .seamless-number:hover,
  .seamless-number:focus {
    background-color: #eef2ff;
    border-color: #a5b4fc;
  }

  .seamless-input {
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
  }

  .date-picker {
    color: #334155;
    font-weight: 700;
  }

  .currency-picker {
    font-size: 1.5rem;
    font-weight: 800;
    color: #94a3b8;
    text-align: right;
  }

  .inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
  }

  .inv-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.1em;
    margin: 0 0 1rem;
  }

  .inv-meta p {
    margin: 0.25rem 0;
    font-size: 1rem;
    color: #475569;
  }

  .inv-parties {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 2rem;
  }

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

  .inv-from p,
  .inv-to p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .inv-parties h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
  }

  .inv-parties p {
    margin: 0.35rem 0;
    font-size: 1.05rem;
    color: #334155;
  }

  .ig-bold {
    font-weight: 700;
  }

  .ig-accent {
    color: #4f46e5;
    font-weight: 500;
    margin-top: 0.5rem;
  }

  .ig-muted {
    color: #64748b;
  }

  .ig-negative {
    color: #ef4444;
  }

  .ig-total-color {
    color: #4f46e5;
  }

  .ig-pre {
    font-size: 0.9rem;
    white-space: pre-wrap;
    min-height: 6rem;
    overflow-wrap: break-word;
  }

  .ig-row-flex {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .inv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    table-layout: fixed;
  }

  .inv-th-left {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 1rem;
    border-bottom: 2px solid #cbd5e1;
    text-align: left;
  }

  .inv-th-right {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 1rem;
    border-bottom: 2px solid #cbd5e1;
    text-align: right;
    white-space: nowrap;
    width: 8rem;
  }

  .inv-th-del {
    background: #f8fafc;
    border-bottom: 2px solid #cbd5e1;
    width: 2.5rem;
  }

  .inv-table td {
    padding: 0.5rem 1rem;
  }

  .ig-item-row:hover { background: #f8fafc; }

  .ig-td-desc {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .ig-td-num {
    text-align: right;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
  }

  .ig-td-total {
    font-weight: 500;
    color: #1e293b;
  }

  .ig-td-del {
    padding: 0.75rem 0 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
  }

  .ig-del-btn {
    opacity: 0;
    color: #cbd5e1;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.15s, opacity 0.15s;
    padding: 0.25rem;
  }

  .ig-item-row:hover .ig-del-btn,
  .ig-del-btn:focus {
    opacity: 1;
  }

  .ig-del-btn:hover {
    color: #ef4444;
  }

  .inv-footer {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-top: auto;
  }

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

  .inv-notes h3 {
    font-size: 0.95rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  .inv-totals {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
  }

  .tot-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    padding: 0.4rem 0;
  }

  .tot-row-sep {
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 0.5rem;
    padding-top: 0.5rem;
  }

  .tot-final {
    border-top: 2px solid #cbd5e1;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
  }

  .inv-brand-stripe {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 38px;
    width: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #3b82f6 100%);
    opacity: 0.8;
  }