:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #1a2330;
  --ink-soft: #4a5568;
  --muted: #8a93a3;
  --primary: #1f6feb;
  --primary-ink: #ffffff;
  --primary-soft: #e7f0ff;
  --accent: #0fb27a;
  --border: #e3e6ed;
  --shadow: 0 1px 2px rgba(20,30,50,.05), 0 8px 24px rgba(20,30,50,.04);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .6em; line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--primary); color: var(--primary-ink);
  font-weight: 800; font-size: .85rem; letter-spacing: .5px;
}
.brand-name { font-size: 1.05rem; }
.primary-nav { display: flex; gap: 22px; }
.primary-nav a { color: var(--ink-soft); font-weight: 500; }
.primary-nav a.active, .primary-nav a:hover { color: var(--primary); text-decoration: none; }
.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 1.1rem; cursor: pointer;
}

.chip-row { border-top: 1px solid var(--border); background: #fafbfd; }
.chip-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 20px;
  scrollbar-width: thin;
}
.chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--ink-soft);
}
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip-active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
  background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%);
}
.hero h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  max-width: 760px;
}
.hero p.lead {
  font-size: 1.05rem;
  max-width: 640px;
  color: var(--ink-soft);
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #1858c4; text-decoration: none; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0c9764; text-decoration: none; }

/* ---------- Features ---------- */
.features { padding: 48px 0; }
.feature-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.feature-card h3 { margin-bottom: .25em; }
.feature-card p { margin: 0; font-size: .95rem; }
.feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ---------- Tool grid (homepage) ---------- */
.tools-section { padding: 32px 0 64px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { color: var(--muted); margin: 0; }

.tool-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.tool-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.tool-icon {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 700;
}
.tool-card h3 { margin: 0 0 4px; font-size: 1rem; }
.tool-card p { margin: 0; font-size: .85rem; color: var(--ink-soft); }

/* ---------- Generator page ---------- */
.gen-page { padding: 32px 0 64px; }
.gen-head { margin-bottom: 22px; }
.gen-head h1 { margin-bottom: 4px; }
.gen-head p { margin: 0; color: var(--muted); }

.gen-grid {
  display: grid; gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: flex-start;
}

.gen-form, .gen-preview-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.gen-form h2, .gen-preview-wrap h2 { font-size: 1.05rem; margin-bottom: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; color: var(--ink-soft); margin-bottom: 5px; font-weight: 500; }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field input[type="time"], .field select, .field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 70px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.field-row .field { margin-bottom: 0; }

.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* Line items table */
.items-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: .9rem; }
.items-table th, .items-table td { padding: 6px 8px; border: 1px solid var(--border); text-align: left; }
.items-table th { background: #f5f7fb; font-weight: 600; }
.items-table input { width: 100%; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; }
.items-table .col-num { width: 78px; }
.items-table .col-act { width: 36px; text-align: center; }
.items-add { margin-top: 8px; }

/* ---------- Receipt preview ---------- */
.gen-preview {
  background: #fff;
  color: #111;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  min-height: 400px;
}
.r-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 16px; }
.r-title { font-size: 1.4rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.r-sub { font-size: .85rem; color: #555; }
.r-section { margin-bottom: 14px; }
.r-section h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: #666; margin-bottom: 6px; }
.r-row { display: grid; grid-template-columns: 140px 1fr; column-gap: 14px; margin-bottom: 6px; align-items: baseline; }
.r-row .lbl { color: #555; }
.r-row .val { font-weight: 600; color: #111; }
.r-row.is-empty, [data-optional-row].is-empty { display: none; }

/* Checkbox field row */
.field .check-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 0; }
.field .check-label input { margin: 0; width: auto; }
.field .check-label span { color: var(--ink); font-weight: 500; }

/* ---------- Rent receipt: Style 2 — Classic fill-in ---------- */
.rc-paper {
  background: #f5ecd0;
  color: #2b2b2b;
  font-family: Georgia, "Times New Roman", "DejaVu Serif", serif;
  padding: 40px 50px;
  min-height: 460px;
  border: 1px solid #e0d5b0;
}
.rc-title { text-align: center; font-size: 1.6rem; font-weight: 700; margin: 0 0 30px; letter-spacing: 0.5px; color: #2b2b2b; }
.rc-meta { display: flex; justify-content: space-between; margin-bottom: 28px; font-size: .95rem; }
.rc-body { font-size: .95rem; line-height: 2.4; margin: 0 0 24px; color: #2b2b2b; }
.rc-fill {
  display: inline-block;
  min-width: 140px;
  border-bottom: 1px solid #333;
  padding: 0 6px 1px;
  vertical-align: baseline;
}
.rc-fill-sm { min-width: 100px; }
.rc-fill-lg { min-width: 280px; }
.rc-fill:empty::before { content: '\00a0'; }

.rc-stamp-row { text-align: right; padding: 16px 0 8px; min-height: 76px; }
.rc-stamp-row .rc-stamp { display: inline-block; background: #fff; border-color: #999; }

.rc-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 30px; font-size: .95rem; }
.rc-foot-left { font-weight: 600; }
.rc-foot-right { text-align: right; }
.rc-sig { font-weight: 700; margin-bottom: 6px; }
.rc-pan { font-weight: 600; }

/* ---------- Rent receipt: Style 3 — Stub ---------- */
.rs-paper {
  background: #fff;
  color: #1a2330;
  font-family: "Helvetica Neue", Arial, sans-serif;
  border: 1px solid #1a2330;
  padding: 28px 32px;
  font-size: .9rem;
}
.rs-top { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; margin-bottom: 28px; }
.rs-brand { font-size: 1.5rem; font-weight: 800; color: #5b6b81; letter-spacing: .5px; }
.rs-top-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rs-mini-label { color: #5fa3e3; font-weight: 500; }

.rs-body {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.rs-col-left  { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rs-col-right { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }

.rs-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: end;
  column-gap: 10px;
}
.rs-row-period { grid-template-columns: 100px minmax(0, 1fr) auto minmax(0, 1fr); }
.rs-to { padding: 0 4px; color: #1a2330; }
.rs-label { color: #1a2330; font-weight: 500; }
.rs-fill {
  display: block;
  width: 100%;
  min-width: 0;
  border-bottom: 1px solid #1a2330;
  padding: 2px 4px 1px;
  min-height: 18px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rs-fill-sm, .rs-fill-lg { /* widths controlled by parent grid in this variant */ }

.rs-paid-by { display: flex; align-items: flex-start; gap: 18px; }
.rs-paid-by-label { font-weight: 500; padding-top: 1px; }
.rs-mode-list { list-style: none; margin: 0; padding: 0; }
.rs-mode-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rs-checkbox {
  display: inline-block;
  width: 12px; height: 12px;
  border: 1px solid #1a2330;
}
.rs-checkbox.is-checked { background: #1a2330 linear-gradient(45deg, transparent 40%, #fff 40%, #fff 60%, transparent 60%); }
.rs-checkbox.is-checked::after { content: '✓'; display: block; color: #fff; font-size: 10px; line-height: 12px; text-align: center; margin-top: -1px; }

.rs-sig-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 100%; }
.rs-stamp-slot { margin-bottom: 6px; }
.rs-sig-line { width: 100%; max-width: 220px; border-bottom: 1px solid #1a76d2; height: 12px; }
.rs-sig-label { color: #1a2330; font-weight: 500; font-size: .85rem; }

/* Revenue stamp placeholder (rent receipt) */
.r-stamp-placeholder {
  width: 96px; height: 76px;
  border: 1.5px dashed #888;
  background: #fafafa;
  border-radius: 4px;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 4px;
  flex: 0 0 auto;
}
.r-stamp-amount { font-weight: 700; font-size: 18px; color: #555; line-height: 1; }
.r-stamp-label { font-size: 9px; letter-spacing: 1px; color: #777; text-transform: uppercase; margin-top: 4px; line-height: 1.2; }
.r-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .92rem; }
.r-table th, .r-table td { padding: 7px 8px; border-bottom: 1px solid #e5e7ec; text-align: left; }
.r-table th { background: #f5f7fb; }
.r-table .num { text-align: right; }
.r-total { display: flex; justify-content: space-between; padding: 8px 0; border-top: 2px solid #111; font-weight: 700; font-size: 1.05rem; }
.r-signature {
  display: flex; justify-content: space-between; margin-top: 40px; font-size: .9rem;
}
.r-signature .sig { text-align: center; width: 200px; padding-top: 24px; border-top: 1px solid #555; color: #555; }
.r-stamp {
  display: inline-block; padding: 6px 14px; border: 2px solid #0fb27a; color: #0fb27a;
  border-radius: 6px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  transform: rotate(-6deg); font-size: .85rem;
}
.r-note { font-size: .8rem; color: #777; margin-top: 14px; }

/* ---------- Thermal-receipt look (fuel bill thermal slip) ---------- */
.r-thermal {
  max-width: 340px;
  margin: 0 auto;
  /* drop-shadow follows the clip-path, so the torn-paper outline casts a shadow */
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.12));
}
.r-thermal .t-paper {
  background: #fff;
  color: #111;
  font-family: "Courier New", "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  padding: 28px 22px 28px;
  /* Sawtooth top + bottom, straight sides */
  clip-path: polygon(
    /* top edge: zigzag down-up across the width */
    0% 9px, 4% 0%, 8% 9px, 12% 0%, 16% 9px, 20% 0%, 24% 9px, 28% 0%, 32% 9px, 36% 0%,
    40% 9px, 44% 0%, 48% 9px, 52% 0%, 56% 9px, 60% 0%, 64% 9px, 68% 0%, 72% 9px, 76% 0%,
    80% 9px, 84% 0%, 88% 9px, 92% 0%, 96% 9px, 100% 0%,
    /* down the right edge */
    100% calc(100% - 9px),
    /* bottom edge: zigzag */
    96% 100%, 92% calc(100% - 9px), 88% 100%, 84% calc(100% - 9px), 80% 100%, 76% calc(100% - 9px),
    72% 100%, 68% calc(100% - 9px), 64% 100%, 60% calc(100% - 9px), 56% 100%, 52% calc(100% - 9px),
    48% 100%, 44% calc(100% - 9px), 40% 100%, 36% calc(100% - 9px), 32% 100%, 28% calc(100% - 9px),
    24% 100%, 20% calc(100% - 9px), 16% 100%, 12% calc(100% - 9px), 8% 100%, 4% calc(100% - 9px), 0% 100%
  );
}
/* Style 2: same paper but textured background instead of pure white. */
.r-thermal .t-paper-tex2 {
  background: #fff url(/assets/img/texture-2.webp) center / cover no-repeat;
}
.r-thermal .t-logo { margin: 0 auto 6px; min-height: 0; }
.r-thermal .t-logo:empty { display: none; }
.r-thermal .t-logo .logo-img { max-width: 110px; max-height: 100px; }
.r-thermal .t-welcome { letter-spacing: 2px; font-weight: 700; margin: 8px 0 2px; font-size: 14px; }
.r-thermal .t-pump-name { font-weight: 700; font-size: 13px; text-transform: capitalize; margin-bottom: 14px; }
.r-thermal .t-group { text-align: left; margin-bottom: 14px; }
.r-thermal .t-group:last-of-type { margin-bottom: 6px; }
.r-thermal .t-line { font-size: 13px; letter-spacing: 0.3px; white-space: pre-wrap; }
.r-thermal .t-footer { margin-top: 14px; font-size: 13px; }
.r-thermal .t-stars { letter-spacing: 1px; margin-bottom: 4px; }

/* ---------- Logo picker (form side) ---------- */
.logo-picker {
  background: #f5f7fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.logo-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.logo-picker-title { font-weight: 700; color: var(--ink); }
.logo-picker-tools { display: flex; gap: 14px; align-items: center; }
.logo-btn-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink-soft); font: inherit;
}
.logo-btn-link:hover { color: var(--primary); }
.logo-disable {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-soft); font-size: .9rem;
}

.logo-presets {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-bottom: 12px;
}
.logo-preset {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 6px; border-radius: 6px; cursor: pointer;
}
.logo-preset:hover { background: rgba(31,111,235,.06); }
.logo-preset input { margin: 0; }
.logo-preset-name { font-size: .9rem; color: var(--ink); }

.logo-file-row { margin-bottom: 10px; }
.logo-file-label {
  display: inline-flex; align-items: stretch; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: #fff; width: 100%;
}
.logo-file-label .btn-fake {
  background: #eef1f6; padding: 8px 14px; font-weight: 500; color: var(--ink);
  border-right: 1px solid var(--border);
}
.logo-file-label input[type="file"] { display: none; }
.logo-file-name { padding: 8px 12px; color: var(--ink-soft); font-size: .9rem; flex: 1; }

.logo-url-row {
  display: flex; align-items: stretch;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff;
}
.logo-url-label {
  background: #eef1f6; padding: 8px 16px; font-weight: 500; color: var(--ink);
  border-right: 1px solid var(--border);
}
.logo-url-row input { flex: 1; border: 0; padding: 8px 12px; font: inherit; outline: none; }

/* ---------- Logo badge / image (receipt side) ---------- */
.logo-badge {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  font-weight: 800; font-size: .9rem; letter-spacing: .5px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.logo-badge-sm { width: 28px; height: 28px; font-size: .65rem; letter-spacing: .3px; }
.logo-preset-thumb {
  width: 28px; height: 28px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
}
.logo-img { max-width: 60px; max-height: 60px; object-fit: contain; }
[data-logo-slot] { display: inline-block; }

/* ---------- Full-width section that hosts the multi-month panel ---------- */
.gen-multi {
  margin-top: 22px;
}

/* ---------- Multi-month panel ---------- */
.multi-month {
  background: #f5f7fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
}
.multi-toggle {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--ink); cursor: pointer;
}
.multi-toggle input { margin: 0; }
.multi-body { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
/* Class flipped by JS; the :has() rule is a no-JS fallback for modern browsers. */
.multi-month.multi-on .multi-body,
.multi-month:has(input[data-multi-toggle]:checked) .multi-body { display: block; }
.multi-body .field-row { margin-bottom: 12px; }
.multi-table-scroll { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.multi-table-scroll table { margin-top: 0; }
.multi-table-scroll thead th {
  position: sticky; top: 0; background: #eef1f6; z-index: 1;
}
.multi-table-scroll .col-month { white-space: nowrap; min-width: 90px; padding: 6px 10px; }
.multi-table-scroll input, .multi-table-scroll select { font: inherit; padding: 5px 7px; width: 100%; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.multi-empty { text-align: center; color: var(--muted); padding: 14px !important; font-size: .9rem; }
.muted { color: var(--muted); font-weight: 400; }

/* Multi-receipt: one receipt per page in PDFs */
.r-page-break { page-break-after: always; }

/* Variant switcher — hide non-active variants. The preview root carries
   data-active-variant; JS sets it from the dropdown, the template also
   adds an `is-active-variant` class for any variant value (future-proof). */
.r-variant { display: none; }
.r-variant.is-active-variant { display: block; }
/* Legacy named-variant fallbacks (kept so tools that haven't been touched still work). */
[data-active-variant="thermal"]  [data-variant="thermal"],
[data-active-variant="invoice"]  [data-variant="invoice"],
[data-active-variant="compact"]  [data-variant="compact"],
[data-active-variant="classic"]  [data-variant="classic"],
[data-active-variant="fillable"] [data-variant="fillable"] { display: block; }

/* ---------- Internet invoice: Style 2 — Detailed Postpaid ---------- */
.ii-paper {
  background: #fff;
  color: #1a2330;
  border: 1px solid #cdd3df;
  padding: 24px 28px 32px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: .88rem;
  position: relative;
}
.ii-band {
  border-top: 4px dotted #1a76d2;
  margin: -8px -28px 18px;
}

.ii-top { display: grid; grid-template-columns: 1.2fr auto 1.2fr; gap: 18px; align-items: flex-start; margin-bottom: 14px; }
.ii-customer { font-size: .88rem; }
.ii-strong { font-weight: 700; margin-bottom: 4px; }
.ii-soft { color: #4a5568; white-space: pre-wrap; }
.ii-soft:empty { display: none; }
.ii-logo-slot { text-align: center; }
.ii-logo-slot .logo-img { max-width: 110px; max-height: 70px; }

.ii-meta { font-size: .82rem; min-width: 0; }
.ii-meta-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.ii-meta-row > span:first-child { color: #1a76d2; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.ii-meta-row > span:last-child  { font-weight: 600; text-align: right; }

.ii-payable {
  display: flex; justify-content: space-between; align-items: baseline;
  background: #f5f8fc;
  border: 1px solid #cdd3df;
  padding: 10px 14px;
  font-weight: 700;
  margin: 14px 0 22px;
  font-size: 1.05rem;
}
.ii-payable > span:last-child { font-size: 1.2rem; color: #0a3aa4; }

.ii-section-title { text-align: center; font-size: 1.1rem; font-weight: 700; color: #0a3aa4; margin: 14px 0 10px; }
.ii-subtitle { font-weight: 700; margin: 18px 0 6px; text-decoration: underline; text-underline-offset: 2px; }

.ii-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: .85rem; }
.ii-table th, .ii-table td { border: 1px solid #cdd3df; padding: 6px 8px; text-align: left; }
.ii-table th { background: #eef2f7; font-weight: 700; }
.ii-table .num { text-align: right; }
.ii-row-strong td { background: #f5f8fc; font-weight: 700; }

.ii-plan-box { border: 1px solid #cdd3df; padding: 12px; margin-bottom: 14px; background: #fafbfd; }
.ii-plan-name { font-weight: 700; margin-bottom: 8px; }
.ii-plan-table { margin: 0; }

.ii-charges thead tr:first-child th { background: #1a76d2; color: #fff; text-align: left; }

.ii-total-bar {
  display: flex; justify-content: space-between; align-items: baseline;
  background: #1a2330; color: #fff;
  padding: 8px 12px;
  font-weight: 700; margin-top: 6px;
}
.ii-total-bar > span:last-child { font-size: 1.05rem; }

.ii-foot-note { color: #6b7280; font-size: .78rem; margin-top: 14px; }

/* ---------- Tax-invoice variant ---------- */
.inv-style .inv-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 16px;
}
.inv-brand { display: flex; gap: 12px; align-items: flex-start; }
.inv-logo { flex: 0 0 auto; }
.inv-logo:empty { display: none; }
.inv-brand-name { font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.inv-brand-addr { font-size: .85rem; color: #555; margin-top: 4px; white-space: pre-wrap; }
.inv-brand-meta { font-size: .8rem; color: #555; }
.inv-title {
  font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
  background: #111; color: #fff; padding: 6px 14px; border-radius: 4px;
}
.inv-meta-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: .88rem; }
.inv-meta-table td { border: 1px solid #ddd; padding: 8px 10px; vertical-align: top; width: 33%; }
.inv-meta-table td strong { font-size: .75rem; text-transform: uppercase; color: #777; letter-spacing: .5px; }

/* ---------- Compact card variant ---------- */
.r-compact {
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(180deg, #f7f9fc 0%, #fff 100%);
  border: 1px solid #e3e6ed;
  border-radius: 14px;
  padding: 26px 28px;
  text-align: center;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}
.cmp-logo { margin-bottom: 10px; }
.cmp-logo:empty { display: none; }
.cmp-head .cmp-name { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.cmp-head .cmp-sub { font-size: .8rem; color: #777; margin-top: 2px; white-space: pre-wrap; }
.cmp-big { margin: 22px 0; padding: 14px 0; border-top: 1px dashed #c6cbd6; border-bottom: 1px dashed #c6cbd6; }
.cmp-amount { font-size: 2rem; font-weight: 800; color: #1f6feb; letter-spacing: -.5px; }
.cmp-amount-label { font-size: .7rem; text-transform: uppercase; letter-spacing: 2px; color: #8a93a3; margin-top: 4px; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; text-align: left; margin-bottom: 18px; }
.cmp-grid > div { display: flex; flex-direction: column; }
.cmp-grid span { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: #8a93a3; }
.cmp-grid strong { font-size: .95rem; color: #1a2330; margin-top: 2px; }
.cmp-foot { font-size: .75rem; color: #8a93a3; padding-top: 10px; border-top: 1px dashed #c6cbd6; }

/* ---------- Static pages ---------- */
.static-page { padding: 40px 0 64px; }
.static-page article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 880px; margin: 0 auto; }
.static-page h1 { margin-bottom: 10px; }
.static-page h2 { margin-top: 28px; }

/* Contact form */
.contact-grid { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
.contact-info p { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1623; color: #cfd5e0; margin-top: 40px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: #fff; color: #0f1623; }
.footer-grid {
  display: grid; gap: 28px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  padding: 40px 20px;
}
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: #cfd5e0; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer-tag { color: #8a93a3; font-size: .9rem; margin-top: 10px; }
.social-row { display: flex; gap: 8px; margin-top: 12px; }
.social {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff !important;
  font-weight: 700;
  text-transform: uppercase;
}
.social:hover { background: var(--primary); text-decoration: none; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; text-align: center; color: #8a93a3; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gen-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .primary-nav.open {
    display: flex; position: absolute; top: 60px; right: 16px;
    flex-direction: column; gap: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 8px 0; box-shadow: var(--shadow);
  }
  .primary-nav.open a { padding: 10px 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 24px; }
}
