:root{
  --igp-primary:#0EA968;
  --igp-primary-dark:#0C8A50;
  --igp-primary-soft:#E6F7EF;
  --igp-ink:#101828;
  --igp-body:#475467;
  --igp-line:#E4E7EC;
  --igp-surface:#FFFFFF;
  --igp-surface-soft:#F8FAFC;
  --igp-danger:#D92D20;
  --igp-danger-soft:#FEF3F2;
  --igp-radius:14px;
  --igp-shadow:0 4px 20px rgba(16,24,40,.06);
  --igp-shadow-lg:0 12px 32px rgba(16,24,40,.10);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--igp-ink);
  background:var(--igp-surface);
  line-height:1.55;
}

/* ── Hard reset, scoped to our own roots, so no theme/global-styles CSS
   can leak font sizes, margins, or list styling into our design. Two
   roots: #igp-app (public tool/site pages) and #igp-account-app (the
   member backoffice, which also embeds this same tool). ── */
#igp-app, #igp-account-app,
#igp-app *, #igp-account-app *{
  box-sizing:border-box !important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif !important;
}
#igp-app h1,#igp-app h2,#igp-app h3,#igp-app h4,#igp-app h5,#igp-app h6,
#igp-app p,#igp-app ul,#igp-app ol,#igp-app li,#igp-app figure,#igp-app blockquote,
#igp-account-app h1,#igp-account-app h2,#igp-account-app h3,#igp-account-app h4,#igp-account-app h5,#igp-account-app h6,
#igp-account-app p,#igp-account-app ul,#igp-account-app ol,#igp-account-app li,#igp-account-app figure,#igp-account-app blockquote{
  margin:0;padding:0;
}
#igp-app ul,#igp-app ol,#igp-account-app ul,#igp-account-app ol{list-style:none !important}
#igp-app a,#igp-account-app a{text-decoration:none}
#igp-app button,#igp-account-app button{font:inherit;cursor:pointer}
#igp-app img,#igp-app svg,#igp-account-app img,#igp-account-app svg{max-width:100%;display:inline-block;vertical-align:middle}
#igp-app input,#igp-app textarea,#igp-app select,#igp-account-app input,#igp-account-app textarea,#igp-account-app select{font-family:inherit}
#igp-app ::selection,#igp-account-app ::selection{background:var(--igp-primary-soft);color:var(--igp-ink)}

