/* ============================================================
   PDF Tools — INFOTRONICS SOFTWEB
   Same design DNA as the corporate site + product suite:
   navy glass panels, cyan/blue gradient, Orbitron headings.
   ============================================================ */
:root {
  --navy-950: #050d1f;
  --navy-900: #0b1b36;
  --navy-800: #10254a;
  --blue-600: #1668e3;
  --blue-500: #2f8bff;
  --cyan-400: #48d7ff;
  --ink: #e8eefb;
  --muted: #93a4c4;
  --line: rgba(147, 164, 196, 0.18);
  --card: rgba(16, 37, 74, 0.55);
  --grad: linear-gradient(100deg, #2f8bff 0%, #48d7ff 55%, #7ce7ff 100%);
  --danger: #ff6b6b;
  --ok: #34d399;
  --r-lg: 22px;
  --r-md: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Orbitron", "Segoe UI", sans-serif;
  --body: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

/* Author styles like display:flex would otherwise beat the UA [hidden]
   rule and keep "hidden" elements visible (modal close/save looked broken).
   This single rule fixes every show()/hide() call in tools.js. */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--body);
  background:
    radial-gradient(circle at 15% -10%, rgba(47, 139, 255, 0.18), transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(72, 215, 255, 0.10), transparent 40%),
    var(--navy-950);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan-400); text-decoration: none; }
.muted { color: var(--muted); }
.hi { display: block; color: var(--muted); font-size: 0.92em; margin-top: 4px; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Brand bar ─────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 16px clamp(16px, 4vw, 44px);
  background: rgba(4, 12, 22, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad); color: #041022; font-size: 19px;
  box-shadow: 0 0 18px rgba(72, 215, 255, 0.35);
}
.brand__text { font-family: var(--display); letter-spacing: 1.5px; font-size: 15px; }
.brand__text b { color: var(--cyan-400); }
.topbar__links { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar__links a { color: var(--muted); font-size: 14.5px; transition: color 0.25s; }
.topbar__links a:hover { color: #fff; }

/* ── Hero ──────────────────────────────────────────────── */
.hero { text-align: center; padding: clamp(40px, 7vw, 80px) 20px 26px; }
.eyebrow {
  display: inline-block; font-size: 12.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--cyan-400);
  border: 1px solid rgba(72, 215, 255, 0.35);
  background: rgba(72, 215, 255, 0.08);
  padding: 7px 16px; border-radius: 99px; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 46px);
  letter-spacing: 1px; line-height: 1.2; margin: 0 0 14px;
}
.hero__sub { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.6; }
.hero__sub .hi { display: inline; }
.pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 99px;
}
.pill i { color: var(--cyan-400); }

