/* ==============================================
   InvoiceGen4Me — Main Stylesheet
   Colours: Navy #1e3a5f | Orange #e8690b
   ============================================== */

:root {
  --primary:       #1e3a5f;
  --primary-dark:  #152b47;
  --primary-light: #2a4f7a;
  --accent:        #e8690b;
  --accent-dark:   #c45608;
  --accent-light:  #ff7a1f;
  --bg:            #f0f4f8;
  --surface:       #ffffff;
  --surface2:      #f7f9fc;
  --border:        #d0daea;
  --border-light:  #e5edf5;
  --text:          #1a2535;
  --text-muted:    #5a6a7e;
  --text-light:    #8a9ab0;
  --success:       #1a7a4a;
  --warning:       #b85c00;
  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 2px 12px rgba(30,58,95,.10);
  --shadow-lg:     0 8px 32px rgba(30,58,95,.16);
  --font-head:     'Nunito', sans-serif;
  --font-body:     'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 15px; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  background: var(--primary);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .75rem 1.5rem;
}
.site-logo {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 900;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.site-logo img { width: 28px; height: 28px; }
.site-logo span { color: var(--accent); }
.header-nav { display: flex; gap: 1rem; margin-left: auto; align-items: center; }
.header-nav a { color: rgba(255,255,255,.8); font-size: .88rem; font-weight: 500; transition: color .2s; }
.header-nav a:hover { color: #fff; }
.btn-print-header {
  background: var(--accent); color: #fff; border: none;
  padding: .45rem 1.1rem; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: .4rem; transition: background .2s;
  white-space: nowrap;
}
.btn-print-header:hover { background: var(--accent-dark); }

/* ---------- Main two-panel layout ---------- */
.app-wrapper {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 460px 1fr;
  gap: 0; min-height: calc(100vh - 56px);
}

/* ---------- Form panel ---------- */
.form-panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto; height: calc(100vh - 56px);
  position: sticky; top: 56px;
  display: flex; flex-direction: column;
}
.form-inner { padding: 1.25rem; flex: 1; }

/* Document type tabs */
.doc-tabs { display: flex; gap: .4rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.doc-tab {
  flex: 1; min-width: 90px; text-align: center;
  padding: .5rem .4rem; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface2);
  font-size: .78rem; font-weight: 700; cursor: pointer;
  color: var(--text-muted); transition: all .2s;
}
.doc-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.doc-tab:hover:not(.active) { border-color: var(--primary-light); color: var(--primary); }

/* Form section cards */
.form-section {
  background: var(--surface2); border: 1px solid var(--border-light);
  border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border-light);
  cursor: pointer; user-select: none;
}
.section-title {
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--primary); display: flex; align-items: center; gap: .4rem;
}
.section-toggle { font-size: .7rem; color: var(--text-muted); transition: transform .2s; }
.section-body { padding: 1rem; }
.form-section.collapsed .section-body { display: none; }
.form-section.collapsed .section-toggle { transform: rotate(-90deg); }

/* Form rows / groups */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.form-row.full { grid-template-columns: 1fr; }
.form-row.thirds { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: .25rem; }
.form-group label { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group textarea,
.form-group select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .45rem .65rem; font-size: .85rem; font-family: var(--font-body);
  background: var(--surface); color: var(--text); transition: border-color .2s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none; border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 70px; }

