/* Invoice generator page */
body { background:#f6f7f9; }
.toolwrap { max-width:1180px; margin:0 auto; padding:24px 20px 10px; }
h1.tool { font-size:28px; font-weight:800; letter-spacing:-.5px; line-height:1.2; }
.tagline { color:var(--mut); font-size:14.5px; margin:7px 0 16px; max-width:680px; line-height:1.55; }

.modeswitch { display:flex; background:#e9ebf0; border-radius:12px; padding:4px; max-width:560px; margin-bottom:18px; }
.modeswitch button { flex:1; border:none; background:transparent; padding:11px 10px; border-radius:9px; font-size:14px; font-weight:600; cursor:pointer; color:var(--mut); font-family:inherit; }
.modeswitch button.on { background:#fff; color:var(--ink); box-shadow:0 2px 8px rgba(20,24,40,.12); font-weight:800; }
.modeswitch button small { display:block; font-size:11px; font-weight:500; color:#8a90a0; margin-top:2px; }

.layout { display:grid; grid-template-columns:372px 1fr; gap:22px; align-items:start; }
@media (max-width:900px){ .layout{ grid-template-columns:1fr; } }
.panel { background:#fff; border:1px solid var(--line); border-radius:13px; padding:18px; }
.panel h2 { font-size:12px; text-transform:uppercase; letter-spacing:.8px; color:#8a90a0; margin:19px 0 8px; }
.panel h2:first-child { margin-top:0; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.tchip { font-size:12px; padding:6px 11px; border-radius:999px; background:#f2f4f7; border:1px solid var(--line); cursor:pointer; font-family:inherit; }
.tchip.on { background:var(--acc); color:#fff; border-color:var(--acc); font-weight:700; }
label.f { display:block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:#8a90a0; margin:11px 0 4px; }
input[type=text], input[type=number], input[type=date], input[type=email], select, textarea { width:100%; border:1px solid var(--line); background:#fbfcfd; border-radius:8px; padding:8px 10px; font-size:13.5px; font-family:inherit; color:var(--ink); }
textarea { resize:vertical; min-height:52px; font-size:12.5px; }
input:focus, select:focus, textarea:focus { outline:2px solid #bbf7d0; border-color:var(--acc); background:#fff; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.colheads, .irow { display:grid; grid-template-columns:2fr .62fr .95fr .3fr; gap:7px; align-items:center; }
.colheads.sku, .irow.sku { grid-template-columns:.8fr 1.6fr .55fr .85fr .3fr; }
.colheads { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:#8a90a0; margin-bottom:5px; }
.irow { margin-bottom:7px; }
.irow input { padding:7px 8px; font-size:12.5px; }
.x { background:none; border:none; color:#b0b6c2; font-size:16px; cursor:pointer; }
.x:hover { color:#dc2626; }
.additem { color:var(--acc); font-weight:700; font-size:13px; cursor:pointer; background:none; border:none; padding:4px 0; font-family:inherit; }
.logozone { border:2px dashed #c9cedb; border-radius:10px; padding:12px; text-align:center; background:#fafbfc; cursor:pointer; font-size:12.5px; color:var(--mut); }
.logozone:hover { border-color:var(--acc); }
.logozone img { max-height:46px; max-width:170px; }
.logozone .rm { color:#dc2626; font-size:11.5px; font-weight:700; display:inline-block; margin-top:6px; }
.sig { font-family:"Segoe Script","Brush Script MT",cursive; font-size:22px; }
.designs { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.dthumb { height:58px; border-radius:9px; border:2px solid var(--line); background:#fff; cursor:pointer; position:relative; overflow:hidden; padding:6px; text-align:left; font-family:inherit; width:100%; }
.dthumb.on { border-color:var(--acc); }
.dthumb i { display:block; height:4px; border-radius:2px; background:#d6dae2; margin-bottom:4px; }
.dthumb span { position:absolute; bottom:3px; left:6px; right:4px; font-size:8.8px; font-weight:700; color:#5b6270; line-height:1.15; }
.colourrow { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.swatch { width:24px; height:24px; border-radius:50%; cursor:pointer; border:2px solid #fff; box-shadow:0 0 0 1px var(--line); padding:0; }
.swatch.on { box-shadow:0 0 0 2px var(--ink); }
.hidden { display:none !important; }
.smallbtn { font-size:12px; padding:7px 11px; border-radius:8px; background:#fff; border:1px solid var(--line); cursor:pointer; font-weight:600; font-family:inherit; }
.smallbtn:hover { border-color:#c8cdd8; }

.preview-zone { position:sticky; top:78px; }
@media (max-width:900px){ .preview-zone{ position:static; } }
.pv-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.pv-head .nav { display:flex; gap:6px; align-items:center; font-size:12.5px; color:var(--mut); }
.pv-head .nav button { width:30px; height:30px; border-radius:50%; border:1px solid var(--line); background:#fff; cursor:pointer; font-size:15px; }
.actions { display:flex; gap:9px; align-items:center; margin-top:14px; flex-wrap:wrap; background:#fff; border:1px solid var(--line); border-radius:13px; padding:13px; }
@media (max-width:900px){ .actions{ position:sticky; bottom:10px; z-index:40; box-shadow:0 10px 30px rgba(20,24,40,.18); } }
.dl { background:var(--acc); color:#fff; font-weight:700; font-size:15px; border:none; padding:13px 24px; border-radius:10px; cursor:pointer; box-shadow:0 8px 20px rgba(22,163,74,.3); font-family:inherit; }
.fmt { font-size:12.5px; padding:9px 13px; border-radius:9px; background:#fff; border:1px solid var(--line); cursor:pointer; font-weight:600; font-family:inherit; }
.badge { font-size:12px; color:#166534; background:#dcfce7; border:1px solid #bbf7d0; padding:7px 12px; border-radius:999px; font-weight:600; }
.saved { font-size:12px; color:#8a90a0; margin-top:9px; }
.dlnote { font-size:12px; color:var(--mut); margin-top:8px; min-height:15px; }
.freemeans { background:#fff; border:1px solid var(--line); border-radius:13px; padding:20px 22px; margin-top:26px; }
.freemeans h3 { font-size:16px; margin-bottom:8px; }
.freemeans p, .freemeans li { font-size:13.5px; color:var(--mut); line-height:1.65; }
.freemeans ul { margin:6px 0 0 18px; }

/* bulk */
.bulksteps { counter-reset:step; }
.bstep { display:flex; gap:13px; padding:13px 0; border-bottom:1px solid #eef0f4; }
.bstep:last-child { border-bottom:none; }
.bstep .n { width:28px; height:28px; flex-shrink:0; border-radius:50%; background:var(--acc); color:#fff; font-weight:800; font-size:13px; display:flex; align-items:center; justify-content:center; }
.bstep b { font-size:14px; }
.bstep p { font-size:12.5px; color:var(--mut); line-height:1.55; margin-top:2px; }
.bstep .fmt { margin-top:8px; }
.report { margin-top:14px; font-size:13px; line-height:1.6; }
.report .ok { color:#166534; font-weight:700; }
.report .err { color:#b91c1c; }
.report ul { margin:6px 0 0 18px; color:#b91c1c; font-size:12.5px; }

/* guide + faq */
.content { max-width:1180px; margin:0 auto; padding:10px 20px 60px; }
.guide { background:#fff; border:1px solid var(--line); border-radius:13px; padding:28px 30px; margin-top:26px; }
.guide h2 { font-size:22px; font-weight:800; letter-spacing:-.4px; margin-bottom:10px; }
.guide h3 { font-size:16px; font-weight:800; margin:20px 0 6px; }
.guide p, .guide li { font-size:14.5px; line-height:1.7; color:#333a45; }
.guide ul, .guide ol { margin:6px 0 6px 20px; }
.faq { margin-top:26px; }
.faq h2 { font-size:22px; font-weight:800; letter-spacing:-.4px; margin-bottom:12px; }
.faq details { background:#fff; border:1px solid var(--line); border-radius:11px; padding:14px 18px; margin-bottom:9px; }
.faq summary { font-weight:700; font-size:14.5px; cursor:pointer; }
.faq details p { font-size:14px; line-height:1.65; color:var(--mut); margin-top:8px; }

/* ===== invoice sheet (designs A, B, C, E, F, G) ===== */
.sheet { background:#fff; border:1px solid var(--line); border-radius:6px; padding:32px 34px; box-shadow:0 16px 38px rgba(20,24,40,.10); font-size:13px; line-height:1.55; --dacc:#1d4ed8; position:relative; }
.sheet .s-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.sheet .s-logo { max-height:56px; max-width:180px; object-fit:contain; }
.sheet .s-brand { display:flex; gap:12px; align-items:center; }
.sheet.C .s-band-left { display:flex; align-items:center; gap:12px; }
.sheet.C .s-logo-band { max-height:44px; max-width:150px; background:#fff; border-radius:5px; padding:3px; }
.sheet.E .s-logo-side { max-height:48px; max-width:140px; background:#fff; border-radius:6px; padding:5px; margin-top:14px; display:block; }
.sheet.F .s-brand { flex-direction:column; gap:8px; }
.sheet .s-logo-fallback { width:44px; height:44px; border-radius:9px; background:var(--dacc); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:18px; flex-shrink:0; }
.sheet .s-title { font-size:27px; font-weight:800; letter-spacing:2px; color:var(--dacc); }
.sheet .s-meta { color:#7a8090; font-size:12px; }
.sheet .s-addr { font-size:12px; color:#4b5160; white-space:pre-line; }
.sheet table { width:100%; border-collapse:collapse; margin-top:16px; }
.sheet th, .sheet td { text-align:left; padding:8px; }
.sheet .num { text-align:right; }
.sheet .totals { margin-left:auto; width:260px; margin-top:10px; }
.sheet .totals td { padding:4px 8px; border:none !important; }
.sheet .s-foot { margin-top:22px; display:flex; justify-content:space-between; align-items:flex-end; gap:16px; }
.sheet .s-sig { text-align:center; }
.sheet .sigline { border-top:1px solid #c9cedb; font-size:10px; color:#7a8090; padding-top:3px; margin-top:2px; min-width:150px; }
.sheet .s-terms { margin-top:18px; font-size:11px; color:#5b6270; white-space:pre-line; border-top:1px solid #eceef2; padding-top:10px; }
.sheet .s-notes { margin-top:14px; font-size:11.5px; color:#4b5160; white-space:pre-line; }
.sheet .stamp { position:absolute; top:110px; right:36px; border:3px solid #b45309; color:#b45309; font-weight:800; letter-spacing:2px; padding:5px 14px; transform:rotate(8deg); border-radius:5px; font-size:15px; opacity:.85; }

.sheet.A th { background:#eef3fe; color:var(--dacc); font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.sheet.A td { border-bottom:1px solid #eceef2; }
.sheet.A .s-head { border-bottom:3px solid var(--dacc); padding-bottom:14px; }
.sheet.A .grand td { background:var(--dacc); color:#fff; font-weight:800; }
.sheet.A .bal td { font-weight:800; color:var(--dacc); }

.sheet.B { font-family:"Helvetica Neue",Arial,sans-serif; }
.sheet.B .s-title { font-weight:300; letter-spacing:7px; color:var(--ink); }
.sheet.B .s-head { border-bottom:1px solid var(--ink); padding-bottom:14px; }
.sheet.B th { font-size:10.5px; text-transform:uppercase; letter-spacing:1.5px; color:#7a8090; border-bottom:1px solid var(--ink); }
.sheet.B td { border-bottom:1px solid #eceef2; padding:10px 8px; }
.sheet.B .grand td, .sheet.B .bal td { font-size:14.5px; font-weight:700; border-top:2px solid var(--ink); }

.sheet.C .s-band { background:var(--dacc); margin:-32px -34px 18px; padding:20px 34px; display:flex; justify-content:space-between; align-items:center; border-radius:6px 6px 0 0; }
.sheet.C .s-title { color:#fff; }
.sheet.C .bandsub { font-size:11px; color:rgba(255,255,255,.85); }
.sheet.C .bandco { font-size:15px; color:#fff; font-weight:800; }
.sheet.C th { background:#1c1e24; color:#fff; font-size:11px; text-transform:uppercase; }
.sheet.C td { border-bottom:1px solid #eceef2; }
.sheet.C .grand td { background:#f6f7f9; font-weight:800; font-size:14px; border-top:3px solid var(--dacc); }
.sheet.C .bal td { font-weight:800; color:var(--dacc); font-size:14px; }

.sheet.E { padding:0; overflow:hidden; display:flex; }
.sheet.E .s-side { background:var(--dacc); color:#eafaf3; width:182px; flex-shrink:0; padding:28px 20px; }
.sheet.E .s-side .s-title { color:#fff; font-size:21px; }
.sheet.E .s-side .lbl { font-size:9.5px; text-transform:uppercase; letter-spacing:1.2px; opacity:.78; margin-top:15px; }
.sheet.E .s-side .s-addr { color:#eafaf3; opacity:.9; }
.sheet.E .s-main { flex:1; padding:28px 24px; min-width:0; }
.sheet.E th { color:var(--dacc); font-size:11px; text-transform:uppercase; border-bottom:2px solid #e3e6ec; }
.sheet.E td { border-bottom:1px solid #eef2f2; }
.sheet.E .grand td, .sheet.E .bal td { font-weight:800; color:var(--dacc); font-size:14px; }

.sheet.F { font-family:Georgia,"Times New Roman",serif; }
.sheet.F .s-head { flex-direction:column; align-items:center; text-align:center; border-bottom:4px double var(--dacc); padding-bottom:14px; }
.sheet.F .s-title { font-weight:400; letter-spacing:5px; color:var(--dacc); font-size:24px; }
.sheet.F th { font-size:11px; text-transform:uppercase; letter-spacing:1px; border-bottom:1px solid var(--dacc); }
.sheet.F td { border-bottom:1px solid #e7e5e4; }
.sheet.F .grand td, .sheet.F .bal td { font-weight:700; border-top:1px solid var(--dacc); }

.sheet.G { font-family:Consolas,"SF Mono","Courier New",monospace; font-size:12px; }
.sheet.G .s-title { font-size:20px; letter-spacing:0; color:var(--ink); }
.sheet.G .s-title::before { content:"> "; color:var(--acc); }
.sheet.G .s-logo-fallback { background:var(--ink); border-radius:3px; }
.sheet.G th { font-size:10.5px; text-transform:uppercase; border-top:1px dashed #a3a8b5; border-bottom:1px dashed #a3a8b5; }
.sheet.G td { border-bottom:1px dotted #d6dae2; }
.sheet.G .grand td, .sheet.G .bal td { font-weight:700; border-top:1px dashed #a3a8b5; }

.toast { position:fixed; bottom:22px; left:50%; transform:translateX(-50%) translateY(90px); background:#16181d; color:#fff; font-size:13.5px; padding:12px 20px; border-radius:10px; transition:transform .3s; z-index:80; max-width:88vw; text-align:center; }
.toast.show { transform:translateX(-50%) translateY(0); }

@media print {
  body * { visibility:hidden; }
  #sheet, #sheet * { visibility:visible; }
  #sheet { position:absolute; left:0; top:0; width:100%; box-shadow:none; border:none; }
  @page { margin:12mm; }
}
