/*
 * Fatoura — free document generators (public pages): the mockup's
 * 15-generators rules on top of the design system. Served by
 * GET /generateurs/assets/gx.css (versioned, cached for a year).
 */
.gx-page{ max-width:1440px; margin-inline:auto; }
.gx .lbl,.gx-page .lbl{ font-size:12px; font-weight:600; color:var(--text-2); display:block; }
.gx-h2{ font-size:20px; font-weight:800; letter-spacing:-.02em; margin:0 0 14px; }
[dir="rtl"] .gx-h2{ letter-spacing:0; }
.gx-hero{ margin-bottom:14px; }
.gx-trust{ display:grid; grid-template-columns:repeat(2,minmax(0,auto)); gap:8px; position:relative; }
.gx-trust span{ display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:600; padding:6px 10px; border-radius:8px; background:var(--surface-2); border:1px solid var(--border); white-space:nowrap; }
.gx-trust i{ color:var(--success); }
.gx-types{ display:flex; gap:6px; flex-wrap:wrap; margin-top:18px; position:relative; }
.gx-types .chip{ text-decoration:none; height:32px; }
.gx-types .chip.dashed{ border-style:dashed; }

/* toolbar */
.gx-bar{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; margin-bottom:14px; }
.gx-docid{ display:inline-flex; align-items:center; gap:10px; min-width:0; }
.gx-docid > span:last-child{ display:flex; flex-direction:column; line-height:1.3; min-width:0; }
.gx-save{ display:inline-flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); }
.gx-dot{ width:7px; height:7px; border-radius:50%; background:var(--success); box-shadow:0 0 0 3px color-mix(in srgb,var(--success) 22%,transparent); }
.gx-dot.warn{ background:var(--warning); box-shadow:0 0 0 3px color-mix(in srgb,var(--warning) 22%,transparent); }
.gx-spin{ animation:gx-rot .8s linear infinite; display:inline-block; }
@keyframes gx-rot{ to{ transform:rotate(360deg); } }
.gx-mtab{ display:none; }