/* Logo upload */
.logo-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 1.2rem; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.logo-upload-area:hover { border-color: var(--accent); background: #fff8f4; }
.logo-upload-area .upload-icon { font-size: 1.5rem; }
.logo-upload-area p { font-size: .78rem; color: var(--text-muted); margin: 0; }
.logo-upload-area .logo-preview-img { max-height: 60px; max-width: 200px; border-radius: 4px; }
.btn-remove-logo {
  font-size: .72rem; color: #c00; cursor: pointer; background: none; border: none;
  text-decoration: underline; margin-top: .25rem;
}

/* Theme swatches */
.theme-swatches { display: flex; gap: .6rem; }
.theme-swatch {
  width: 44px; height: 28px; border-radius: var(--radius-sm);
  border: 2.5px solid transparent; cursor: pointer; transition: all .2s;
  position: relative; overflow: hidden;
}
.theme-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.theme-swatch span { font-size: .65rem; font-weight: 700; color: #fff; padding: 2px 4px; display: block; }
.swatch-classic { background: linear-gradient(to right, #1e3a5f 50%, #fff 50%); }
.swatch-modern  { background: linear-gradient(to right, #e8690b 50%, #fff 50%); }
.swatch-minimal { background: linear-gradient(to right, #555 50%, #fff 50%); }

/* Currency selector */
.currency-row { display: flex; align-items: center; gap: .6rem; }
.currency-row select { flex: 1; }

/* Line items */
.line-items-table { width: 100%; border-collapse: collapse; margin-bottom: .6rem; }
.line-items-table th {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
  padding: .3rem .4rem; border-bottom: 1.5px solid var(--border);
  text-align: left; white-space: nowrap;
}
.line-items-table td { padding: .3rem .25rem; vertical-align: middle; }
.line-items-table td input {
  border: 1.5px solid var(--border); border-radius: 4px;
  padding: .35rem .4rem; font-size: .82rem; background: var(--surface);
  color: var(--text); width: 100%; font-family: var(--font-body);
}
.line-items-table td input:focus { outline: none; border-color: var(--primary); }
.line-items-table .col-desc { width: 35%; }
.line-items-table .col-qty  { width: 12%; }
.line-items-table .col-unit { width: 12%; }
.line-items-table .col-rate { width: 18%; }
.line-items-table .col-amt  { width: 16%; font-weight: 600; font-size: .82rem; color: var(--text); }
.line-items-table .col-del  { width: 7%; text-align: center; }
.btn-del-row {
  background: none; border: none; cursor: pointer; color: #c00;
  font-size: 1rem; line-height: 1; padding: .1rem .2rem; border-radius: 3px;
  transition: background .15s;
}
.btn-del-row:hover { background: #fee; }
.btn-add-row {
  background: none; border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  padding: .4rem .8rem; font-size: .8rem; color: var(--text-muted); cursor: pointer;
  width: 100%; text-align: center; transition: all .2s; font-family: var(--font-body);
}
.btn-add-row:hover { border-color: var(--accent); color: var(--accent); background: #fff8f4; }

/* Totals section */
.totals-grid { display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; align-items: center; }
.totals-grid .totals-label { font-size: .82rem; color: var(--text-muted); }
.totals-grid .totals-value { font-size: .82rem; font-weight: 600; text-align: right; }
.totals-grid .totals-sep { grid-column: 1/-1; height: 1px; background: var(--border-light); margin: .3rem 0; }
.totals-grid .total-final { font-size: 1rem; font-weight: 800; color: var(--primary); }
.totals-grid .total-final-val { font-size: 1rem; font-weight: 800; color: var(--primary); text-align: right; }

/* Discount row */
.discount-row { display: flex; align-items: center; gap: .5rem; }
.discount-row input { width: 80px; }
.discount-type-btns { display: flex; border: 1.5px solid var(--border); border-radius: 4px; overflow: hidden; }
.discount-type-btn {
  padding: .3rem .55rem; font-size: .78rem; font-weight: 700; cursor: pointer;
  background: var(--surface); border: none; color: var(--text-muted); transition: all .15s;
}
.discount-type-btn.active { background: var(--primary); color: #fff; }

/* VAT preset buttons */
.vat-presets { display: flex; gap: .4rem; flex-wrap: wrap; }
.vat-btn {
  padding: .3rem .7rem; font-size: .78rem; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted); transition: all .15s; font-family: var(--font-body);
}
.vat-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.vat-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }
.vat-custom-input { width: 80px; margin-left: .3rem; }

/* Action buttons */
.action-buttons { display: flex; gap: .5rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.btn-primary {
  flex: 1; background: var(--accent); color: #fff; border: none;
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 700; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: var(--font-body);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: var(--surface); color: var(--text); border: 1.5px solid var(--border);
  padding: .6rem .9rem; border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: .3rem; font-family: var(--font-body);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger {
  background: var(--surface); color: #c00; border: 1.5px solid #fca5a5;
  padding: .6rem .9rem; border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .2s;
  font-family: var(--font-body);
}
.btn-danger:hover { background: #fee2e2; }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: .6rem 1.4rem;
  border-radius: 999px; font-size: .85rem; font-weight: 600;
  z-index: 9999; opacity: 0; transition: opacity .3s; pointer-events: none;
  white-space: nowrap; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

/* ---------- Preview panel ---------- */
.preview-panel {
  background: #dde6ef;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 56px);
}
.preview-wrap {
  max-width: 720px; margin: 0 auto;
}
.preview-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem;
}
.preview-label {
  font-size: .78rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: .06em;
}
.preview-hint { font-size: .75rem; color: var(--text-muted); }

/* ---------- Invoice document ---------- */
.invoice-doc {
  background: #fff; border-radius: 4px;
  box-shadow: 0 4px 24px rgba(30,58,95,.18);
  overflow: hidden; font-family: 'Inter', Arial, sans-serif;
}

/* — CLASSIC THEME — */
.theme-classic .inv-header {
  background: var(--primary); color: #fff;
  padding: 2rem 2.2rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.theme-classic .inv-doc-type {
  font-size: 1.8rem; font-weight: 900; letter-spacing: -.02em; color: #fff;
}
.theme-classic .inv-number-label { font-size: .72rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; }
.theme-classic .inv-number-val { font-size: 1rem; font-weight: 700; color: #fff; }
.theme-classic .inv-accent-bar { display: none; }

/* — MODERN THEME — */
.theme-modern .inv-header {
  background: #fff; border-bottom: 4px solid var(--accent);
  padding: 2rem 2.2rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.theme-modern .inv-doc-type {
  font-size: 1.8rem; font-weight: 900; letter-spacing: -.02em; color: var(--accent);
}
.theme-modern .inv-number-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.theme-modern .inv-number-val { font-size: 1rem; font-weight: 700; color: var(--primary); }
.theme-modern .inv-accent-bar { display: none; }

/* — MINIMAL THEME — */
.theme-minimal .inv-header {
  background: #fff; border-bottom: 1px solid #ddd;
  padding: 2rem 2.2rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.theme-minimal .inv-doc-type {
  font-size: 1.8rem; font-weight: 900; letter-spacing: -.02em; color: #333;
}
.theme-minimal .inv-number-label { font-size: .72rem; color: #888; text-transform: uppercase; letter-spacing: .06em; }
.theme-minimal .inv-number-val { font-size: 1rem; font-weight: 700; color: #333; }

/* Common header sub-elements */
.inv-header-left { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.inv-header-right { text-align: right; flex-shrink: 0; }
.inv-logo { max-height: 70px; max-width: 200px; display: block; margin-bottom: .5rem; margin-left: auto; }
.inv-logo-placeholder {
  width: 100px; height: 40px; background: rgba(255,255,255,.15); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: rgba(255,255,255,.5); margin-left: auto; margin-bottom: .5rem;
}
.theme-modern .inv-logo-placeholder,
.theme-minimal .inv-logo-placeholder {
  background: #f0f0f0; color: #aaa;
}
.inv-from-name { font-size: 1.05rem; font-weight: 800; }
.theme-classic .inv-from-name { color: #fff; }
.theme-modern  .inv-from-name { color: var(--primary); }
.theme-minimal .inv-from-name { color: #222; }
.inv-from-detail { font-size: .78rem; line-height: 1.5; }
.theme-classic .inv-from-detail { color: rgba(255,255,255,.75); }
.theme-modern  .inv-from-detail { color: var(--text-muted); }
.theme-minimal .inv-from-detail { color: #666; }

/* Meta block: bill-to + dates */
.inv-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border-bottom: 1px solid #eee;
}
.inv-meta-block { padding: 1.4rem 2.2rem; }
.inv-meta-block + .inv-meta-block { border-left: 1px solid #eee; }
.inv-meta-label {
  font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: .4rem;
}
.theme-classic .inv-meta-label { color: var(--primary); }
.theme-modern  .inv-meta-label { color: var(--accent); }
.theme-minimal .inv-meta-label { color: #888; }
.inv-to-name { font-size: .92rem; font-weight: 700; color: #1a2535; }
.inv-to-detail { font-size: .78rem; line-height: 1.5; color: #5a6a7e; }
.inv-dates-grid { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; }
.inv-dates-grid .dk { font-size: .75rem; color: #888; }
.inv-dates-grid .dv { font-size: .75rem; font-weight: 600; color: #1a2535; }
.inv-dates-grid .status-badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: #d1fae5; color: #065f46;
}

/* Line items */
.inv-items { padding: 0 2.2rem 1rem; }
.inv-items-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.inv-items-table th {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .5rem .5rem; border-bottom: 2px solid;
  text-align: left;
}
.theme-classic .inv-items-table th { color: var(--primary); border-color: var(--primary); }
.theme-modern  .inv-items-table th { color: var(--accent);   border-color: var(--accent); }
.theme-minimal .inv-items-table th { color: #555;             border-color: #ccc; }
.inv-items-table th:last-child,
.inv-items-table td:last-child { text-align: right; }
.inv-items-table td {
  font-size: .82rem; padding: .6rem .5rem; border-bottom: 1px solid #f0f0f0; vertical-align: top;
  color: #2a3545;
}
.inv-items-table tr:last-child td { border-bottom: none; }
.inv-items-table .item-desc { font-weight: 500; }
.inv-items-table .item-amt { font-weight: 600; }

/* Totals */
.inv-totals {
  border-top: 1px solid #eee; padding: 1rem 2.2rem 1.8rem;
  display: flex; justify-content: flex-end;
}
.inv-totals-table { min-width: 260px; }
.inv-totals-table tr td { padding: .22rem 0; font-size: .82rem; }
.inv-totals-table .tk { color: #666; padding-right: 2rem; }
.inv-totals-table .tv { text-align: right; font-weight: 600; color: #1a2535; }
.inv-totals-table .trow-sep td { border-top: 1px solid #ddd; padding-top: .5rem; }
.inv-totals-table .trow-total .tk { font-size: .9rem; font-weight: 800; color: #1a2535; }
.inv-totals-table .trow-total .tv { font-size: .9rem; font-weight: 800; }
.theme-classic .inv-totals-table .trow-total .tv { color: var(--primary); }
.theme-modern  .inv-totals-table .trow-total .tv { color: var(--accent); }
.theme-minimal .inv-totals-table .trow-total .tv { color: #222; }

/* Notes & Terms */
.inv-footer { border-top: 1px solid #eee; padding: 1.2rem 2.2rem; display: flex; gap: 2rem; }
.inv-footer-block { flex: 1; }
.inv-footer-label { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .35rem; }
.theme-classic .inv-footer-label { color: var(--primary); }
.theme-modern  .inv-footer-label { color: var(--accent); }
.theme-minimal .inv-footer-label { color: #888; }
.inv-footer-text { font-size: .78rem; color: #5a6a7e; white-space: pre-wrap; line-height: 1.5; }
.inv-thankyou {
  text-align: center; padding: .8rem 2.2rem 1.4rem;
  font-size: .78rem; font-style: italic;
}
.theme-classic .inv-thankyou { color: rgba(30,58,95,.4); }
.theme-modern  .inv-thankyou { color: rgba(232,105,11,.5); }
.theme-minimal .inv-thankyou { color: #bbb; }

/* ---------- AdSense ---------- */
.ad-slot {
  text-align: center; margin: 1rem 0;
  min-height: 90px; background: var(--surface2);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--text-light);
}

/* ---------- Network nav ---------- */
.network-section { background: var(--primary); padding: 2.5rem 1.5rem; }
.network-section h2 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 900; color: #fff; text-align: center; margin-bottom: 1.25rem; }
.network-nav { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; max-width: 900px; margin: 0 auto; }
.net-card {
  display: flex; align-items: center; gap: .6rem;
  background: rgba(255,255,255,.1); border-radius: var(--radius);
  padding: .6rem 1rem; text-decoration: none; transition: background .2s;
  border: 1px solid rgba(255,255,255,.15);
}
.net-card:hover { background: rgba(255,255,255,.18); }
.nc-icon { font-size: 1.2rem; }
.nc-name { font-size: .82rem; font-weight: 700; color: #fff; }
.nc-desc { font-size: .72rem; color: rgba(255,255,255,.6); margin-left: .25rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.6); padding: 1.5rem; text-align: center; }
.footer-logo { font-family: var(--font-head); font-weight: 900; font-size: 1.1rem; color: #fff; margin-bottom: .4rem; }
.footer-logo span { color: var(--accent); }
.footer-nav { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-bottom: .6rem; }
.footer-nav a { font-size: .78rem; color: rgba(255,255,255,.55); }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: .75rem; }
.footer-disclaimer { font-size: .72rem; max-width: 600px; margin: .5rem auto 0; line-height: 1.5; }

/* ---------- Cookie banner ---------- */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: var(--primary-dark); color: #fff; padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
#cookie-banner p { font-size: .82rem; color: rgba(255,255,255,.8); margin: 0; }
.cookie-btns { display: flex; gap: .6rem; }
.btn-accept {
  background: var(--accent); color: #fff; border: none; padding: .45rem 1.1rem;
  border-radius: var(--radius-sm); font-size: .82rem; font-weight: 700; cursor: pointer;
}
.btn-decline {
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.2);
  padding: .45rem .9rem; border-radius: var(--radius-sm); font-size: .82rem; cursor: pointer;
}

/* ---------- About / static pages ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 3rem 1.5rem; text-align: center; color: #fff;
}
.page-hero h1 { font-family: var(--font-head); font-size: 2rem; font-weight: 900; }
.page-hero p { margin-top: .5rem; color: rgba(255,255,255,.8); max-width: 560px; margin-left: auto; margin-right: auto; }
.page-content { max-width: 780px; margin: 3rem auto; padding: 0 1.5rem 3rem; }
.page-content h2 { font-family: var(--font-head); font-weight: 900; color: var(--primary); margin: 2rem 0 .75rem; font-size: 1.25rem; }
.page-content p { color: var(--text-muted); line-height: 1.75; margin-bottom: 1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.feature-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.feature-card .fc-icon { font-size: 1.5rem; margin-bottom: .5rem; }
.feature-card h3 { font-size: .9rem; font-weight: 700; color: var(--primary); margin-bottom: .25rem; }
.feature-card p { font-size: .82rem; color: var(--text-muted); margin: 0; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.contact-form .form-group { margin-bottom: 1rem; }
.contact-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .6rem .9rem; font-size: .9rem; font-family: var(--font-body);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.form-submit {
  background: var(--accent); color: #fff; border: none; padding: .7rem 2rem;
  border-radius: var(--radius-sm); font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: background .2s; font-family: var(--font-body);
}
.form-submit:hover { background: var(--accent-dark); }

/* ---------- Print styles ---------- */
@media print {
  .site-header, .form-panel, .network-section, .site-footer,
  #cookie-banner, .preview-toolbar, .ad-slot, .toast { display: none !important; }
  body { background: #fff !important; }
  .app-wrapper { display: block !important; }
  .preview-panel { background: #fff !important; padding: 0 !important; overflow: visible !important; height: auto !important; }
  .preview-wrap { max-width: 100% !important; }
  .invoice-doc { box-shadow: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .app-wrapper { grid-template-columns: 1fr; }
  .form-panel { height: auto; position: static; border-right: none; border-bottom: 2px solid var(--border); }
  .preview-panel { min-height: auto; padding: 1.5rem 1rem; }
}
@media (max-width: 640px) {
  .header-inner { padding: .6rem 1rem; }
  .btn-print-header span { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.thirds { grid-template-columns: 1fr 1fr; }
  .doc-tab { font-size: .72rem; padding: .4rem .3rem; }
  .inv-meta { grid-template-columns: 1fr; }
  .inv-meta-block + .inv-meta-block { border-left: none; border-top: 1px solid #eee; }
  .inv-footer { flex-direction: column; }
  .inv-header { flex-direction: column-reverse; gap: .75rem; }
  .inv-header-right { margin-left: 0; }
  .inv-logo, .inv-logo-placeholder { margin-left: 0; }
}