/* ── Tool picker ───────────────────────────────────────── */
.tools {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px; max-width: 1180px; margin: 30px auto 10px; padding: 0 20px;
}
.tool-card {
  font-family: var(--body); text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 20px;
  color: var(--ink); position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.tool-card::after {
  content: ""; position: absolute; inset: auto -30% -60% -30%; height: 120px;
  background: var(--grad); opacity: 0; filter: blur(40px);
  transition: opacity 0.35s; pointer-events: none;
}
.tool-card:hover, .tool-card:focus-visible, .tool-card.on {
  transform: translateY(-5px);
  border-color: rgba(72, 215, 255, 0.55);
  box-shadow: 0 20px 44px -22px rgba(47, 139, 255, 0.8);
  outline: none;
}
.tool-card:hover::after, .tool-card.on::after { opacity: 0.35; }
.tool-card__ico {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 13px; font-size: 20px; color: #041022;
  background: var(--grad); margin-bottom: 14px;
}
.tool-card h3 { font-family: var(--display); font-size: 16px; letter-spacing: 1px; margin: 0 0 8px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tool-card .hi { font-size: 13px; }
.tool-card__go {
  display: inline-block; margin-top: 14px; font-size: 13px;
  font-weight: 600; color: var(--cyan-400); letter-spacing: 0.04em;
}

/* ── Work panel ────────────────────────────────────────── */
.panel {
  max-width: 980px; margin: 26px auto 40px; padding: clamp(20px, 3vw, 34px);
  background: var(--card); border: 1px solid rgba(72, 215, 255, 0.35);
  border-radius: var(--r-lg); backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px -24px rgba(3, 12, 32, 0.9);
  position: relative; scroll-margin-top: 90px;
}
.panel__head { position: relative; padding-right: 40px; margin-bottom: 18px; }
.panel__head h2 { font-family: var(--display); font-size: 21px; letter-spacing: 1.5px; margin: 0 0 6px; }
.panel__head p { margin: 0; color: var(--muted); font-size: 15px; }
.panel__close {
  position: absolute; top: -4px; right: 0; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
  cursor: pointer; font-size: 15px; transition: 0.25s;
}
.panel__close:hover { color: #fff; border-color: var(--danger); }

/* Dropzone */
.drop {
  border: 2px dashed rgba(72, 215, 255, 0.45);
  border-radius: var(--r-md); padding: 34px 18px; text-align: center;
  cursor: pointer; transition: 0.25s; background: rgba(72, 215, 255, 0.04);
}
.drop:hover, .drop.drag {
  border-color: var(--cyan-400); background: rgba(72, 215, 255, 0.10);
  box-shadow: inset 0 0 30px rgba(72, 215, 255, 0.08);
}
.drop i { font-size: 34px; color: var(--cyan-400); display: block; margin-bottom: 10px; }
.drop strong { display: block; font-size: 17px; margin-bottom: 6px; }
.drop span { color: var(--muted); font-size: 13.5px; }

.filechip {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 12px; padding: 10px 14px; font-size: 14.5px;
}
.filechip i { color: var(--ok); }
.filechip #fileName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.filechip #fileClear {
  margin-left: auto; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 15px;
}
.filechip #fileClear:hover { color: var(--danger); }

/* Options */
.opts { margin-top: 18px; }
.opt-label { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; margin: 14px 0 8px; }
.opt-label small, .field span small { color: var(--muted); font-weight: 400; }
.opt-note {
  margin: 0; font-size: 13.5px; color: var(--muted);
  background: rgba(47, 139, 255, 0.08); border-left: 3px solid var(--blue-500);
  padding: 9px 13px; border-radius: 8px;
}
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  font-family: var(--body); font-size: 14px; color: var(--ink);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 16px; cursor: pointer; transition: 0.22s;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.seg button small { color: var(--muted); font-size: 11.5px; }
.seg button:hover { border-color: rgba(72, 215, 255, 0.5); }
.seg button.on {
  background: var(--grad); color: #041022; border-color: transparent;
  font-weight: 600; box-shadow: 0 10px 22px -12px rgba(47, 139, 255, 0.9);
}
.seg button.on small { color: rgba(4, 16, 34, 0.7); }

/* Watermark + extras */
.wm { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-top: 14px; }
.wm input[type="text"] {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(3, 10, 24, 0.7);
  color: var(--ink); font-family: var(--body); font-size: 14.5px;
}
.wm__row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.wm__row label { display: flex; align-items: center; gap: 8px; }
.wm__row input[type="number"] { width: 74px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(3, 10, 24, 0.7); color: var(--ink); }
.wm__row input[type="color"] { width: 44px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: none; padding: 2px; }

.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.field span { display: block; font-size: 13.5px; margin-bottom: 7px; color: var(--ink); }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(3, 10, 24, 0.7);
  color: var(--ink); font-family: var(--body); font-size: 14.5px;
}
.field input:focus { outline: none; border-color: var(--cyan-400); }

/* Buttons / progress / messages */
.actions { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-size: 15.5px; font-weight: 600;
  border-radius: 12px; padding: 13px 26px; cursor: pointer;
  border: 1px solid transparent; transition: 0.28s var(--ease); text-decoration: none;
}
.btn--primary { background: var(--grad); color: #041022; box-shadow: 0 16px 34px -16px rgba(47, 139, 255, 0.9); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line); color: var(--ink); font-size: 14px; padding: 10px 16px; }
.btn--ghost:hover { border-color: var(--cyan-400); }

.progress { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.progress__bar { height: 100%; width: 0%; background: var(--grad); transition: width 0.2s; }

.msg { margin-top: 14px; padding: 12px 15px; border-radius: 11px; font-size: 14.5px; }
.msg.error { background: rgba(255, 107, 107, 0.10); border: 1px solid rgba(255, 107, 107, 0.45); color: #ffd7d7; }
.msg.ok { background: rgba(52, 211, 153, 0.10); border: 1px solid rgba(52, 211, 153, 0.4); color: #d7fff1; }

/* Result */
.result {
  display: flex; gap: 18px; align-items: flex-start; margin-top: 20px;
  background: rgba(52, 211, 153, 0.07); border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--r-md); padding: 20px;
}
.result__ico { font-size: 30px; color: var(--ok); }
.result__body h3 { font-family: var(--display); font-size: 17px; margin: 0 0 6px; letter-spacing: 1px; }
.result__body p { margin: 0 0 12px; font-size: 14.5px; }
.result .fine { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.result .fine .hi { display: inline; }

/* ── Editor page map ───────────────────────────────────── */
.editor-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.editor-bar .muted { font-size: 13px; margin-left: auto; }
.pages {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; margin-top: 14px;
}
.page-card {
  background: rgba(3, 10, 24, 0.65); border: 1px solid var(--line);
  border-radius: 13px; overflow: hidden; position: relative;
  transition: border-color 0.25s, opacity 0.25s;
}
.page-card.off { opacity: 0.35; border-style: dashed; }
.page-card__thumb {
  width: 100%; height: 150px; object-fit: contain; display: block;
  background: rgba(255, 255, 255, 0.06); cursor: pointer;
}
.page-card__n {
  position: absolute; top: 7px; left: 7px; font-size: 11.5px;
  background: rgba(4, 16, 34, 0.85); border: 1px solid var(--line);
  border-radius: 7px; padding: 3px 8px; color: var(--cyan-400);
}
.page-card__rot {
  position: absolute; top: 7px; right: 7px; font-size: 11px;
  background: rgba(47, 139, 255, 0.25); border-radius: 7px;
  padding: 3px 7px; display: none;
}
.page-card.rotated .page-card__rot { display: block; }
.page-card__ops {
  display: flex; justify-content: space-between; gap: 4px;
  padding: 7px; border-top: 1px solid var(--line);
}
.page-card__ops button {
  flex: 1; background: rgba(255, 255, 255, 0.05); color: var(--muted);
  border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  font-size: 12.5px; padding: 6px 0; transition: 0.2s;
}
.page-card__ops button:hover { color: #fff; border-color: var(--cyan-400); }
.page-card__ops button.danger:hover { color: var(--danger); border-color: var(--danger); }

/* ── Trust cards ───────────────────────────────────────── */
.trust {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; max-width: 1080px; margin: 10px auto 46px; padding: 0 20px;
}
.trust__card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px 20px;
}
.trust__card i { font-size: 24px; color: var(--cyan-400); }
.trust__card h4 { font-family: var(--display); font-size: 14.5px; letter-spacing: 1px; margin: 12px 0 8px; }
.trust__card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ── Footer ────────────────────────────────────────────── */
.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap; padding: 20px clamp(16px, 4vw, 44px);
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
  background: rgba(4, 12, 22, 0.7);
}
.foot__links { display: flex; gap: 16px; }
.foot__links a { color: var(--muted); }
.foot__links a:hover { color: #fff; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 720px) {
  .extras { grid-template-columns: 1fr; }
  .topbar { justify-content: center; }
  .page-card__thumb { height: 120px; }
  .result { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── Dashboard v2 ────────────────────────────────────────────── */
.searchbox {
  position: relative; max-width: 640px; margin: 26px auto 6px;
}
.searchbox i {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  color: var(--cyan-400);
}
.searchbox input {
  width: 100%; padding: 17px 20px 17px 52px; border-radius: 99px;
  border: 1px solid rgba(72, 215, 255, 0.4);
  background: rgba(3, 10, 24, 0.75); color: var(--ink);
  font-family: var(--body); font-size: 16.5px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.searchbox input:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 4px rgba(72, 215, 255, 0.15);
}
.pill--on { border-color: rgba(52, 211, 153, 0.6); }
.pill--on i { color: var(--ok); }

.dash { max-width: 1180px; margin: 10px auto 40px; padding: 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 22px; }
.chip {
  padding: 9px 16px; border-radius: 99px; font-size: 13.5px; font-weight: 600;
  background: rgba(47, 139, 255, 0.12); color: var(--cyan-400);
  border: 1px solid rgba(72, 215, 255, 0.3);
  cursor: pointer; transition: 0.22s; font-family: var(--body);
}
.chip:hover { background: rgba(47, 139, 255, 0.25); transform: translateY(-2px); }
.chip--on {
  background: var(--grad); color: #041022; border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(47, 139, 255, 0.9);
}
.chip i { margin-right: 4px; }

.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.tool-grid--dense { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.tool-grid--dense .tool-card { padding: 14px 14px; }
.center { text-align: center; }

.tool-card {
  position: relative; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px 16px; color: var(--ink);
  font-family: var(--body); overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(72, 215, 255, 0.55);
  box-shadow: 0 18px 40px -20px rgba(47, 139, 255, 0.85);
  outline: none;
}
.tool-card__ico {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; font-size: 17px; color: #041022;
  background: var(--grad); margin-bottom: 10px;
}
.tool-card h3 {
  font-family: var(--display); font-size: 13.5px; letter-spacing: 0.6px;
  margin: 0 0 6px; line-height: 1.35;
}
.tool-card__desc {
  margin: 0; color: var(--muted); font-size: 12.8px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card .hi { font-size: 12.5px; margin-top: 5px; }
.tool-card__go {
  display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700;
  color: var(--cyan-400);
}
.tool-card__badge {
  position: absolute; top: 12px; right: 12px; font-size: 10px;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(47, 139, 255, 0.2); color: var(--cyan-400);
  border: 1px solid rgba(72, 215, 255, 0.4);
  border-radius: 7px; padding: 3px 7px;
}
.tool-card__badge--ai { background: rgba(124, 92, 255, 0.25); color: #b9a8ff; border-color: rgba(124, 92, 255, 0.5); }

/* ── special panels ──────────────────────────────────────────── */
.sp { margin-top: 16px; }
.sp select, .sp input[type="text"], .sp input[type="number"],
.sp textarea, .field select, .field input, .field textarea {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(3, 10, 24, 0.7); color: var(--ink);
  font-family: var(--body); font-size: 14.5px; width: 100%;
}
.sp select:focus, .sp input:focus, .sp textarea:focus,
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan-400);
}
.editor-bar label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.editor-bar input[type="number"] {
  width: 84px; padding: 7px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(3, 10, 24, 0.7);
  color: var(--ink);
}
.editor-bar select {
  padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(3, 10, 24, 0.7); color: var(--ink);
}
.editor-bar input[type="color"] {
  width: 44px; height: 34px; border: 1px solid var(--line);
  border-radius: 8px; background: none; padding: 2px;
}
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.chk input { accent-color: var(--cyan-400); width: 16px; height: 16px; }

/* ── AI chat panel ───────────────────────────────────────────── */
.chatdoc {
  background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 10px;
}
.chathist {
  max-height: 340px; overflow-y: auto; display: flex; flex-direction: column;
  gap: 10px; padding: 12px; background: rgba(3, 10, 24, 0.55);
  border: 1px solid var(--line); border-radius: 14px; min-height: 120px;
}
.chathist .msg { max-width: 88%; font-size: 14px; }
.chatq { display: flex; gap: 9px; margin-top: 10px; }
.chatq input {
  flex: 1; padding: 12px 16px; border-radius: 99px;
  border: 1px solid var(--line); background: rgba(3, 10, 24, 0.7);
  color: var(--ink); font-family: var(--body); font-size: 14.5px;
}
.chatq input:focus { outline: none; border-color: var(--cyan-400); }
.chatq .btn { border-radius: 99px; padding: 12px 20px; }

/* ── signature pad ───────────────────────────────────────────── */
.sign-pad {
  width: 100%; height: 180px; background: #fdfdf8;
  border: 2px dashed rgba(72, 215, 255, 0.5); border-radius: 14px;
  touch-action: none; cursor: crosshair; display: block;
}
.sign-body {
  min-height: 100vh; display: flex; flex-direction: column;
}
.sign-wrap { flex: 1; display: flex; justify-content: center; padding: 30px 16px; }

/* ── camera ──────────────────────────────────────────────────── */
.cam {
  width: 100%; max-height: 380px; background: #000;
  border-radius: 14px; border: 1px solid var(--line); object-fit: contain;
}

/* ── form creator / filler ───────────────────────────────────── */
.annot-holder { position: relative; line-height: 0; }
.annot-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: crosshair; touch-action: none;
}
.fieldlist { list-style: none; padding: 0; margin: 12px 0 0; }
.fieldlist li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 12px; font-size: 13.5px; margin-bottom: 6px;
}
.fieldlist button {
  background: none; border: none; color: var(--danger);
  cursor: pointer; font-size: 14px;
}
.ffgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.ffgrid .field.chk { flex-direction: row; }

/* ── e-invoice builder ───────────────────────────────────────── */
.items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.item-row {
  display: grid; grid-template-columns: 2fr 0.7fr 1fr 0.8fr auto;
  gap: 8px; align-items: center;
}
.item-row input {
  padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(3, 10, 24, 0.7); color: var(--ink);
  font-family: var(--body); font-size: 14px; width: 100%;
}
.rowdel {
  background: rgba(255, 107, 107, 0.15); border: 1px solid rgba(255, 107, 107, 0.4);
  color: var(--danger); border-radius: 8px; cursor: pointer;
  padding: 8px 11px;
}
.report {
  margin-top: 12px; white-space: pre-wrap; font-family: 'Share Tech Mono', monospace,
    ui-monospace; font-size: 13.5px; background: rgba(3, 10, 24, 0.7);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.resultpre {
  max-height: 320px; overflow: auto; white-space: pre-wrap;
  background: rgba(3, 10, 24, 0.7); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; font-size: 13px; margin: 10px 0;
}

/* ── preferences modal ───────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 990; display: flex;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(2, 6, 16, 0.75); backdrop-filter: blur(4px);
}
.modal__box {
  width: min(480px, 100%); background: var(--navy-900);
  border: 1px solid rgba(72, 215, 255, 0.4); border-radius: 20px;
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.modal__box h2 { font-family: var(--display); font-size: 17px; margin: 0; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.5; }
}

@media (max-width: 720px) {
  .item-row { grid-template-columns: 1fr 1fr; }
  .searchbox input { font-size: 15px; }
}


/* ==== Chatbot widget (copied from main site style.css) ==== */
/* â”€â”€â”€ Chatbot widget â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 950;
  width: 64px; height: 64px; border-radius: 50%; border: 0;
  background: var(--grad); color: #041022; font-size: 26px;
  display: grid; place-items: center;
  box-shadow: 0 18px 40px -12px rgba(47, 139, 255, 0.9);
  transition: transform 0.35s var(--ease);
  animation: fabPulse 2.6s ease-in-out infinite;
}
.chat-fab:hover { transform: scale(1.1) rotate(8deg); }
.chat-fab.hidden { transform: scale(0); pointer-events: none; }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 18px 40px -12px rgba(47, 139, 255, 0.9), 0 0 0 0 rgba(72, 215, 255, 0.4); }
  50% { box-shadow: 0 18px 40px -12px rgba(47, 139, 255, 0.9), 0 0 0 14px rgba(72, 215, 255, 0); }
}
.chat {
  position: fixed; right: 26px; bottom: 26px; z-index: 960;
  width: min(400px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 60px));
  display: flex; flex-direction: column;
  background: #08142c; border: 1px solid rgba(72, 215, 255, 0.28);
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  transform: translateY(24px) scale(0.92); opacity: 0; pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.45s var(--ease), opacity 0.45s;
}
.chat.open { transform: none; opacity: 1; pointer-events: auto; }
.chat__head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  background: linear-gradient(100deg, rgba(22, 104, 227, 0.55), rgba(72, 215, 255, 0.25));
  border-bottom: 1px solid rgba(72, 215, 255, 0.25);
}
.chat__avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  background: #fff; border: 2px solid rgba(255, 255, 255, 0.6);
}
.chat__head h4 { font-size: 15px; line-height: 1.2; }
.chat__status { font-size: 12px; color: #7dffc4; display: flex; align-items: center; gap: 6px; }
.chat__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7dffc4; animation: pulse 1.6s infinite; }
.chat__close {
  margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(5, 13, 31, 0.5); border: 0; color: #fff; font-size: 17px;
  transition: background 0.3s, transform 0.3s;
}
.chat__close:hover { background: rgba(255, 82, 82, 0.7); transform: rotate(90deg); }
.chat__body {
  flex: 1; overflow-y: auto; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: rgba(72, 215, 255, 0.4) transparent;
}
.msg {
  max-width: 84%; padding: 11px 15px; border-radius: 17px;
  font-size: 14.3px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  animation: msgIn 0.4s var(--ease) both;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
.msg--bot {
  align-self: flex-start; background: rgba(16, 37, 74, 0.9);
  border: 1px solid var(--line); border-bottom-left-radius: 5px;
}
.msg--user {
  align-self: flex-end; background: var(--grad); color: #041022;
  font-weight: 600; border-bottom-right-radius: 5px;
}
.msg--error { background: rgba(255, 82, 82, 0.16); border: 1px solid rgba(255, 82, 82, 0.5); color: #ffb3b3; }
.msg--success { background: rgba(56, 220, 150, 0.14); border: 1px solid rgba(56, 220, 150, 0.5); color: #9dfcd2; }
.msg b { color: var(--cyan-400); }
.msg--user b { color: #041022; }
.msg__otp { font-size: 20px; letter-spacing: 0.35em; font-weight: 800; color: var(--cyan-400); display: block; margin-top: 4px; }
.msg--user .msg__otp { color: #041022; }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: typing 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5 } 30% { transform: translateY(-6px); opacity: 1 } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 4px 6px; animation: msgIn 0.4s var(--ease) both; }
.chip {
  padding: 8px 15px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: rgba(47, 139, 255, 0.16); color: var(--cyan-400);
  border: 1px solid rgba(72, 215, 255, 0.35);
  transition: background 0.25s, transform 0.25s;
}
.chip:hover { background: var(--grad); color: #041022; transform: translateY(-2px); }
.chat__foot { padding: 12px 14px; border-top: 1px solid var(--line); background: rgba(5, 13, 31, 0.6); }
.chat__input { display: flex; gap: 9px; align-items: flex-end; }
.chat__input input, .chat__input textarea {
  flex: 1; background: rgba(16, 37, 74, 0.7); border: 1px solid var(--line);
  border-radius: 22px; padding: 12px 18px; color: var(--ink); font-size: 14.5px;
  font-family: inherit; outline: none; transition: border-color 0.3s, box-shadow 0.3s;
  resize: none; max-height: 96px;
}
.chat__input input:focus, .chat__input textarea:focus {
  border-color: var(--cyan-400); box-shadow: 0 0 0 3px rgba(72, 215, 255, 0.15);
}
.chat__send {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; border: 0;
  background: var(--grad); color: #041022; font-size: 18px;
  transition: transform 0.3s;
}
.chat__send:hover { transform: scale(1.1); }
.chat__send:disabled { opacity: 0.5; transform: none; }
.chat__hint { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 8px; }

/* responsive chat */
  .chat { right: 8px; bottom: 8px; height: calc(100dvh - 16px); }
  .chat-fab { right: 16px; bottom: 16px; }
