/* =========================================================
   Aqua Soft — editable brochure rebuild (page-2 style)
   ========================================================= */
:root{
  --headblue:#2f8fd0; --headblue2:#1f6fb0;
  --cpblue:#26307e; --cpcyan:#2aa9e0;
}
*{ box-sizing:border-box; margin:0; padding:0; }
body{ font-family:"Calibri","Segoe UI",Arial,sans-serif; background:#5a6b7b; padding:84px 20px 60px; color:#1a1a1a; }

/* ---------- toolbar ---------- */
.toolbar{ position:fixed; top:0; left:0; right:0; z-index:50; background:#fff; border-bottom:1px solid #d8d8d8;
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 16px; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.tb-left{ display:flex; align-items:center; white-space:nowrap; }
.toolbar .hint{ color:#666; font-size:12px; margin-left:12px; }
.tb-right{ display:flex; gap:7px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }
.toolbar button{ border:1px solid var(--headblue); background:#fff; color:var(--headblue2);
  padding:7px 11px; border-radius:6px; cursor:pointer; font-size:12.5px; font-weight:600;
  white-space:nowrap; line-height:1.1; height:32px; }
.toolbar button:hover{ background:#eaf4fb; }
.toolbar button.primary{ background:var(--headblue); color:#fff; }

/* ---------- A4 page ---------- */
.page{ position:relative; width:210mm; height:297mm; background:#fff; margin:0 auto 22px;
  box-shadow:0 6px 30px rgba(0,0,0,.35); overflow:hidden; }
.full{ width:100%; height:100%; display:block; object-fit:fill; }

/* ---------- shared decoration ---------- */
.wave-top{ position:absolute; top:0; left:0; width:74%; z-index:1; }
.wave-bottom{ position:absolute; bottom:0; left:0; width:100%; z-index:1; }
.logo{ position:absolute; top:6mm; right:12mm; width:42mm; z-index:3; }

/* =========================================================
   PAGE 2 — QUOTATION
   ========================================================= */
.content{ position:relative; z-index:2; padding:42mm 14mm 26mm 14mm; }
.meta{ width:100%; border-collapse:collapse; font-size:12pt; margin-bottom:10px; }
.meta td{ border:1px solid #000; padding:3px 8px; line-height:1.35; }
.meta .k{ font-weight:700; width:34%; white-space:nowrap; }
.meta .v{ width:40%; }
.meta .d{ width:26%; white-space:nowrap; }
.meta .dlabel{ font-weight:700; }
.price{ width:100%; border-collapse:collapse; font-size:12pt; }
.price th, .price td{ border:1px solid #2b2b2b; padding:4px 9px; vertical-align:middle; }
.price .phead th{ background:linear-gradient(180deg,var(--headblue),var(--headblue2)); color:#fff; font-size:14pt; font-weight:800; text-align:left; }
.price .phead .amt{ text-align:right; }
.price tbody td{ font-weight:700; }
.price .amt{ text-align:right; white-space:nowrap; width:30%; }
.price .total td, .price .gst td{ font-weight:800; }
.letter{ margin-top:14px; font-size:12.5pt; line-height:1.5; }
.letter p{ margin-bottom:9px; }
.sign{ margin-top:6px; }
.regards{ width:52mm; display:block; margin:2px 0; }
.sname{ font-weight:800; font-size:12.5pt; line-height:1.3; }
.srole{ font-size:11.5pt; }

/* =========================================================
   PAGE 3 — COMPANY PROFILE
   ========================================================= */
.cp{ position:relative; z-index:2; padding:42mm 16mm 40mm 16mm; height:100%;
  display:flex; flex-direction:column;
  background:
    repeating-linear-gradient(60deg, rgba(38,48,126,.03) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-60deg, rgba(38,48,126,.03) 0 1px, transparent 1px 22px); }
.cp-box{ border:2px solid var(--cpblue); border-radius:2px; padding:26px 28px 30px; flex:1 1 auto; }
.cp-title{ display:flex; align-items:center; gap:10px; font-size:27pt; color:var(--cpblue); margin-bottom:20px; }
.cp-title b{ font-family:"Baloo 2",sans-serif; font-weight:800; letter-spacing:.5px; }
.cp-title i{ color:var(--cpcyan); font-family:"Dancing Script",cursive; font-weight:700; font-size:1.15em; }
.cp-title .dash{ flex:0 0 26px; height:3px; background:var(--cpblue); }
.cp-text{ font-family:"Baloo 2",sans-serif; font-size:19.5pt; line-height:1.6; color:var(--cpblue); font-weight:600; text-align:justify; }
/* page 3 has shorter text -> bigger so the box looks full */
[data-ep="p3"] .cp-text{ font-size:23pt; line-height:1.85; }
/* rounded font on the other rebuilt pages */
.tech-mid div, .tech-val div, .tech-h b, .terms h4, .why h4, .why p,
.ty-big, .ty-wait, .ty-contact{ font-family:"Baloo 2",sans-serif; }

/* ---------- shared cursive title ---------- */
.cp-title.big-cursive{ justify-content:center; }
.cp-title.big-cursive i{ font-size:30pt; }

/* =========================================================
   PAGE 5 — TECHNICAL SPECIFICATION
   ========================================================= */
.tech{ position:relative; z-index:2; padding:42mm 12mm 26mm 12mm; display:flex; gap:8mm; height:100%; align-items:flex-start; }
.tech-photo{ flex:0 0 70mm; }
.tech-photo img{ width:100%; height:auto; border:1px solid #cfd8e3; display:block; }
.tech-right{ flex:1; }
.techtable{ width:100%; border-collapse:collapse; }
.techtable th, .techtable td{ font-family:"Baloo 2",sans-serif; color:var(--cpblue); font-weight:600;
  font-size:14pt; padding:6px 10px; vertical-align:top; text-align:left; }
.techtable td:nth-child(2), .techtable th:nth-child(2){ border-left:2px solid var(--cpblue); }
.techtable thead th{ padding-bottom:12px; }
.th-b{ display:block; font-family:"Baloo 2",sans-serif; font-weight:800; font-size:18pt; color:var(--cpblue); }
.th-i{ display:block; font-family:"Dancing Script",cursive; font-weight:700; font-size:17pt; color:var(--cpcyan); }

/* ---------- image slots ---------- */
.imgslot{ position:relative; }
.full-slot{ width:100%; height:100%; }
.slot-btn{ position:absolute; top:8px; left:8px; z-index:15; background:var(--headblue); color:#fff;
  border:none; border-radius:6px; padding:6px 10px; font-size:12px; font-weight:600; cursor:pointer; opacity:.85; }
.slot-btn:hover{ opacity:1; }

/* individual photo slots over a background page */
.photoslot{ position:absolute; z-index:5; outline:1px dashed rgba(47,143,208,.7); }
.photoslot img{ width:100%; height:100%; object-fit:cover; display:block; }
.photoslot .ps{ top:2px; left:2px; padding:3px 6px; font-size:11px; }

/* editable text overlay on cover */
.cov-edit{ position:absolute; z-index:6; color:#1c3f94; font-weight:700; outline:1px dashed transparent; }
.cov-edit:hover{ outline:1px dashed #9bc0e2; }
/* editable cover title — white box masks the baked title text */
.cov-title-edit{ position:absolute; z-index:6; background:#fff; color:#1c3f94; font-weight:800;
  font-size:19pt; text-align:center; height:5.6%; display:flex; align-items:center; justify-content:center;
  font-family:"Segoe UI",Arial,sans-serif; }
.cov-title-edit:hover{ outline:1px dashed #9bc0e2; }

/* =========================================================
   PAGE 7 — ELEMENTS TABLE
   ========================================================= */
.eltable{ width:100%; border-collapse:collapse; font-size:14pt; margin-top:8px; }
.eltable th{ text-align:left; color:#000; font-weight:800; padding:6px 10px; font-size:15pt; }
.eltable td{ padding:6px 10px; color:#222; }
.eltable tbody tr:nth-child(odd){ background:#eef1f5; }

/* =========================================================
   PAGE 8 — TERMS  &  PAGE 12 — WHY
   ========================================================= */
.terms h4, .why h4{ color:var(--cpblue); font-size:15pt; margin:10px 0 4px; }
.terms ul{ list-style:none; margin:0 0 6px; }
.terms li{ position:relative; padding-left:28px; font-size:13.5pt; color:#222; margin-bottom:6px; line-height:1.4; }
.terms li::before{ content:"\f164"; font-family:"Font Awesome 6 Free"; font-weight:900; color:#1f6fb0;
  position:absolute; left:0; top:2px; font-size:13pt; }
/* "+" add-row button on each terms row (shows on hover, left margin) */
.terms-add{ position:absolute; left:-22px; top:1px; width:18px; height:18px; border:none; border-radius:50%;
  background:#dcf5e3; color:#1f9d55; font-weight:700; font-size:13px; line-height:1; cursor:pointer; padding:0;
  opacity:0; transition:opacity .12s; }
.terms li:hover .terms-add{ opacity:1; }
.terms-add:hover{ background:#bdeccb; }
/* delete-row (✕) at the right of each terms row */
.terms-del{ position:absolute; right:-2px; top:1px; width:18px; height:18px; border:none; border-radius:50%;
  background:#ffe3e3; color:#c0392b; font-weight:700; font-size:11px; line-height:1; cursor:pointer; padding:0;
  opacity:0; transition:opacity .12s; }
.terms li:hover .terms-del{ opacity:1; }
.terms-del:hover{ background:#ffc9c9; }
/* delete-heading (✕) at the right of each heading */
.terms h4{ position:relative; }
.terms-delsec{ position:absolute; right:0; top:50%; transform:translateY(-50%); width:18px; height:18px; border:none;
  border-radius:50%; background:#ffe3e3; color:#c0392b; font-weight:700; font-size:11px; line-height:1; cursor:pointer;
  padding:0; opacity:0; transition:opacity .12s; }
.terms h4:hover .terms-delsec{ opacity:1; }
.terms-delsec:hover{ background:#ffc9c9; }
/* "+ Add Heading" button */
.terms-addsec{ margin-top:10px; border:1px dashed #2f8fd0; background:#eaf4fb; color:#1f6fb0; border-radius:6px;
  font-size:12px; padding:5px 12px; cursor:pointer; font-weight:600; }
.terms-addsec:hover{ background:#dceaf6; }
.why p{ font-size:12.5pt; color:#222; line-height:1.5; margin-bottom:8px; text-align:justify; }
.why h4{ font-size:14pt; }

/* =========================================================
   PAGE 16 — THANK YOU
   ========================================================= */
.thanks{ position:relative; z-index:2; padding:40mm 16mm; height:100%; text-align:center; display:flex; flex-direction:column; align-items:center; }
.ty-logo{ width:70mm; margin-bottom:6mm; }
.ty-big{ font-size:46pt; font-weight:800; color:var(--cpcyan); letter-spacing:2px; }
.ty-happy{ font-size:30pt; color:#fff; background:var(--cpblue); font-family:"Dancing Script",cursive;
  padding:4px 30px; margin:6mm 0; border-radius:3px; }
.ty-wait{ font-size:18pt; color:var(--cpblue); font-weight:700; margin-bottom:10mm; }
.ty-contact{ font-size:15pt; color:var(--cpblue); }
.ty-contact div{ margin-bottom:6px; }
.ty-contact b{ color:var(--cpcyan); }

/* =========================================================
   PAGE 6 — FEATURES
   ========================================================= */
.feat{ position:relative; z-index:2; height:100%; padding:40mm 12mm 24mm;
  background:
    repeating-linear-gradient(60deg, rgba(38,48,126,.03) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-60deg, rgba(38,48,126,.03) 0 1px, transparent 1px 22px); }
.feat-machine{ position:absolute; left:35%; top:16%; width:31%; }
.feat-machine img{ width:100%; display:block; }
.callout{ position:absolute; width:27%; font-family:"Baloo 2",sans-serif; font-weight:700;
  font-size:13.5pt; line-height:1.3; color:#1c3f94; display:flex; gap:7px; }
.callout i{ color:#2aa9e0; font-size:19pt; flex:0 0 auto; margin-top:2px; }
.c-tl{ left:5%;  top:19%; }
.c-tr{ right:5%; top:19%; }
.c-ml{ left:5%;  top:38%; }
.c-mr{ right:5%; top:40%; }
.c-br{ right:5%; top:56%; }
.feat-bullets{ position:absolute; left:9%; right:9%; bottom:15%; list-style:none; }
.feat-bullets li{ font-family:"Baloo 2",sans-serif; color:#1c3f94; font-weight:700; font-size:15pt;
  margin-bottom:10px; padding-left:26px; position:relative; }
.feat-bullets li::before{ content:"\f069"; font-family:"Font Awesome 6 Free"; font-weight:900;
  color:#2aa9e0; position:absolute; left:0; top:3px; font-size:13pt; }
/* remove-icon (✕) buttons on page-6 callouts & bullets */
.rm-ico{ background:#ffe3e3; color:#c0392b; border:1px solid #f3b4b4; border-radius:50%;
  width:18px; height:18px; font-size:10px; font-weight:700; line-height:1; padding:0; cursor:pointer;
  opacity:0; transition:opacity .15s; }
.callout .rm-ico{ position:absolute; top:-9px; left:-9px; }
.callout:hover .rm-ico{ opacity:1; }
.feat-bullets li.no-bullet::before{ display:none; }
.feat-bullets li.no-bullet{ padding-left:4px; }
.feat-bullets li .rm-ico{ position:absolute; left:0; top:2px; }
.feat-bullets li:hover .rm-ico{ opacity:1; }

/* ---------- editor affordances ---------- */
[contenteditable="true"]:hover{ outline:1px dashed #9bc0e2; }
[contenteditable="true"]:focus{ outline:2px solid var(--headblue); background:#fafdff; }
.act{ width:50px; text-align:center; border:none !important; white-space:nowrap; }
.del, .addb{ border:none; border-radius:4px; cursor:pointer; padding:2px 7px; font-weight:700; font-size:13px; line-height:1; }
.del{ background:#ffe3e3; color:#c0392b; }
.del:hover{ background:#ffc9c9; }
.addb{ background:#dcf5e3; color:#1f9d55; margin-right:3px; }
.addb:hover{ background:#bdeccb; }
.addrow{ margin-top:6px; border:1px dashed var(--headblue); background:#eaf4fb; color:var(--headblue2);
  padding:5px 12px; border-radius:6px; cursor:pointer; font-size:12px; font-weight:600; }

/* =========================================================
   CUSTOM CONTENT PAGES (block editor)
   ========================================================= */
.custom-content{ position:relative; z-index:2; height:100%; overflow:hidden;
  padding:40mm 16mm 40mm; font-family:"Baloo 2","Segoe UI",sans-serif; color:#1c3f94; }
.custom-page .logo{ width:38mm; }

/* blocks */
.block{ position:relative; margin:0 0 12px; break-inside:avoid; }
.block:last-child{ margin-bottom:0; }
.block-tools{ position:absolute; top:-10px; right:0; gap:3px; z-index:12; display:none; }
.block:hover > .block-tools, .block:focus-within > .block-tools{ display:flex; }
.block-tools button{ border:none; background:#1f6fb0; color:#fff; width:23px; height:23px;
  border-radius:5px; cursor:pointer; font-size:12px; line-height:1; box-shadow:0 1px 3px rgba(0,0,0,.25); }
.block-tools button:hover{ background:#0b5fa5; }
.block-body h2{ font-family:"Baloo 2",sans-serif; font-size:21pt; font-weight:800; color:#26307e; margin:0; }
.block-body p{ font-size:13.5pt; line-height:1.5; margin:0; }
.block-body ul{ font-size:13.5pt; line-height:1.5; margin:0 0 0 22px; }
.custom-content [contenteditable]:focus{ outline:2px solid #2f8fd0; outline-offset:2px; border-radius:3px; }

/* columns */
.cols{ display:flex; gap:16px; }
.cols .col{ flex:1; font-size:12.5pt; line-height:1.45; min-height:24px; padding:2px; }
.cols .col:hover{ outline:1px dashed #cfe0f0; }

/* image block */
.cimg{ position:relative; display:inline-block; max-width:100%; vertical-align:top; }
.cimg img{ width:100%; display:block; border-radius:2px; }
.cimg.align-left{ display:block; text-align:left; }
.cimg.align-center{ display:block; text-align:center; margin:0 auto; }
.cimg.align-right{ display:block; text-align:right; margin-left:auto; }
.cimg.dragging{ opacity:0.5; border:2px dashed #2f8fd0; border-radius:4px; }
.cimg-placeholder{ border:2px dashed #9bc0e2; color:#3a7cae; padding:34px 20px; text-align:center;
  cursor:pointer; border-radius:8px; background:#f3f8fc; font-size:12pt; min-width:200px; }
.img-resize{ position:absolute; width:12px; height:12px; background:#2f8fd0; border:2px solid #fff;
  border-radius:50%; z-index:9; box-shadow:0 1px 3px rgba(0,0,0,.35); display:none; }
.cimg:hover .img-resize{ display:block; }   /* show handles when hovering the image */
.rh-nw{ top:-7px; left:-7px; cursor:nwse-resize; }
.rh-n { top:-7px; left:50%; transform:translateX(-50%); cursor:ns-resize; }
.rh-ne{ top:-7px; right:-7px; cursor:nesw-resize; }
.rh-e { top:50%; right:-7px; transform:translateY(-50%); cursor:ew-resize; }
.rh-se{ bottom:-7px; right:-7px; cursor:nwse-resize; }
.rh-s { bottom:-7px; left:50%; transform:translateX(-50%); cursor:ns-resize; }
.rh-sw{ bottom:-7px; left:-7px; cursor:nesw-resize; }
.rh-w { top:50%; left:-7px; transform:translateY(-50%); cursor:ew-resize; }

/* alignment buttons — always visible, click or drag-drop to align */
.img-dropzones{ display:flex; gap:6px; margin-top:8px; justify-content:center; }
.dropzone{ border:1.5px solid #cfd8e3; background:#fff; color:#1f6fb0; border-radius:8px;
  padding:5px 14px; font-size:12px; font-weight:600; cursor:pointer; transition:all .15s;
  min-width:74px; text-align:center; user-select:none; }
.dropzone:hover{ background:#eaf4fb; border-color:#2f8fd0; }
.dropzone.active{ background:#2f8fd0; border-color:#2f8fd0; color:#fff; }
.dropzone.drag-over{ border-color:#2f8fd0; background:#e0f0ff; color:#1f6fb0; transform:scale(1.05); }
.drag-clone{ box-shadow:0 4px 20px rgba(0,0,0,.3); }

/* image + text layout blocks */
.img-text-layout{ display:flex; gap:16px; align-items:flex-start; }
.img-text-layout.layout-left{ flex-direction:row; }
.img-text-layout.layout-right{ flex-direction:row-reverse; }
.img-text-layout.layout-both{ flex-direction:row; align-items:flex-start; }
.img-text-layout.layout-both .layout-text-col{ flex:1 1 0; }
.img-text-layout.layout-both .layout-img{ flex:0 0 auto; align-self:flex-start; }
.img-text-layout .layout-img{ flex:0 0 auto; align-self:flex-start; }
.img-text-layout .layout-img img{ width:100%; display:block; border-radius:2px; }
/* legacy single text block (older saved projects) */
.img-text-layout .layout-text{ flex:1; font-size:13.5pt; line-height:1.5; min-height:60px; padding:4px; }
.img-text-layout .layout-text:hover{ outline:1px dashed #cfe0f0; }
/* text column with multiple editable rows */
.layout-text-col{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:8px; }
.layout-row{ position:relative; }
.layout-row .lr-text{ font-size:13.5pt; line-height:1.5; padding:4px 24px 4px 4px; min-height:24px; }
.layout-row:hover{ outline:1px dashed #cfe0f0; }
.layout-row .lr-del{ position:absolute; top:2px; right:2px; display:none; border:none; background:#ffe3e3;
  color:#c0392b; border-radius:4px; width:20px; height:20px; cursor:pointer; font-weight:700; font-size:12px; line-height:1; }
.layout-row:hover .lr-del{ display:block; }
.layout-addrow{ align-self:flex-start; border:1px dashed #2f8fd0; background:#eaf4fb; color:#1f6fb0;
  border-radius:6px; font-size:11px; padding:4px 12px; cursor:pointer; font-weight:600; }
.layout-addrow:hover{ background:#dceaf6; }

/* ---------- free draggable text boxes ---------- */
.floatbox{ position:absolute; z-index:8; min-width:60px; }
.fb-text{ outline:1px dashed transparent; padding:6px 9px; min-height:24px; background:transparent;
  font-family:"Baloo 2","Segoe UI",sans-serif; font-size:13pt; color:#1c3f94; line-height:1.4; border-radius:3px; }
.floatbox:hover .fb-text{ outline-color:#9bc0e2; }      /* show dashed border only on hover */
.fb-text:focus{ outline:2px solid #2f8fd0; background:rgba(255,255,255,.6); }
.fb-bar{ position:absolute; top:-22px; left:0; display:none; gap:4px; align-items:center; }
.floatbox:hover .fb-bar, .floatbox:focus-within .fb-bar{ display:flex; }
.fb-move{ background:#2f8fd0; color:#fff; font-size:11px; font-weight:600; padding:2px 9px;
  border-radius:5px 5px 0 0; cursor:move; user-select:none; }
.fb-del{ background:#c0392b; color:#fff; border:none; border-radius:4px; width:20px; height:20px;
  cursor:pointer; font-size:11px; font-weight:700; line-height:1; }
.fb-resize{ position:absolute; right:-6px; bottom:-6px; width:13px; height:13px; background:#2f8fd0;
  border:2px solid #fff; border-radius:50%; cursor:nwse-resize; display:none; z-index:9; }
.floatbox:hover .fb-resize{ display:block; }
/* floating IMAGE box */
.floatimg .fb-img{ cursor:pointer; }
.floatimg .fb-img img{ width:100%; height:auto; display:block; border-radius:3px; }
.fb-img-ph{ border:2px dashed #9bc0e2; color:#3a7cae; padding:30px 16px; text-align:center;
  border-radius:8px; background:#f3f8fc; font-size:12pt; }
/* floating EMOJI */
.floatemoji{ width:auto !important; }
.fb-emoji{ font-size:44px; line-height:1; user-select:none; padding:2px; outline:1px dashed transparent; }
.floatemoji:hover .fb-emoji{ outline-color:#9bc0e2; }
.fb-emoji:focus{ outline:2px solid #2f8fd0; }

/* emoji picker panel */
#emojiPicker{ position:fixed; left:202px; top:50%; transform:translateY(-50%); z-index:130;
  background:#fff; border:1px solid #d8d8d8; border-radius:12px; box-shadow:0 6px 22px rgba(0,0,0,.28);
  padding:0 10px 10px; width:288px; max-height:78vh; overflow-y:auto; display:none; }
#emojiPicker.show{ display:block; }
.emoji-head{ position:sticky; top:0; background:#fff; font-size:13px; font-weight:700; color:#1f6fb0;
  padding:10px 0 6px; border-bottom:1px solid #eee; z-index:1; }
.emoji-cat{ font-size:10.5px; font-weight:700; color:#9aa; text-transform:uppercase; letter-spacing:.5px; margin:8px 0 3px; }
.emoji-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.emoji-grid button{ border:none; background:#f5f9fc; border-radius:6px; font-size:19px; cursor:pointer;
  padding:5px 0; line-height:1; }
.emoji-grid button:hover{ background:#dceaf6; transform:scale(1.12); }

@media print{
  .fb-bar, .fb-resize, .fb-img-ph{ display:none !important; }
  .fb-text, .fb-emoji{ outline:none !important; background:transparent !important; }
}

/* =========================================================
   DYNAMIC TABLE COLUMNS (price / tech / elements / .ctable)
   ========================================================= */
.dyn-th{ position:relative; }
.col-tools{ position:absolute; top:-15px; left:50%; transform:translateX(-50%);
  display:none; gap:2px; z-index:20; white-space:nowrap; background:#fff; padding:2px; border-radius:5px;
  box-shadow:0 2px 8px rgba(0,0,0,.25); }
.dyn-th:hover .col-tools, .dyn-th:focus-within .col-tools{ display:flex; }
.col-tools button{ border:none; background:#1f6fb0; color:#fff; width:18px; height:18px; border-radius:4px;
  cursor:pointer; font-size:10px; font-weight:700; line-height:1; padding:0; box-shadow:0 1px 3px rgba(0,0,0,.3); }
.col-tools button:hover{ background:#0b5fa5; }
.col-tools button[data-action="col-del"]{ background:#c0392b; }
.col-tools button[data-action="col-del"]:hover{ background:#a52f22; }
.col-tools button[data-action="col-add-num"],
.col-tools button[data-action="col-add-alpha"]{ background:#1f9d55; }
.col-tools button[data-action="col-add-num"]:hover,
.col-tools button[data-action="col-add-alpha"]:hover{ background:#178244; }
.col-resize{ position:absolute; top:0; right:-3px; bottom:0; width:6px; cursor:col-resize; z-index:15; }
.col-resize:hover, .col-resize:active{ background:rgba(47,143,208,.35); }

/* table block */
.ctable{ width:100%; border-collapse:collapse; }
.ctable td{ border:1px solid #9bb6d6; padding:6px 9px; font-size:12pt; min-width:32px; vertical-align:top; }
.ctable tr:first-child td{ background:#eef4fb; font-weight:700; color:#1f6fb0; }
.table-ctl{ margin-top:5px; display:flex; gap:6px; }
.table-ctl button{ border:1px dashed #2f8fd0; background:#eaf4fb; color:#1f6fb0; border-radius:5px;
  font-size:11px; padding:3px 9px; cursor:pointer; font-weight:600; }
.table-ctl button:hover{ background:#dceaf6; }

/* per-page controls */
.page-tools{ position:absolute; bottom:7px; left:50%; transform:translateX(-50%); display:flex; gap:8px; z-index:30; }
.page-tools button{ border:none; border-radius:6px; padding:5px 12px; font-size:12px; font-weight:700;
  cursor:pointer; box-shadow:0 2px 7px rgba(0,0,0,.25); }
.page-tools .add-pg{ background:#1f9d55; color:#fff; }
.page-tools .add-pg:hover{ background:#178244; }
.page-tools .rm-pg{ background:#c0392b; color:#fff; }
.page-tools .rm-pg:hover{ background:#a52f22; }

/* floating block toolbar — vertical, left side */
.float-toolbar{ position:fixed; left:12px; top:50%; transform:translateY(-50%); z-index:120;
  width:182px; background:#fff; border:1px solid #d8d8d8; border-radius:12px; box-shadow:0 6px 20px rgba(0,0,0,.25);
  display:flex; flex-direction:column; gap:9px; padding:10px; max-height:92vh; overflow:auto; }
.float-toolbar > div{ padding-bottom:9px; border-bottom:1px solid #eee; }
.float-toolbar > div:last-child{ border-bottom:none; padding-bottom:0; }
/* row groups (format, align, history) */
.ft-group{ display:flex; flex-wrap:wrap; gap:5px; justify-content:center; align-items:center; }
/* insert blocks — clean 2-column grid */
.ft-insert{ display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.float-toolbar button{ border:1px solid #cfd8e3; background:#fff; color:#1f6fb0; border-radius:6px;
  padding:6px 8px; font-size:12px; font-weight:600; cursor:pointer; line-height:1.1; }
.float-toolbar button:hover{ background:#eaf4fb; }
.ft-group button{ min-width:30px; }
.ft-color{ display:inline-flex; align-items:center; gap:2px; border:1px solid #cfd8e3; border-radius:6px;
  padding:3px 5px; font-size:12px; font-weight:700; color:#1f6fb0; cursor:pointer; background:#fff; }
.ft-color input{ width:18px; height:18px; border:none; padding:0; background:none; cursor:pointer; }
.ft-history button{ flex:1; }
.ft-insert button{ width:100%; text-align:left; font-size:11px; padding:6px 7px; white-space:nowrap; }
.ft-insert .ft-textbox{ grid-column:1 / -1; text-align:center; background:#eaf4fb; border-color:#2f8fd0; color:#1f6fb0; font-weight:700; }
.ft-insert .ft-textbox:hover{ background:#dceaf6; }

/* hide editor controls while capturing pages for Editable PDF */
.exporting .no-print{ display:none !important; }
.exporting .page{ box-shadow:none !important; }

/* loading overlay (download / import) */
#loader{ position:fixed; inset:0; z-index:300; background:rgba(15,25,50,.55); backdrop-filter:blur(1px);
  display:none; align-items:center; justify-content:center; }
#loader.show{ display:flex; }
.loader-box{ background:#fff; border-radius:14px; padding:26px 36px; text-align:center;
  box-shadow:0 12px 44px rgba(0,0,0,.4); min-width:240px; }
.spinner{ width:48px; height:48px; border:5px solid #dceaf6; border-top-color:#2f8fd0;
  border-radius:50%; margin:0 auto 16px; animation:aqsspin .8s linear infinite; }
@keyframes aqsspin{ to{ transform:rotate(360deg); } }
.loader-msg{ color:#1f6fb0; font-weight:700; font-size:14.5px; }
.loader-sub{ color:#88a; font-size:11.5px; margin-top:6px; }
@media print{ #loader{ display:none !important; } }

/* imported PDF pages (experimental) */
.imported-page .full{ width:100%; height:100%; object-fit:fill; }
.imported-overlay{ position:absolute; inset:0; z-index:3; background:transparent; padding:12mm; height:100%; overflow:hidden; }
.imp-bg-btn{ position:absolute; top:8px; left:8px; z-index:20; }

/* =========================================================
   WARRANTY CARD  (independent editor view)
   ========================================================= */
/* ---- view switching (toolbar + pages) ---- */
.warranty-only{ display:none !important; }
body.view-warranty .brochure-only{ display:none !important; }
body.view-warranty .warranty-only{ display:inline-block !important; }
body:not(.view-warranty) .warranty-page{ display:none; }
body.view-warranty .page:not(.warranty-page){ display:none; }
body.view-warranty .float-toolbar,
body.view-warranty #emojiPicker{ display:none !important; }
.warranty-nav{ background:#eef7ff; border-color:#1f6fb0 !important; font-weight:700; }

/* ---- the card ---- */
/* light aqua base + a faint organic "water" texture (SVG turbulence) */
.warranty-page{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='440'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.02' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.30 0 0 0 0 0.56 0 0 0 0 0.78 0 0 0 -0.85 0.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"),
    linear-gradient(180deg,#bfe4f4 0%,#d8f0fb 45%,#bce2f3 100%);
}
.warranty-page::before{           /* faint watermark: sarah / AQUA SOFT / Mfg by (no WATER ATM) — as in the original */
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:url('assets/logo-watermark.png') no-repeat center 50%;
  background-size:100% auto;
  opacity:.15; filter:grayscale(55%);
}
.wc{ position:relative; z-index:2; height:100%; overflow:hidden;
  padding:8mm 13mm 6mm; color:#12224f;
  font-family:"Times New Roman",Georgia,"Cambria",serif; }

/* header */
.wc-head{ text-align:center; }
.wc-logo{ width:60mm; max-width:58%; display:block; margin:0 auto 2px; }
.wc-mfg{ font-size:11pt; font-weight:700; color:#111; letter-spacing:.2px; }

/* title */
.wc-title{ text-align:center; font-size:41pt; font-weight:700; color:#232c85;
  line-height:1.0; letter-spacing:.5px; margin:1px 0 0; }
.wc-sub{ text-align:center; font-size:20pt; font-weight:700; color:#2f7bc0; margin:0 0 6px; }

/* retain banner */
.wc-banner{ background:linear-gradient(180deg,#77b6f8 0%,#a3d5fa 55%,#c8efff 100%);
  text-align:center; font-weight:700; font-size:12pt; color:#0f1c33;
  padding:5px 10px; border-radius:2px; margin-bottom:7px; }

/* customer info rows */
.wc-info{ font-size:12.5pt; }
.wc-row{ display:flex; align-items:baseline; gap:6px; margin-bottom:3px; min-height:22px; }
.wc-lbl{ white-space:nowrap; font-weight:700; color:#12224f; flex:0 0 auto; }
/* value fields: a ruled line under EVERY wrapped line (repeating gradient),
   so a 2-line address is underlined on both lines like the original card */
.wc-val{ flex:1 1 auto; min-width:20px; color:#123; font-weight:400;
  line-height:22px; min-height:22px; padding:0 3px;
  --wc-rule:repeating-linear-gradient(to bottom, transparent 0, transparent 20.7px, #2b2b2b 20.7px, #2b2b2b 22px);
  background-image:var(--wc-rule);
  word-break:break-word; overflow-wrap:anywhere; }
.wc-grid{ display:grid; grid-template-columns:1fr 1fr; column-gap:26px; }
.wc-grid .wc-row.wc-empty{ border:none; min-height:0; margin:0; }

/* service box */
.wc-service{ border:1.7px solid #7fb4e0; border-radius:18px; margin:6px 0 7px;
  background:linear-gradient(180deg, rgba(233,245,252,.45), rgba(216,237,251,.45)); padding:2px 18px 8px;
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.28); }
.wc-service-head{ display:flex; align-items:center; gap:15px; white-space:nowrap;
  text-align:center; font-weight:700; font-size:13.5pt; color:#6b5c9e; padding:5px 6px 7px; }
.wc-service-head::before, .wc-service-head::after{ content:""; flex:1 1 auto; height:0;
  border-top:1.3px solid #7fb4e0; }
.wc-service .wc-row{ font-size:12.5pt; margin-bottom:2px; }

/* warranty conditions (fixed) */
.wc-terms{ margin:0; padding-left:26px; }
.wc-terms li{ font-size:12pt; line-height:1.26; color:#0f0f0f; margin-bottom:2px;
  padding-left:5px; text-align:left; font-weight:700; }

/* keep the ruled underline(s) visible even when focused
   (override the global shorthand that would clear the background image) */
.wc-val:focus{ background-color:#eef7ff; background-image:var(--wc-rule); }

/* ---------- print ---------- */
@page{ size:A4; margin:0; }
@media print{
  body{ background:#fff; padding:0; }
  .no-print{ display:none !important; }
  .page{ box-shadow:none; margin:0; page-break-after:always; break-after:page; }
  .page:last-child{ page-break-after:avoid; break-after:avoid; }
  [contenteditable="true"]:hover, [contenteditable="true"]:focus{ outline:none; background:transparent; }
  .float-toolbar, .page-tools, .block-tools, .table-ctl, .img-resize, .cimg-placeholder, .img-dropzones, .dropzone{ display:none !important; }
  .block{ break-inside:avoid; }
  .custom-content{ overflow:hidden; }
  .custom-content [contenteditable]:focus{ outline:none !important; }
  .cols .col:hover{ outline:none !important; }
  *{ -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
}