a{color:var(--igp-primary-dark);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{color:var(--igp-ink);line-height:1.2;margin:0 0 .5em}
img{max-width:100%}

.igp-container{max-width:1320px;margin:0 auto;padding:0 24px}
.igp-narrow{max-width:760px}

/* ── Buttons ── */
.igp-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 22px;border-radius:10px;font-size:14px !important;font-weight:700;
  border:1.5px solid transparent !important;cursor:pointer;transition:all .15s ease;
  text-decoration:none;
}
.igp-btn:hover{text-decoration:none}
.igp-btn[disabled]{opacity:.6;cursor:not-allowed;pointer-events:none}
.igp-btn-primary{background:var(--igp-primary) !important;color:#fff !important}
.igp-btn-primary:hover{background:var(--igp-primary-dark) !important}
.igp-btn-ghost{background:#fff !important;color:var(--igp-ink) !important;border-color:var(--igp-line) !important}
.igp-btn-ghost:hover{border-color:var(--igp-primary) !important}

/* ── Header ── */
.igp-header{
  position:sticky;top:0;z-index:50;background:#fff;
  border-bottom:1px solid var(--igp-line);
}
.igp-header-inner{display:flex;align-items:center;justify-content:space-between;height:62px}
.igp-logo{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size:17px !important;color:var(--igp-ink)}
.igp-logo:hover{text-decoration:none}
.igp-logo-accent{color:var(--igp-primary)}

.igp-nav{display:flex;align-items:center;gap:22px}
.igp-nav-link{color:var(--igp-body);font-weight:600;font-size:13px !important}
.igp-nav-link:hover,.igp-nav-link.is-active{color:var(--igp-ink);text-decoration:none}
.igp-cta{padding:9px 16px !important;font-size:13px !important}

.igp-burger{display:none;flex-direction:column;justify-content:center;gap:4px;width:34px;height:34px;background:none;border:none;cursor:pointer}
.igp-burger span{display:block;height:2px;width:22px;background:var(--igp-ink);border-radius:2px}

.igp-lang-btn{display:inline-flex !important;align-items:center;gap:6px;background:var(--igp-surface-soft);border:1px solid var(--igp-line);border-radius:8px;padding:8px 12px !important;font-size:13px !important;font-weight:600;color:var(--igp-ink);cursor:pointer}

/* ── Language modal (popup, flags removed to avoid font-rendering issues) ── */
.igp-lang-overlay{
  display:none;position:fixed;inset:0;z-index:200;
  background:rgba(16,24,40,.5);
  align-items:center;justify-content:center;
  padding:20px;
}
.igp-lang-overlay.is-open{display:flex !important}
.igp-lang-modal{
  background:#fff;border-radius:16px;max-width:520px;width:100%;
  max-height:80vh;display:flex;flex-direction:column;
  box-shadow:var(--igp-shadow-lg);
}
.igp-lang-modal-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 22px;border-bottom:1px solid var(--igp-line);flex:0 0 auto;
}
.igp-lang-modal-head h3{font-size:18px !important;font-weight:800}
.igp-lang-modal-close{
  width:30px;height:30px;border-radius:8px;display:inline-flex !important;
  align-items:center;justify-content:center;font-size:14px !important;
  color:var(--igp-body);cursor:pointer;
}
.igp-lang-modal-close:hover{background:var(--igp-surface-soft)}
.igp-lang-modal-grid{
  display:grid !important;grid-template-columns:repeat(3,1fr);gap:6px;
  padding:16px;overflow-y:auto;
}
.igp-lang-modal-item{
  display:flex !important;align-items:center;
  padding:10px 12px !important;border-radius:8px;
  font-size:14px !important;font-weight:500;color:var(--igp-ink);
  white-space:nowrap !important;
}
.igp-lang-modal-item:hover{background:var(--igp-surface-soft);text-decoration:none}
.igp-lang-modal-item.is-active{background:var(--igp-primary-soft);color:var(--igp-primary-dark);font-weight:700}

/* ── Hero ── */
.igp-hero{background:var(--igp-surface-soft);border-bottom:1px solid var(--igp-line);padding:40px 0 30px;text-align:left;position:relative}
.igp-hero-inner{max-width:900px;position:relative;padding-right:36px}
.igp-hero h1{font-size:clamp(22px,3.4vw,34px) !important;font-weight:800;line-height:1.25;margin-bottom:10px !important}
.igp-hero-tagline{font-size:18px !important;font-weight:700 !important;color:var(--igp-ink) !important;margin-bottom:14px !important}
.igp-hero p{color:var(--igp-body);font-size:15px;margin:0 0 10px !important}
.igp-hero p:last-child{margin-bottom:0 !important}
/* Lets the user dismiss the intro text (heading + paragraphs) if they
   don't need it, on both desktop and mobile — remembered via
   localStorage so it stays closed on their next visit. */
.igp-hero-close{
  position:absolute;top:0;right:0;width:28px;height:28px;
  display:flex;align-items:center;justify-content:center;
  border:none;background:transparent;border-radius:6px;
  font-size:14px;line-height:1;color:var(--igp-body);cursor:pointer;
}
.igp-hero-close:hover{background:rgba(16,24,40,.06);color:var(--igp-ink)}
.igp-hero.is-dismissed{display:none}

.igp-page-hero{background:var(--igp-surface-soft);border-bottom:1px solid var(--igp-line);padding:36px 0 26px;text-align:center}
.igp-page-hero h1{font-size:clamp(22px,3.4vw,30px) !important;font-weight:800}
.igp-page-hero p{color:var(--igp-body)}
.igp-updated{font-size:13px;color:#98A2B3}

.igp-page-section{padding:36px 0}

/* ── 404 page ── */
.igp-404-code{font-size:clamp(48px,10vw,84px);font-weight:800;line-height:1;color:var(--igp-primary);margin-bottom:6px}
.igp-404-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}

/* ── Language strip ── */
.igp-tool-section{padding:26px 0 8px}
.igp-tool-container{max-width:1200px}
.igp-lang-strip{display:flex !important;flex-flow:row wrap !important;align-items:flex-start;gap:6px;margin-bottom:16px}
.igp-chip{
  display:inline-flex !important;
  flex:0 0 auto !important;
  width:auto !important;
  height:auto !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:4px;
  padding:5px 11px !important;
  border-radius:20px;
  font-size:12px !important;
  line-height:1.3 !important;
  font-weight:600;
  border:1.5px solid var(--igp-line);
  color:var(--igp-body);
  white-space:nowrap !important;
}
.igp-chip:hover{border-color:var(--igp-primary);color:var(--igp-primary-dark);text-decoration:none}
.igp-chip.is-active{background:var(--igp-primary);border-color:var(--igp-primary);color:#fff}

/* ── Invoice card ── */
.igp-inv-card{background:#fff;border:1px solid var(--igp-line);border-radius:var(--igp-radius);padding:clamp(16px,3vw,28px);box-shadow:var(--igp-shadow);margin-bottom:40px}
.igp-inv-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.igp-logo-preview{position:relative;display:inline-block;margin-bottom:8px;padding:8px;border:1.5px solid var(--igp-line);border-radius:8px;background:#fff}
.igp-logo-preview img{max-height:56px;max-width:160px;object-fit:contain;display:block}
.igp-logo-remove{
  position:absolute !important;top:-9px;left:-9px;
  width:20px;height:20px;
  display:flex !important;align-items:center;justify-content:center;
  border-radius:50% !important;
  background:#101828 !important;color:#fff !important;
  font-size:11px !important;line-height:1 !important;
  border:2px solid #fff !important;
  cursor:pointer;padding:0 !important;margin:0 !important;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
}
.igp-logo-remove:hover{background:var(--igp-danger) !important}
.igp-logo-label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-size:12px !important;color:var(--igp-body);border:1.5px dashed var(--igp-line);border-radius:8px;padding:6px 12px}
.igp-inv-label{font-size:clamp(18px,3vw,26px) !important;font-weight:900;color:var(--igp-ink);letter-spacing:2px}

.igp-field-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--igp-body);margin-bottom:8px;line-height:16px}

/* ── Editable headings (labels the user can rename in place, e.g. "Bill
   To", "Description", "Subtotal" — everything except Currency) ──
   Deliberately uses box-shadow (not border-bottom) for the dashed-
   underline affordance: a real border adds to the element's box height,
   so an editable label would end up fractionally taller than a plain
   one beside it (e.g. Currency's) — enough to make a CSS grid row
   stretch that column and visibly shift its control down. box-shadow
   draws the same line without taking up any layout space. */
.igp-editable-label{
  cursor:text;border-radius:4px;padding:0 3px;margin:0 -3px;
  outline:none;overflow-wrap:anywhere;
  box-shadow:0 1px 0 0 transparent;
  transition:background-color .1s ease,box-shadow .1s ease;
}
.igp-editable-label:hover{box-shadow:0 1px 0 0 var(--igp-line)}
.igp-editable-label:focus{box-shadow:0 1px 0 0 var(--igp-primary);background:var(--igp-primary-soft)}
/* iOS Safari auto-zooms (and scrolls/"shifts" the page) the moment a
   focused editable element's font-size is under 16px — true for every
   heading here (11–13px). Bumping it to 16px only while focused stops
   that zoom without changing how the label looks the rest of the time. */
.igp-editable-label:focus:not(.igp-inv-label){font-size:16px !important}

.igp-textarea,.igp-input{display:block;width:100%;margin:0;padding:10px 12px;border:1.5px solid var(--igp-line);border-radius:8px;font-size:16px;font-family:inherit;box-sizing:border-box;background:#fff;color:var(--igp-ink)}
.igp-textarea{resize:vertical;min-height:90px}
.igp-input:focus,.igp-textarea:focus{outline:none;border-color:var(--igp-primary)}
/* Definitive fix for the Currency field sitting lower than the fields
   beside it: a native <select> reserves its own internal chrome/space
   for the dropdown arrow, sized by the browser rather than by our CSS,
   which is what kept shifting its content regardless of padding/line-
   height tweaks. Removing that native appearance and drawing our own
   arrow makes it use exactly the same box model as a plain input —
   equal 10px top/bottom padding on both, nothing else touched. */
#igp-inv-currency{
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23475467'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:10px 6px;
  padding-right:36px;
  line-height:normal;
}

/* ── Two-column invoice header layout ──────────────────────────────
   Left: From / Bill To / Ship To, stacked. Right: Invoice #, Date,
   Payment Terms, Due Date, PO Number, Currency — each a compact
   "label + input" row, all sharing the same fixed label width so
   every input lines up (equal-width rows, not a 4-across grid). */
.igp-inv-columns{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-bottom:24px}
/* Aligns Invoice #'s input with FROM's textarea at the top: the left
   column's label sits above its textarea (adding its own height first)
   while the right column's label sits beside its input on the same
   line, so without this the right column starts noticeably higher. */
.igp-inv-col-right{margin-top:16px}
.igp-inv-col-left > div{margin-bottom:20px}
.igp-inv-col-left > div:last-child{margin-bottom:0}

.igp-meta-row{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-bottom:14px}
.igp-inv-col-right .igp-meta-row:last-child{margin-bottom:0}
.igp-meta-row .igp-field-label{
  flex:0 0 116px;max-width:116px;height:auto !important;line-height:normal !important;
  margin-bottom:0 !important;box-sizing:border-box !important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.igp-meta-row .igp-input{flex:1 1 140px;min-width:0}
.igp-meta-row .igp-editable-label{margin:0 !important}
/* Real iOS Safari renders a date input's value as a longer localized
   string ("25 Jul 2026") than a same-size plain text value — that
   native rendering doesn't shrink below its own content's width no
   matter how little room the row gives it. A smaller font (still
   comfortably legible) is the only lever that actually reduces how
   much room it needs. */
.igp-meta-row input[type="date"]{font-size:16px}

.igp-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-bottom:12px}
.igp-table{width:100%;border-collapse:collapse;min-width:480px}
.igp-table thead tr{background:var(--igp-surface-soft)}
.igp-table th{padding:10px 12px;text-align:left;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--igp-body);border-bottom:2px solid var(--igp-line);white-space:nowrap}
.igp-th-qty{text-align:center;width:70px}
.igp-th-price,.igp-th-total{text-align:right;width:110px}
.igp-th-del{width:36px}
.igp-table td{padding:6px 8px;border-bottom:1px solid #f0f2f5}
.igp-line-cell{text-align:right;font-family:ui-monospace,Menlo,monospace;font-weight:700;font-size:16px;color:var(--igp-ink);white-space:nowrap;padding:6px 10px}

.igp-add-row{width:100%;padding:11px;background:none;border:1.5px dashed #c9cfd8;border-radius:8px;cursor:pointer;color:var(--igp-body);font-size:13px;font-weight:600;margin-bottom:20px}
.igp-add-row:hover{border-color:var(--igp-primary);color:var(--igp-primary-dark)}

.igp-totals-wrap{display:flex;justify-content:flex-end;margin-bottom:20px}
.igp-totals{width:100%;max-width:360px}
.igp-totals-row{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px;color:var(--igp-body);margin-bottom:8px}
.igp-totals-inputs{gap:12px;flex-wrap:wrap}
.igp-totals-toggles{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px}
.igp-chip-toggle{display:inline-flex !important;align-items:center;padding:5px 8px !important;border-radius:16px;font-size:12px !important;font-weight:600;color:var(--igp-primary-dark);background:var(--igp-primary-soft);border:1px solid transparent !important;cursor:pointer}
.igp-chip-toggle:hover{background:var(--igp-primary);color:#fff}
.igp-totals-input{display:flex;align-items:center;gap:8px;flex:1}
.igp-totals-input span{white-space:nowrap;min-width:84px;flex:0 0 auto}
.igp-totals-input input{width:70px;padding:6px 8px;border:1.5px solid var(--igp-line);border-radius:6px;font-size:16px;text-align:center}
.igp-field-remove{display:inline-flex !important;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50% !important;background:var(--igp-surface-soft) !important;color:var(--igp-danger) !important;font-size:11px !important;border:none !important;cursor:pointer;padding:0 !important;flex:0 0 auto}
.igp-field-remove:hover{background:var(--igp-danger) !important;color:#fff !important}
.igp-unit-badge{
  display:inline-flex !important;align-items:center;justify-content:center;
  min-width:22px !important;max-width:none;padding:2px 6px;border-radius:6px;
  background:var(--igp-surface-soft);color:var(--igp-body);
  font-size:12px !important;font-weight:700;flex:0 0 auto;white-space:nowrap;
}
.igp-unit-toggle{
  display:inline-flex !important;align-items:center;justify-content:center;
  width:24px;height:24px;border-radius:6px;border:1.5px solid var(--igp-line) !important;
  background:#fff !important;color:var(--igp-body);cursor:pointer;padding:0 !important;flex:0 0 auto;
}
.igp-unit-toggle:hover{background:var(--igp-primary-soft) !important;border-color:var(--igp-primary) !important;color:var(--igp-primary-dark)}
.igp-totals-lines{border-top:1px solid var(--igp-line);padding-top:10px}
.igp-totals-disc #igp-inv-discv{color:var(--igp-primary-dark)}
.igp-totals-grand{font-size:20px;font-weight:800;color:var(--igp-ink);border-top:2px solid var(--igp-primary);padding-top:8px;margin-top:4px}
.igp-totals-grand span:last-child{font-family:ui-monospace,Menlo,monospace}

.igp-notes{margin-bottom:20px}
.igp-inv-actions{display:flex;gap:10px;flex-wrap:wrap}
.igp-inv-actions .igp-btn{flex:1;min-width:160px}

.igp-inv-footer{display:none;margin-top:32px;padding-top:14px;border-top:2px solid var(--igp-line);text-align:center;font-size:12px;color:var(--igp-body)}
.igp-inv-footer a{color:var(--igp-primary-dark) !important;font-weight:600}

/* ── Thank-you panel (shown after the PDF auto-downloads) ── */
.igp-thanks-panel{background:#fff;border:1px solid var(--igp-line);border-radius:var(--igp-radius);padding:clamp(28px,5vw,48px);box-shadow:var(--igp-shadow);margin-bottom:40px;text-align:center}
.igp-thanks-icon{width:64px;height:64px;margin:0 auto 20px;border-radius:50%;background:var(--igp-primary-soft);display:flex;align-items:center;justify-content:center;color:var(--igp-primary-dark)}
.igp-thanks-icon svg{width:32px;height:32px}
.igp-thanks-title{text-align:center !important;font-size:clamp(20px,3vw,26px);font-weight:800;color:var(--igp-ink);margin:0 0 12px}
.igp-thanks-body{width:100% !important;max-width:480px;margin:0 auto 28px !important;text-align:center !important;color:var(--igp-body);font-size:14px;line-height:1.6}
.igp-thanks-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.igp-thanks-actions .igp-btn{flex:0 1 200px;min-width:160px}

/* ── Ad zones (empty/hidden unless configured in wp-admin → Ad Settings) ── */
.igp-ad-zone{max-width:1200px;margin:0 auto;padding:0 20px 28px;text-align:center}
.igp-ad-label{display:block;font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--igp-body);opacity:.6;margin-bottom:6px}
.igp-ad-slot{display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:0}
.igp-ad-sidebar{max-width:none;padding:0}
.igp-tool-with-sidebar{display:flex;gap:28px;align-items:flex-start;max-width:1200px;margin:0 auto;padding:0 24px;box-sizing:border-box}
.igp-tool-with-sidebar .igp-tool-container{flex:1 1 auto;min-width:0;max-width:none;padding:0}
.igp-tool-sidebar-col{flex:0 0 300px;position:sticky;top:20px}
.igp-tool-sidebar-col .igp-ad-zone{max-width:none;padding:0}
@media (max-width:900px){
  /* Sidebar column drops out entirely on mobile, so the form container
     must fall back to exactly the same padding/centering it uses when
     no sidebar ad is configured at all — otherwise it would lose its
     side margins and touch the screen edges only on this specific
     configuration, which is exactly the kind of regression we don't want. */
  .igp-tool-with-sidebar{display:block;padding:0;max-width:none}
  .igp-tool-with-sidebar .igp-tool-container{padding:0 24px;max-width:1200px;margin:0 auto}
  .igp-tool-sidebar-col{display:none}
}

/* ── Features ── */
.igp-features{padding:44px 0;background:var(--igp-surface-soft);border-top:1px solid var(--igp-line);border-bottom:1px solid var(--igp-line)}
.igp-features h2{text-align:center;font-size:22px !important;margin-bottom:20px !important}
.igp-features-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.igp-feature-card{background:#fff;border:1px solid var(--igp-line);border-radius:var(--igp-radius);padding:20px}
.igp-feature-icon{width:28px !important;height:28px !important;margin-bottom:10px}
.igp-feature-icon svg{width:100% !important;height:100% !important;display:block !important}
.igp-feature-card h3{font-size:15px !important;margin-bottom:5px;font-weight:700}
.igp-feature-card p{font-size:13px !important;color:var(--igp-body);margin:0;line-height:1.5}

/* ── FAQ ── */
.igp-faq{padding:44px 0}
.igp-faq-inner{max-width:720px}
.igp-faq h2{font-size:22px !important;margin-bottom:20px}
.igp-faq-item{border-bottom:1px solid var(--igp-line)}
.igp-faq-q{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:16px 0;background:none;border:none;text-align:left;cursor:pointer;font-family:inherit;font-size:15px;font-weight:700 !important;color:var(--igp-ink)}
.igp-faq-q:hover{color:var(--igp-primary-dark)}
.igp-faq-icon{flex:0 0 auto;width:18px;height:18px;color:var(--igp-primary-dark);transition:transform .2s ease}
.igp-faq-item.is-open .igp-faq-icon{transform:rotate(180deg)}
.igp-faq-a-wrap{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease}
.igp-faq-item.is-open .igp-faq-a-wrap{grid-template-rows:1fr}
.igp-faq-a{overflow:hidden;min-height:0}
.igp-faq-a p{margin:0 0 16px;color:var(--igp-body);font-size:13px !important;line-height:1.5}

/* ── Legal pages ── */
.igp-legal h2{font-size:18px;margin-top:28px}
.igp-legal h3{font-size:16px;margin-top:20px}
.igp-legal p,.igp-legal li{color:var(--igp-body);font-size:15px}
.igp-legal ul,.igp-legal ol{padding-left:20px}
.igp-legal li{margin-bottom:6px}

/* ── Contact page layout ── */
.igp-contact-narrow{max-width:1200px}

/* ── History page ── */
.igp-history-narrow{max-width:1100px}
.igp-history-toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:20px}
.igp-history-search{position:relative;flex:1 1 280px;min-width:200px}
.igp-history-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--igp-body);pointer-events:none}
.igp-history-search input{width:100%;padding:11px 14px 11px 38px;border:1.5px solid var(--igp-line);border-radius:8px;font-size:16px;font-family:inherit;box-sizing:border-box;background:#fff;color:var(--igp-ink)}
.igp-history-search input:focus{outline:none;border-color:var(--igp-primary)}
.igp-history-toolbar-actions{display:flex;gap:10px;flex-wrap:wrap}
.igp-history-toolbar-actions .igp-btn{padding:10px 18px}

.igp-history-table-wrap{background:#fff;border:1px solid var(--igp-line);border-radius:var(--igp-radius);overflow:hidden;margin-bottom:20px}
.igp-history-table{width:100%;border-collapse:collapse}
.igp-history-table th{text-align:left;padding:12px 16px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--igp-body);border-bottom:1px solid var(--igp-line);background:var(--igp-surface-soft)}
.igp-history-table td{padding:14px 16px;border-bottom:1px solid var(--igp-line);font-size:14px;color:var(--igp-ink);vertical-align:middle}
.igp-history-table tr:last-child td{border-bottom:none}
.igp-history-table a{color:var(--igp-primary-dark);font-weight:600}
.igp-history-table a:hover{text-decoration:underline}
.igp-history-del{background:none;border:none;cursor:pointer;color:#D92D20;padding:4px;display:flex;align-items:center;border-radius:6px}
.igp-history-del:hover{background:#FEF3F2}
.igp-history-del svg{width:16px;height:16px}
.igp-history-empty{padding:32px 16px;text-align:center;color:var(--igp-body);font-size:14px}

.igp-history-warning{display:flex;align-items:flex-start;gap:10px;background:#FFFAEB;border:1px solid #FEDF89;border-radius:var(--igp-radius);padding:14px 16px;margin-bottom:20px;font-size:13px;color:#93540C;line-height:1.5}
.igp-history-warning svg{flex:0 0 auto;width:18px;height:18px;margin-top:1px}

.igp-history-erase-btn{color:#D92D20 !important;border-color:#FDA29B !important}
.igp-history-erase-btn:hover{background:#FEF3F2 !important;border-color:#D92D20 !important}

@media (max-width:600px){
  .igp-history-table thead{display:none}
  .igp-history-table tr{display:block;border-bottom:1px solid var(--igp-line);padding:12px 16px}
  .igp-history-table td{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:none;font-size:13px}
  .igp-history-table td::before{content:attr(data-label);font-weight:700;color:var(--igp-body);flex:0 0 auto}
}
.igp-contact-layout{display:grid;grid-template-columns:1fr 1.3fr;gap:48px;align-items:start}
.igp-contact-info h2{font-size:22px;margin-bottom:12px}
.igp-contact-info > p{color:var(--igp-body);font-size:15px;margin-bottom:24px;line-height:1.6}
.igp-contact-meta{border-top:1px solid var(--igp-line);padding-top:16px}
.igp-contact-meta h3{font-size:14px;font-weight:700;margin-bottom:4px}
.igp-contact-meta p{color:var(--igp-body);font-size:14px;margin:0}

/* ── Contact form ── */
.igp-form{background:#fff;border:1px solid var(--igp-line);border-radius:var(--igp-radius);padding:28px;box-shadow:var(--igp-shadow)}
.igp-form-row select{width:100%;padding:11px 13px;border:1.5px solid var(--igp-line);border-radius:8px;font-size:16px;font-family:inherit;box-sizing:border-box;background:#fff}
.igp-form-row select:focus{outline:none;border-color:var(--igp-primary)}
.igp-form-row{margin-bottom:16px}
.igp-form-row label{display:block;font-size:13px;font-weight:700;color:var(--igp-body);margin-bottom:6px}
.igp-form-row input,.igp-form-row textarea{width:100%;padding:11px 13px;border:1.5px solid var(--igp-line);border-radius:8px;font-size:16px;font-family:inherit;box-sizing:border-box}
.igp-form-row input:focus,.igp-form-row textarea:focus{outline:none;border-color:var(--igp-primary)}
.igp-hp-field{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.igp-alert{padding:16px 18px;border-radius:10px;margin-bottom:20px;font-size:14px}
.igp-alert-success{background:var(--igp-primary-soft);color:var(--igp-primary-dark);border:1px solid var(--igp-primary)}
.igp-alert-error{background:var(--igp-danger-soft);color:var(--igp-danger);border:1px solid #fda29b}

/* ── Footer ── */
.igp-footer{background:var(--igp-surface-soft);border-top:1px solid var(--igp-line);padding:48px 0 0;margin-top:40px}
.igp-footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:32px;padding-bottom:32px}
.igp-footer-col h4{font-size:13px;text-transform:uppercase;letter-spacing:.5px;color:var(--igp-ink);margin-bottom:14px}
.igp-footer-col p{color:var(--igp-body);font-size:14px;margin-top:12px}
.igp-footer-col ul{list-style:none;padding:0;margin:0}
.igp-footer-col li{margin-bottom:9px}
.igp-footer-col a{color:var(--igp-body);font-size:14px}
.igp-footer-col a:hover{color:var(--igp-primary-dark)}
.igp-footer-langs{
  display:flex !important;flex-direction:column !important;flex-wrap:nowrap !important;
  max-height:160px;overflow-y:auto;overflow-x:hidden;
  gap:8px !important;padding-right:6px;
}
.igp-footer-langs li{margin-bottom:0 !important}
.igp-footer-langs a{font-size:13px !important;white-space:nowrap}
.igp-footer-bottom{border-top:1px solid var(--igp-line);padding:18px 0;font-size:13px;color:#98A2B3;text-align:center}

/* ── Responsive ── */
@media (max-width:900px){
  .igp-features-grid{grid-template-columns:1fr 1fr}
  .igp-footer-grid{grid-template-columns:1fr 1fr}
  .igp-contact-layout{grid-template-columns:1fr;gap:28px}
}
@media (max-width:768px){
  .igp-burger{display:flex}
  .igp-nav{
    position:absolute;top:68px;left:0;right:0;background:#fff;
    border-bottom:1px solid var(--igp-line);flex-direction:column;align-items:flex-start;
    padding:16px 20px;gap:16px;display:none;box-shadow:var(--igp-shadow-lg);
  }
  .igp-nav.is-open{display:flex}
  .igp-lang-btn{width:100%;justify-content:center}
  .igp-lang-modal-grid{grid-template-columns:repeat(2,1fr)}
  .igp-cta{width:100%}
  .igp-inv-columns{grid-template-columns:1fr !important;gap:20px !important}
  .igp-inv-col-right{margin-top:0}
}

@media (max-width:480px){
  .igp-features-grid,.igp-footer-grid{grid-template-columns:1fr}
  .igp-lang-modal-grid{grid-template-columns:1fr}
}
/* Only genuinely tiny/rare screens get smaller toggle chips — real
   phone widths (360px+) keep the normal, comfortable size. If a
   translated label set (e.g. Portuguese "Imposto"/"Desconto") is too
   long to fit on one line, the row wraps to a second line instead of
   shrinking the text, since shrinking made the buttons uncomfortably
   small on ordinary phones. */
@media (max-width:344px){
  .igp-totals-toggles{gap:4px}
  .igp-chip-toggle{padding:4px 8px !important;font-size:11px !important}
}

/* ── Print (invoice PDF output) ──
   #igp-print-frame is kept off-screen (not display:none, so it still
   renders and can be measured) at all times, using the exact same sizing
   the printed page will use. igpInvPrint() measures it, scales it down
   with a CSS transform if needed so it always fits a single A4 page, and
   only then triggers window.print(). */
#igp-print-frame{
  position:fixed;top:0;left:0;visibility:hidden;pointer-events:none;z-index:-1;
}
#igp-print-frame .igp-inv-card{
  display:block;box-shadow:none;border:none;
  border-radius:0;padding:15mm 12mm;width:210mm;box-sizing:border-box;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#fff;
}
/* Fixed, non-"vw" size: the base rule's clamp(18px,3vw,26px) resolves
   against the real printed page box on desktop (~24px) but against the
   phone's narrow screen width when mobile captures this off-screen node
   for its PDF (bottoming out at 18px) — same real print width, two
   different label sizes. Pinning it removes that platform difference. */
#igp-print-frame .igp-inv-label{font-size:24px !important}
#igp-print-frame .igp-inv-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px}
#igp-print-frame .igp-inv-col-left > div{margin-bottom:14px}
#igp-print-frame .igp-meta-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}
#igp-print-frame .igp-meta-row .igp-field-label{flex:0 0 104px;max-width:104px;height:auto !important;line-height:normal !important;margin-bottom:0 !important}
#igp-print-frame .igp-meta-row .igp-input{flex:1 1 auto}
#igp-print-frame table{width:100%;border-collapse:collapse}
#igp-print-frame th{background:#f4f5f7;padding:8px 10px;font-size:11px;font-weight:700;color:#5e6c84;border-bottom:2px solid #dfe1e6;text-align:left}
#igp-print-frame td{padding:7px 10px;border-bottom:1px solid #f0f0f0;font-size:12px}
#igp-print-frame .igp-line-cell{text-align:right;font-family:monospace;font-weight:700;font-size:16px;color:var(--igp-ink)}
#igp-print-frame button,#igp-print-frame .igp-logo-label{display:none}
#igp-print-frame .igp-inv-footer{display:block;margin-top:24px;padding-top:12px;border-top:2px solid #e2e8f0;text-align:center;font-size:11px;color:#6b778c}

@media print{
  @page{margin:0;size:A4}
  body > *{display:none !important}
  #igp-print-frame{
    display:block !important;position:static !important;
    visibility:visible !important;pointer-events:auto !important;
  }
  #igp-print-frame *{visibility:visible !important}
  *{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important}
}

/* ── Membership additions: pricing table, forms, upgrade banner chip ── */
.igp-pricing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;max-width:820px;margin:0 auto}
.igp-pricing-card{background:var(--igp-surface);border:1px solid var(--igp-line);border-radius:var(--igp-radius);padding:28px 24px;position:relative}
.igp-pricing-card h2{margin:0 0 4px;font-size:20px}
.igp-pricing-featured{border-color:var(--igp-primary);box-shadow:var(--igp-shadow-lg)}
.igp-pricing-badge{position:absolute;top:-12px;right:20px;background:var(--igp-primary);color:#fff;font-size:11px;font-weight:700;padding:4px 10px;border-radius:20px;letter-spacing:.02em}
.igp-pricing-price{font-size:32px;font-weight:800;color:var(--igp-ink);margin:6px 0}
.igp-pricing-price span{font-size:14px;font-weight:400;color:var(--igp-body)}
.igp-pricing-alt{color:var(--igp-body);font-size:13px;margin:-6px 0 14px}
.igp-pricing-list{list-style:none;padding:0;margin:0 0 20px;display:flex;flex-direction:column;gap:10px}
.igp-pricing-list li{color:var(--igp-body);font-size:14px;line-height:1.5;display:flex;align-items:flex-start;gap:10px;padding-left:0}
.igp-pricing-list li::before{content:"✓";flex:0 0 16px;width:16px;color:var(--igp-primary);font-weight:700;line-height:1.5}
.igp-pricing-cta{display:block;text-align:center;width:100%}

.igp-form-row{margin-bottom:14px;display:flex;flex-direction:column;gap:6px}
.igp-form-row label{font-size:13px;font-weight:600;color:var(--igp-body)}
.igp-hp-field{position:absolute !important;left:-9999px !important;width:1px;height:1px;overflow:hidden}

/* ── VRN field, VAT rate presets, hidden GBP-only currency select ───── */
.igp-hidden-field{display:none}
.igp-vrn-row{margin-top:10px}
.igp-vrn-row .igp-input{width:100%}
.igp-field-hint{font-size:11.5px;color:var(--igp-body);margin:4px 0 0;line-height:1.4}
.igp-vat-presets{display:inline-flex;gap:4px;margin:0 4px}
.igp-vat-preset{
  border:1px solid var(--igp-line);background:var(--igp-surface-soft);color:var(--igp-body);
  font-size:11px;font-weight:600;padding:3px 7px;border-radius:6px;cursor:pointer;line-height:1;
}
.igp-vat-preset:hover{background:var(--igp-primary-soft);color:var(--igp-primary-dark);border-color:var(--igp-primary)}

/* ── Member plan-limit notice on the public tool's Print button ─────── */
.igp-member-limit-notice{
  margin-top:10px;padding:10px 14px;background:#FFF7ED;border:1px solid #FED7AA;color:#9A3412;
  border-radius:10px;font-size:13.5px;font-weight:600;
}
.igp-member-limit-notice a{color:#9A3412;text-decoration:underline}
.igp-btn-disabled{opacity:.5;cursor:not-allowed;pointer-events:none}

/* ── Save-to-account status (shown only inside My Account) ──────────── */
.igp-save-status{margin-top:8px;padding:8px 12px;border-radius:8px;font-size:13px;font-weight:600}
.igp-save-status.is-ok{background:var(--igp-primary-soft);color:var(--igp-primary-dark)}
.igp-save-status.is-error{background:var(--igp-danger-soft);color:var(--igp-danger)}