/* smart fill */
.gx-ai{ margin-bottom:14px; position:relative; border:1px solid transparent; background:linear-gradient(var(--surface),var(--surface)) padding-box, linear-gradient(120deg,#7C3AED,#2F6BFF 55%,#0E9F9A) border-box; }
.gx-ai-in{ padding:14px 16px; }
.gx-ai-ic{ width:28px; height:28px; border-radius:8px; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,#7C3AED,#2F6BFF); font-size:13px; flex-shrink:0; }
.gx-ai-box{ display:flex; gap:8px; align-items:stretch; }
.gx-ai-box .txa{ flex:1; min-height:46px; resize:vertical; }
.gx-ai-btn{ white-space:nowrap; align-self:stretch; height:auto; min-height:42px; }
.gx-ex{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.gx-example{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.gx-example > div{ flex:1; min-width:220px; }

/* shimmer + highlight */
.gx-shimmer{ position:relative; overflow:hidden; }
.gx-shimmer::after{ content:''; position:absolute; inset:0; background:linear-gradient(100deg,transparent 20%,color-mix(in srgb,var(--accent) 16%,transparent) 50%,transparent 80%); background-size:200% 100%; animation:gx-sh 1s linear infinite; pointer-events:none; }
@keyframes gx-sh{ from{ background-position:150% 0; } to{ background-position:-50% 0; } }
.gx-hl{ animation:gx-flash 2.4s ease; border-color:var(--purple) !important; }
@keyframes gx-flash{ 0%{ box-shadow:0 0 0 0 color-mix(in srgb,var(--purple) 45%,transparent); background:color-mix(in srgb,var(--purple) 14%,var(--surface)); } 70%{ box-shadow:0 0 0 4px color-mix(in srgb,var(--purple) 18%,transparent); } 100%{ box-shadow:none; } }

/* templates gallery */
.gx-tpls{ margin-bottom:14px; }
.gx-tpls .card-h{ flex-wrap:wrap; gap:10px; }
.gx-tpls .card-h > .row{ max-width:100%; }
.gx-tpl-row{ display:flex; gap:10px; overflow-x:auto; padding:12px 14px 14px; scroll-snap-type:x mandatory; scrollbar-width:thin; }
.gx-tpl{ flex:0 0 118px; scroll-snap-align:start; border:1.5px solid var(--border); border-radius:12px; padding:8px; cursor:pointer; background:var(--surface); transition:border-color .15s,transform .15s; text-align:start; color:var(--text); }
.gx-tpl:hover{ border-color:var(--border-2); transform:translateY(-2px); }
.gx-tpl.active{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-50); }
.gx-tpl-n{ display:flex; align-items:center; justify-content:space-between; font-size:12px; margin-top:7px; gap:4px; }
.gx-tpl-n b{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gx-tpl-n i{ color:var(--accent); }
.gx-pal{ display:flex; align-items:center; gap:4px; margin-top:6px; }
.gx-pal button{ width:14px; height:14px; border-radius:50%; cursor:pointer; border:0; padding:0; box-shadow:0 0 0 1px var(--border-2); }
.gx-pal button.on{ box-shadow:0 0 0 2px var(--surface),0 0 0 3.5px var(--text); }
.gx-pal em{ margin-inline-start:auto; font-size:10px; color:var(--muted); font-style:normal; }
.gx-color{ width:34px; height:30px; padding:2px; border:1px solid var(--border); border-radius:8px; background:var(--surface); cursor:pointer; }
.gx-thumb{ position:relative; aspect-ratio:.72; background:#fff; border-radius:6px; border:1px solid #E1E5EE; overflow:hidden; }
.gx-thumb b{ position:absolute; top:8px; inset-inline-start:8px; width:16px; height:16px; border-radius:4px; background:var(--c); }
.gx-thumb i{ position:absolute; inset-inline:8px; height:4px; border-radius:2px; background:#E5E8EF; }
.gx-thumb i:nth-of-type(1){ top:36px; background:var(--c); opacity:.85; height:6px; }
.gx-thumb i:nth-of-type(2){ top:48px; } .gx-thumb i:nth-of-type(3){ top:57px; inset-inline-end:26px; } .gx-thumb i:nth-of-type(4){ top:66px; inset-inline-end:16px; }
.gx-thumb u{ position:absolute; bottom:12px; inset-inline-end:8px; width:40%; height:10px; border-radius:3px; background:var(--c); opacity:.25; }
.gx-th-moderne b,.gx-th-corporate b{ inset:0 0 auto; width:auto; height:24px; border-radius:0; }
.gx-th-corporate b{ background:linear-gradient(120deg,#0F1B3D,var(--c)); }
.gx-th-corporate u{ opacity:1; background:#0F1B3D; }
.gx-th-minimal b,.gx-th-mono b{ background:transparent; border:2px solid var(--c); }
.gx-th-minimal i:nth-of-type(1),.gx-th-mono i:nth-of-type(1){ background:#0F1B3D; height:2px; }
.gx-th-mono{ filter:grayscale(1); }
.gx-th-elegant b{ border-radius:50%; background:transparent; border:1.5px solid var(--c); }
.gx-th-elegant i:nth-of-type(1){ height:1px; opacity:1; }
.gx-th-creatif::before{ content:''; position:absolute; width:70px; height:70px; border-radius:50%; background:var(--c); opacity:.18; top:-30px; inset-inline-end:-22px; }
.gx-th-creatif i:nth-of-type(1){ border-radius:6px; height:8px; }
.gx-th-compact i{ height:3px; } .gx-th-compact i:nth-of-type(1){ top:28px; } .gx-th-compact i:nth-of-type(2){ top:36px; } .gx-th-compact i:nth-of-type(3){ top:42px; } .gx-th-compact i:nth-of-type(4){ top:48px; }
.gx-th-bandeau::before{ content:''; position:absolute; inset-block:0; inset-inline-start:0; width:12px; background:var(--c); }
.gx-th-bandeau b,.gx-th-bandeau i{ inset-inline-start:20px; }
.gx-th-arabe{ border-top:5px solid var(--c); } .gx-th-arabe b{ inset-inline-start:auto; inset-inline-end:8px; }

/* editor layout */
.gx .de{ grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); }
.gx .field{ position:relative; }
.gx .de-preview{ display:flex; flex-direction:column; gap:12px; max-height:calc(100vh - 96px); overflow:auto; scrollbar-width:thin; padding-bottom:2px; }
.gx-pv-b{ background:var(--surface-3); border-radius:0 0 var(--radius) var(--radius); }
.gx .inp.gx-ok{ border-color:color-mix(in srgb,var(--success) 60%,var(--border)); }
.gx .inp.gx-bad{ border-color:color-mix(in srgb,var(--danger) 60%,var(--border)); }
.gx-big{ font-weight:700; font-size:15px; }
.gx-opts{ display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; }
.gx-net{ display:grid; grid-template-columns:1fr auto; gap:6px 16px; font-size:13px; padding:12px 14px; border-radius:var(--radius); background:var(--surface-2); border:1px solid var(--border); font-variant-numeric:tabular-nums; }
.gx-net span{ color:var(--muted); } .gx-net b{ text-align:end; }
.gx-net .gx-net-t{ font-size:15px; font-weight:800; color:var(--text); border-top:1px solid var(--border); padding-top:8px; }
.gx-bl{ display:flex; flex-direction:column; gap:6px; }
.gx-bl-r{ display:flex; align-items:center; gap:10px; font-size:13px; }
.gx-bl-r .inp{ width:90px; flex-shrink:0; }
.gx-logo-prev{ display:flex; align-items:center; gap:10px; padding:10px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface-2); }
.gx-logo-prev img{ width:48px; height:48px; object-fit:contain; border-radius:8px; background:#fff; }
.gx-file{ cursor:pointer; padding:16px; display:flex; flex-direction:column; align-items:center; gap:4px; }
.gx-words{ padding:10px 12px; border-radius:var(--radius-sm); background:var(--surface-2); border-inline-start:3px solid var(--accent); font-size:12.5px; display:flex; flex-direction:column; gap:4px; }
.gx-arline{ font-family:'Cairo',system-ui,sans-serif; text-align:start; }
.gx-lines .inp,.gx-lines .sel{ height:32px; font-size:12.5px; padding:0 7px; }
.gx-lines .sel{ padding-inline-end:22px; }
.gx-lines th:nth-child(2){ min-width:160px; }
.gx-lines tbody.gx-line > tr > td{ border-bottom:0; }
.gx-lines tbody.gx-line{ border-bottom:1px solid var(--border); }
.gx-lines tbody.gx-line.sortable-ghost{ opacity:.45; }
.gx-lines tr.gx-l-sub > td{ padding-top:0; }
.gx-lines .gx-desc{ height:26px; font-size:11.5px; color:var(--muted); }
.gx-lines tbody.sec td{ background:var(--surface-2); }
.gx-lines td.gx-c-act{ vertical-align:middle; }
/* second row of a line: reference and description on the full width, then the actions */
.gx-l-more{ display:flex; gap:4px; min-width:0; }
.gx-l-more .gx-desc{ flex:1 1 auto; min-width:0; }
.gx-l-more .gx-ref{ flex:0 0 110px; }
.gx-l-act{ display:flex; gap:1px; justify-content:flex-end; }
.gx-l-act .x-btn{ width:24px; height:24px; font-size:11.5px; }
.gx-lbl-m{ display:none; }
.gx-sum span.gx-k{ text-align:start; font-weight:400; }
.gx-sum span.gx-k span{ font-weight:inherit; }
.gx-sum span.gx-v{ text-align:end; font-weight:600; white-space:nowrap; }
.gx-sum span.gx-k.ttc,.gx-sum span.gx-v.ttc{ font-weight:800; }
.gx-sum span.b{ font-weight:700; color:var(--text); }

/* address book */
.gx-ac{ position:absolute; inset-inline:0; top:calc(100% + 4px); z-index:30; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-lg); overflow:hidden; }
.gx-ac-i{ display:flex; align-items:center; gap:10px; width:100%; padding:9px 12px; border:0; background:none; text-align:start; color:var(--text); font-size:12.5px; cursor:pointer; }
.gx-ac-i:hover,.gx-ac-i:focus{ background:var(--surface-2); outline:none; }
.gx-ac-i .grow{ display:flex; flex-direction:column; min-width:0; } .gx-ac-i .grow span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gx-ac-f{ font-size:11px; color:var(--muted); padding:7px 12px; border-top:1px solid var(--border); background:var(--surface-2); }

/* compliance */
.gx-comp .card-b{ padding-top:12px; }
.gx-ring{ position:relative; width:58px; height:58px; flex-shrink:0; }
.gx-ring b{ position:absolute; inset:0; display:grid; place-items:center; font-size:16px; font-weight:800; }
.gx-ck-tog{ border:0; background:none; color:var(--accent); font-weight:600; font-size:12px; padding:10px 0 0; display:inline-flex; gap:6px; align-items:center; cursor:pointer; }
.gx-ck{ list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:2px; }
.gx-ck li{ display:flex; align-items:center; gap:9px; font-size:12.5px; padding:6px 8px; border-radius:7px; }
.gx-ck li.ok > i{ color:var(--success); } .gx-ck li.ko{ background:color-mix(in srgb,var(--warning) 9%,transparent); } .gx-ck li.ko > i{ color:var(--warning); }
.link-btn{ border:0; background:none; padding:0; color:var(--accent); font-weight:600; cursor:pointer; }

/* share, send */
.gx-share{ display:flex; gap:20px; align-items:flex-start; }
.gx-share-qr{ flex-shrink:0; text-align:center; padding:14px; border:1px solid var(--border); border-radius:14px; background:#fff; color:#1B2233; }
.gx-share-qr svg{ display:block; width:168px; height:168px; }
.gx-share-qr .muted{ color:#6B7590; }
.btn.gx-wa{ background:#25D366; color:#fff; border-color:#25D366; }
.gx-send-mail{ padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface-2); }
.gx-doc.cur{ border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-50); }
.gx-more{ margin-top:36px; }
.gx-mini{ display:flex; gap:12px; align-items:center; padding:14px; text-decoration:none; color:inherit; }
.gx-mini > span:last-child{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.card.hover{ transition:transform .15s,box-shadow .15s; } .card.hover:hover{ transform:translateY(-2px); box-shadow:var(--shadow-lg); }
.gx-modal-ov{ z-index:110; }
.gx-full .a4-stage{ padding:12px; }

/* A4 overlays (live preview) */
.a4 .gx-wm{ position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; font-size:96px; font-weight:900; letter-spacing:.08em; color:var(--dc); opacity:.07; transform:rotate(-30deg); white-space:nowrap; z-index:2; }
.a4 .gx-stamp{ position:absolute; inset-inline-end:12px; bottom:2px; width:92px; height:92px; transform:rotate(-12deg); opacity:.82; mix-blend-mode:multiply; object-fit:contain; }
.a4 .d-sign img.gx-sig{ position:absolute; bottom:6px; inset-inline-start:12px; max-height:56px; max-width:60%; }
.a4 .gx-sign1{ grid-template-columns:1fr 1fr; }
.a4 .gx-ar{ display:block; font-family:'Cairo',system-ui,sans-serif; font-weight:600; opacity:.85; font-size:.92em; }
.a4 .gx-mention{ margin-top:6px; font-size:8.5px; color:#8A93AA; }
.a4 .gx-qr svg{ width:66px; height:66px; display:block; margin-inline:auto; }
.a4 .d-logo-img{ width:64px; height:64px; object-fit:contain; flex-shrink:0; }
.a4 .d-subject{ margin-top:18px; font-size:12px; }
.a4.gx-recu .gx-r-amount{ margin-top:26px; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 22px; border-radius:12px; background:color-mix(in srgb,var(--dc) 8%,#fff); border:1.5px solid var(--dc); }
.a4.gx-recu .gx-r-amount span{ font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:#4A5470; font-weight:700; }
.a4.gx-recu .gx-r-amount b{ font-size:28px; color:var(--dc); font-weight:800; font-variant-numeric:tabular-nums; }
.a4.gx-recu .gx-r-rows{ margin-top:18px; display:grid; grid-template-columns:170px 1fr; font-size:12px; }
.a4.gx-recu .gx-r-rows > div{ padding:10px 0; border-bottom:1px dotted #C9CFDC; }
.a4.gx-recu .gx-r-k{ color:#6B7590; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.a4.gx-recu .gx-r-v b{ color:#0F1B3D; }
.a4.gx-recu .d-sign{ margin-top:auto; padding-bottom:18px; }
.a4.rtl .d-meta td{ padding:1.5px 14px 1.5px 0; }
.a4.rtl .d-meta td:last-child{ text-align:left; }
.a4.rtl .d-totals td:first-child{ text-align:right; }
.a4.rtl .d-vat th,.a4.rtl .d-vat td{ text-align:left; } .a4.rtl .d-vat th:first-child,.a4.rtl .d-vat td:first-child{ text-align:right; }

/* A4 fonts + template variants */
.a4.gx-f-serif{ font-family:Georgia,'Times New Roman',serif; }
.a4.gx-f-cairo{ font-family:'Cairo',system-ui,sans-serif; }
.a4.gx-t-elegant .d-title{ font-family:Georgia,serif; font-weight:400; font-style:italic; letter-spacing:.02em; font-size:32px; }
.a4.gx-t-elegant .d-logo{ border-radius:50%; background:transparent; color:var(--dc); border:1.5px solid var(--dc); font-family:Georgia,serif; font-weight:400; }
.a4.gx-t-elegant .d-head{ padding-bottom:18px; border-bottom:1px solid var(--dc); }
.a4.gx-t-elegant .d-lines th{ background:transparent; color:var(--dc); border-top:1px solid var(--dc); border-bottom:1px solid var(--dc); letter-spacing:.08em; text-transform:uppercase; font-size:9.5px; }
.a4.gx-t-elegant .d-box{ border:0; border-inline-start:2px solid var(--dc); border-radius:0; }
.a4.gx-t-elegant .d-words{ background:transparent; font-style:italic; }
.a4.gx-t-corporate .d-band{ background:linear-gradient(120deg,#0F1B3D 0%,var(--dc) 140%); }
.a4.gx-t-corporate .d-lines th{ background:#0F1B3D; color:#fff; border:0; }
.a4.gx-t-corporate .d-lines tbody tr:nth-child(even) td{ background:#F6F8FC; }
.a4.gx-t-corporate .d-totals tr.ttc td{ background:#0F1B3D; color:#fff; padding:9px 10px; border:0; }
.a4.gx-t-creatif{ overflow:hidden; }
.a4.gx-t-creatif::before{ content:''; position:absolute; width:340px; height:340px; border-radius:50%; background:var(--dc); opacity:.12; top:-170px; inset-inline-end:-120px; }
.a4.gx-t-creatif::after{ content:''; position:absolute; width:180px; height:180px; border-radius:50%; background:var(--dc); opacity:.08; bottom:-90px; inset-inline-start:-60px; }
.a4.gx-t-creatif .d-title{ font-size:40px; letter-spacing:-.02em; }
.a4.gx-t-creatif .d-lines{ border-collapse:separate; border-spacing:0; }
.a4.gx-t-creatif .d-lines th:first-child{ border-start-start-radius:10px; border-end-start-radius:10px; }
.a4.gx-t-creatif .d-lines th:last-child{ border-start-end-radius:10px; border-end-end-radius:10px; }
.a4.gx-t-creatif .d-box{ border-radius:14px; border:0; background:color-mix(in srgb,var(--dc) 7%,#fff); }
.a4.gx-t-creatif .d-words{ border-radius:10px; border:0; background:color-mix(in srgb,var(--dc) 10%,#fff); }
.a4.gx-t-compact{ font-size:10px; padding:36px 40px 30px; }
.a4.gx-t-compact .d-title{ font-size:20px; }
.a4.gx-t-compact .d-logo{ width:46px; height:46px; font-size:16px; }
.a4.gx-t-compact .d-lines td{ padding:4px 6px; } .a4.gx-t-compact .d-lines th{ padding:5px 6px; }
.a4.gx-t-compact .d-parties{ margin-top:16px; } .a4.gx-t-compact table.d-lines{ margin-top:14px; }
.a4.gx-t-bandeau{ padding-inline-start:96px; }
.a4.gx-t-bandeau::before{ content:''; position:absolute; inset-block:0; inset-inline-start:0; width:52px; background:var(--dc); }
.a4.gx-t-bandeau .d-lines th{ background:transparent; color:var(--dc); border-bottom:2px solid var(--dc); }
.a4.gx-t-arabe{ border-top:10px solid var(--dc); }
.a4.gx-t-arabe:not(.rtl) .d-head{ flex-direction:row-reverse; }
.a4.gx-t-arabe:not(.rtl) .d-head > div:last-child .d-title,.a4.gx-t-arabe:not(.rtl) .d-head > div:last-child .d-meta{ text-align:left; }
.a4.gx-t-arabe:not(.rtl) .d-meta table{ margin-left:0; }
.a4.gx-t-arabe .d-title .gx-ar{ font-size:1.05em !important; }
.a4.gx-t-arabe .d-foot{ border-top:3px double var(--dc); }
.a4.gx-t-mono{ filter:grayscale(1); }

/* hub */
.gx-hub-hero{ position:relative; overflow:hidden; border:1px solid var(--border); border-radius:20px; padding:40px 40px 32px; background:radial-gradient(800px 320px at 100% 0%,rgba(var(--accent-rgb),.14),transparent 70%),var(--surface); }
.gx-hub-hero > *:not(.lp-glow){ position:relative; }
.gx-hub-hero .lp-glow{ opacity:.12; }
.gx-hub-hero .lp-lead{ max-width:760px; }
.gx-stats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:28px; max-width:720px; }
.gx-stats div{ padding:12px 14px; border-radius:12px; background:var(--surface-2); border:1px solid var(--border); }
.gx-stats b{ display:block; font-size:26px; font-weight:800; letter-spacing:-.03em; }
.gx-stats span{ font-size:12px; color:var(--muted); }
.gx-sec{ margin-top:44px; }
.gx-sec-h{ margin-bottom:16px; } .gx-sec-h .gx-h2{ margin-bottom:4px; } .gx-sec-h p{ margin:0; }
.gx-gens{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.gx-gen{ display:flex; flex-direction:column; gap:8px; padding:18px; text-decoration:none; color:inherit; transition:transform .15s,box-shadow .15s; }
.gx-gen:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.gx-gen h3{ margin:6px 0 0; font-size:16px; } .gx-gen p{ margin:0; }
.gx-gen-go{ margin-top:auto; padding-top:8px; font-size:13px; font-weight:600; color:var(--accent); display:inline-flex; gap:6px; align-items:center; }
[dir="rtl"] .gx-gen-go i,[dir="rtl"] .gx-tool > i:last-child,[dir="rtl"] .gx-flip{ transform:scaleX(-1); }
.gx-tool{ display:flex; gap:14px; align-items:center; padding:16px; text-decoration:none; color:inherit; }
.gx-tool p{ margin:2px 0 0; } .gx-tool > div{ flex:1; min-width:0; } .gx-tool > i:last-child{ color:var(--muted); }
.gx-cmp{ width:100%; border-collapse:collapse; font-size:13px; min-width:680px; }
.gx-cmp th,.gx-cmp td{ padding:11px 14px; border-bottom:1px solid var(--border); text-align:center; }
.gx-cmp th:first-child,.gx-cmp td:first-child{ text-align:start; font-weight:500; }
.gx-cmp th{ font-size:12px; color:var(--text-2); background:var(--surface-2); white-space:nowrap; }
.gx-cmp th .badge{ margin-inline-start:6px; }
.gx-cmp .hi{ background:color-mix(in srgb,var(--accent) 6%,transparent); }
.gx-cmp th.hi{ color:var(--accent); }
.gx-y{ color:var(--success); font-size:16px; } .gx-n{ color:var(--faint); } .gx-p{ color:var(--warning); font-size:12px; white-space:nowrap; }
.gx-why h3{ margin:12px 0 6px; font-size:15px; } .gx-why p{ margin:0; }
.gx-testi p{ font-size:14px; line-height:1.6; color:var(--text-2); }
.gx-narrow{ max-width:860px; margin-inline:auto; }
.gx-band{ margin-top:44px; display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; padding:28px 32px; border-radius:18px; background:linear-gradient(110deg,var(--ink),#1F3A8A); color:#fff; }
.gx-band h2{ margin:0 0 6px; font-size:22px; color:#fff; } .gx-band p{ margin:0; opacity:.8; }
.gx-band .lp-ghost{ background:transparent; color:#fff; border-color:rgba(255,255,255,.35); }

/* tools */
.gx-big-in{ display:flex; align-items:center; gap:10px; padding:6px; padding-inline-start:14px; border:1.5px solid var(--border-2); border-radius:12px; background:var(--surface); margin-top:6px; }
.gx-big-in:focus-within{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-50); }
.gx-big-in > i{ color:var(--muted); }
.gx-big-in .inp{ border:0; box-shadow:none !important; font-size:19px; font-weight:700; height:42px; flex:1; min-width:0; background:transparent; padding:0; }
.gx-cur{ font-weight:700; color:var(--muted); padding-inline-end:10px; }
.gx-segs{ display:grid; grid-template-columns:9fr 4fr 3fr; gap:8px; }
.gx-seg{ display:flex; flex-direction:column; gap:4px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); min-width:0; }
.gx-seg b{ font-size:15px; letter-spacing:.08em; overflow:hidden; text-overflow:ellipsis; }
.gx-seg.ok{ border-color:color-mix(in srgb,var(--success) 50%,var(--border)); } .gx-seg.ko{ border-color:color-mix(in srgb,var(--danger) 50%,var(--border)); }
.gx-wout{ padding:14px 16px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); }
.gx-wout p{ margin:8px 0 6px; font-size:16px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.gx-wout.ar p{ font-family:'Cairo',system-ui,sans-serif; font-size:18px; text-align:start; }
.gx-cheque{ font-size:13px !important; letter-spacing:.04em; font-family:var(--mono); }
.gx-arcell{ font-family:'Cairo',system-ui,sans-serif; }
.gx-vbox{ padding:14px 16px; border-radius:12px; border:1px solid var(--border); background:var(--surface-2); display:flex; flex-direction:column; gap:2px; min-width:0; }
.gx-vbox span{ font-size:12px; color:var(--muted); font-weight:600; } .gx-vbox b{ font-size:22px; font-weight:800; overflow-wrap:anywhere; } .gx-vbox em{ font-style:normal; font-size:11px; color:var(--muted); }
.gx-vbox.amber b{ color:var(--warning); } .gx-vbox.green b{ color:var(--success); }
.gx-rate{ display:flex; gap:12px; padding:8px 0; border-bottom:1px solid var(--border); }
.gx-rate b{ width:44px; flex-shrink:0; color:var(--accent); }
.gx-map td{ vertical-align:middle; } .gx-map .sel{ min-width:190px; }
.gx-b-drop{ padding:30px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:6px; }
.gx-err-list{ margin:6px 0 0; padding-inline-start:18px; font-size:12.5px; }

/* the floating WhatsApp button must not cover a window or drawer of the editor */
body:has(.gx-modal-open) .wa-fab{ display:none !important; }

/* print: only the A4 sheet (the design system hides everything with visibility) */
.gx-print-sheet{ display:none; }
@media print{
  @page{ size:A4; margin:0; }
  html,body{ background:#fff !important; }
  #pub-header,#pub-footer,#toasts,.wa-fab,.sticky-cta,#imp-banner{ display:none !important; }
  .gx-page > *:not(.gx-print-sheet){ display:none !important; }
  main{ padding:0 !important; margin:0 !important; }
  .gx-page{ padding:0 !important; max-width:none !important; }
  .gx-print-sheet{ display:block !important; }
  .gx-print-sheet,.gx-print-sheet *{ visibility:visible !important; }
  .gx-print-sheet .a4{ box-shadow:none !important; width:210mm !important; min-height:297mm !important; margin:0 !important; transform:none !important; position:relative !important; }
  .gx-print-sheet .a4, .gx-print-sheet .a4 *{ -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* editor extras */
.gx-lines .inp.gx-price-missing{ border-color:color-mix(in srgb,var(--warning) 70%,var(--border)); }
.gx-qty-cell{ display:flex; gap:4px; }
.gx-docs-empty{ padding:28px 10px; text-align:center; color:var(--muted); }
.gx-err-box{ margin-bottom:14px; }
.gx-share-link{ display:flex; gap:8px; }
.gx-share-link .inp{ flex:1; min-width:0; }
.gx-share-qr .gx-qr-wait{ width:168px; height:168px; display:grid; place-items:center; color:#8A93AA; }
.gx-stars{ color:#F0A52B; display:flex; gap:2px; font-size:12px; margin-bottom:8px; }
.gx-testi .who{ margin-top:12px; }
.gx-hub-cta{ margin-top:24px; }
.gx-tools-side .feat-list li{ font-size:12.5px; }
.gx-ice-hist td{ vertical-align:middle; }
.gx-sum-kv{ display:grid; grid-template-columns:1fr auto; gap:8px 14px; font-size:13px; }
.gx-sum-kv span{ color:var(--muted); } .gx-sum-kv b{ text-align:end; }
.gx-company-toggle{ cursor:pointer; user-select:none; }
.gx-hint-ok{ color:var(--success); } .gx-hint-bad{ color:var(--danger); }

/* responsive: below 1100px the editor and the preview become tabs */
@media (max-width:1100px){
  .gx .de{ grid-template-columns:minmax(0,1fr); }
  .gx .de-preview{ max-height:none; overflow:visible; position:static; }
  .gx-mtab{ display:inline-flex; }
  .gx[data-view="preview"] .de-form,.gx[data-view="preview"] .gx-ai,.gx[data-view="preview"] .gx-tpls,.gx[data-view="preview"] .gx-example{ display:none; }
  .gx[data-view="edit"] .de-preview{ display:none; }
}
@media (max-width:900px){
  .gx-share{ flex-direction:column-reverse; align-items:stretch; }
  .gx-share-qr{ align-self:center; }
  .gx-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:640px){
  .gx-trust{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .gx-trust span{ white-space:normal; }
  .gx-ai-box{ flex-direction:column; }
  .gx-hub-hero{ padding:24px 18px; }
  .gx-band{ padding:22px 18px; }
  .gx-bar .btn span.gx-bl-t{ display:none; }
  .gx-segs{ grid-template-columns:1fr 1fr 1fr; }
  .gx-segs .gx-seg b{ font-size:12px; letter-spacing:0; }
  .gx-big-in{ flex-wrap:wrap; padding:8px; }
  .a4.gx-recu .gx-r-rows{ grid-template-columns:140px 1fr; }
  .gx .form-grid,.gx .form-grid.g3{ grid-template-columns:minmax(0,1fr); }
  .gx .form-grid > [style*="grid-column"]{ grid-column:auto !important; }
  /* line items become cards */
  .gx-lines-wrap{ overflow:visible; }
  .gx-lines{ min-width:0 !important; }
  .gx-lines thead{ display:none; }
  .gx-lines tbody.gx-line{ display:block; padding:12px 14px; }
  .gx-lines tbody.gx-line > tr{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px 8px; }
  .gx-lines tbody.gx-line > tr[style*="display: none"]{ display:none !important; }
  .gx-lines tbody.gx-line > tr.gx-l-sub{ margin-top:6px; }
  .gx-lines tbody td{ border:0; padding:0; }
  .gx-lines td.gx-c-name,.gx-lines tr.gx-l-sub > td:first-child{ grid-column:1 / -1; }
  .gx-lines tbody.sec > tr.gx-l-main{ grid-template-columns:minmax(0,1fr) auto; align-items:end; }
  .gx-lines tbody.sec td.gx-c-name{ grid-column:auto; }
  .gx-lines td.gx-c-drag{ display:none; }
  .gx-lines td.gx-c-tot{ text-align:start; padding-top:0; align-self:end; }
  .gx-lines tr.gx-l-sub > td.gx-c-act{ grid-column:1 / -1; }
  .gx-l-more .gx-ref{ flex-basis:84px; }
  .gx-lbl-m{ display:block; font-size:10.5px; color:var(--muted); font-weight:600; margin-bottom:2px; }
  .gx-types .chip{ height:30px; font-size:12px; }
  /* phones: a compact bar (the button says it all), clear of the floating WhatsApp button */
  .gx-sticky{ flex-wrap:nowrap; justify-content:center; gap:10px; padding:8px 12px; padding-inline-end:76px; font-size:12px; line-height:1.35; }
  .gx-sticky > i,.gx-sticky > span{ display:none; }
  .gx-sticky .btn{ flex-shrink:1; min-width:0; white-space:normal; }
}
.gx .seg,.gx-page .seg{ max-width:100%; overflow-x:auto; scrollbar-width:none; }
.gx-hero .gen-hero-row > div:first-child{ min-width:0; }
