:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --warning: #f59e0b;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  font-size: 15px;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  text-decoration: none;
}
.logo svg { width: 28px; height: 28px; }
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
.header-nav a:hover { color: var(--gray-900); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  color: var(--white);
  padding: 56px 20px 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 18px;
  opacity: .9;
  margin-bottom: 28px;
}
.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(4px);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn-white {
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
}
.hero-cta .btn-white:hover { background: var(--gray-100); }

/* ── AD UNIT ── */
.ad-unit {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ad-unit-top { height: 90px; margin: 20px 0; }
.ad-unit-sidebar { min-height: 250px; margin-bottom: 20px; }

/* ── BUILDER ── */
.invoice-builder { padding: 24px 0 48px; }
.builder-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── FORM PANEL ── */
.form-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
}
.card-body { padding: 18px; }

/* ── FORM FIELDS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(99 102 241 / .1);
}
textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
select { cursor: pointer; }

/* ── ITEMS TABLE ── */
.items-header {
  display: grid;
  grid-template-columns: 1fr 70px 90px 90px 32px;
  gap: 8px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 10px;
}
.items-header span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-400);
}
.item-row {
  display: grid;
  grid-template-columns: 1fr 70px 90px 90px 32px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: start;
}
.item-amount {
  padding: 8px 11px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.btn-remove-item {
  width: 32px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--gray-400);
  transition: all .15s;
  flex-shrink: 0;
}
.btn-remove-item:hover { background: #fef2f2; border-color: var(--danger); color: var(--danger); }

/* ── TOTALS ── */
.totals-area {
  border-top: 1px solid var(--gray-200);
  padding-top: 14px;
  margin-top: 6px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
}
.total-row label {
  font-size: 13px;
  color: var(--gray-500);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.total-row.grand-total {
  border-top: 2px solid var(--gray-800);
  margin-top: 8px;
  padding-top: 10px;
}
.total-row.grand-total label { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.total-row.grand-total span { font-size: 20px; font-weight: 800; color: var(--gray-900); }
.tax-inputs { display: flex; align-items: center; gap: 8px; }
.tax-inputs input { width: 70px; text-align: right; }
.discount-inputs { display: flex; align-items: center; gap: 6px; }
.discount-inputs select { width: 90px; }
.discount-inputs input { width: 80px; text-align: right; }

/* ── ACTIONS ── */
.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── PREVIEW PANEL ── */
.preview-panel { position: sticky; top: 80px; }
.preview-toolbar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}
.preview-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.preview-actions { display: flex; gap: 8px; }

.invoice-preview-wrap {
  background: var(--gray-300);
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

/* ── INVOICE DOCUMENT ── */
#invoiceDoc {
  background: var(--white);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 48px 40px;
  box-shadow: var(--shadow-xl);
  border-radius: 4px;
  font-size: 13px;
  color: var(--gray-800);
}
.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  gap: 20px;
}
.inv-logo {
  max-width: 160px;
  max-height: 60px;
  object-fit: contain;
}
.inv-title-area { text-align: right; }
.inv-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.inv-number { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.inv-dates { margin-top: 8px; }
.inv-dates div { font-size: 12px; color: var(--gray-600); }
.inv-dates strong { color: var(--gray-800); }

.inv-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--gray-50);
  border-radius: var(--radius);
}
.inv-party-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: 6px;
}
.inv-party-name { font-weight: 700; font-size: 14px; color: var(--gray-900); }
.inv-party-detail { color: var(--gray-500); font-size: 12px; line-height: 1.5; }

.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.inv-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--white);
  background: var(--primary);
}
.inv-table th:last-child,
.inv-table th:nth-last-child(2),
.inv-table th:nth-last-child(3) { text-align: right; }
.inv-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}
.inv-table td:last-child,
.inv-table td:nth-last-child(2),
.inv-table td:nth-last-child(3) { text-align: right; }
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-table .item-desc { font-weight: 500; color: var(--gray-800); }

.inv-footer { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; }

.inv-notes { flex: 1; }
.inv-notes-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.inv-notes-text { font-size: 12px; color: var(--gray-500); line-height: 1.5; white-space: pre-wrap; }

.inv-totals { min-width: 220px; }
.inv-total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  color: var(--gray-600);
}
.inv-total-row.grand {
  border-top: 2px solid var(--primary);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 800;
  font-size: 15px;
  color: var(--primary);
}

.inv-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #fef3c7;
  color: #92400e;
  margin-bottom: 4px;
}

/* ── PREMIUM CTA ── */
.premium-section {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: var(--white);
  padding: 56px 20px;
  text-align: center;
  margin-top: 40px;
}
.premium-section h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.premium-section p { color: #94a3b8; font-size: 16px; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.premium-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.premium-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #cbd5e1;
}
.premium-feature svg { color: var(--success); flex-shrink: 0; }
.premium-price {
  font-size: 42px;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.premium-price sup { font-size: 20px; vertical-align: super; }
.premium-price-note { color: #64748b; font-size: 13px; margin-bottom: 24px; }
.btn-gumroad {
  background: #ff90e8;
  color: #1a1a1a;
  font-weight: 700;
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}
.btn-gumroad:hover { background: #ff6de1; }

/* ── FAQ ── */
.faq-section { padding: 56px 20px; }
.faq-section h2 { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 32px; }
.faq-grid { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-q {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  user-select: none;
}
.faq-q:hover { background: var(--gray-50); }
.faq-a {
  padding: 0 20px;
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 20px 16px; }
.faq-chevron { transition: transform .3s; color: var(--gray-400); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* ── FOOTER ── */
footer {
  background: var(--gray-900);
  color: #94a3b8;
  padding: 32px 20px;
  text-align: center;
  font-size: 13px;
}
footer a { color: #6366f1; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }

/* ── LOGO UPLOAD ── */
.logo-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--gray-50);
}
.logo-upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.logo-upload-area input { display: none; }
.logo-preview { max-height: 50px; max-width: 160px; margin: 0 auto 8px; display: block; }
.logo-upload-hint { font-size: 12px; color: var(--gray-400); }

/* ── CURRENCY SELECTOR ── */
.currency-row { display: flex; align-items: center; gap: 8px; }
.currency-row select { flex: 1; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--gray-900);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s ease;
  z-index: 1000;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  display: flex;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  padding: 4px 11px;
  border-radius: 999px;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--gray-500);
  transition: all .15s;
  letter-spacing: .03em;
}
.lang-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.lang-btn:hover:not(.active) { color: var(--gray-800); }

/* ── TAX LINES ── */
.tax-line {
  display: grid;
  grid-template-columns: 38px 1fr auto auto 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 10px 10px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  transition: opacity .15s;
}
.tax-line.disabled { opacity: 0.45; }
.tax-line.disabled input,
.tax-line.disabled select { background: var(--gray-100); }
.tax-note {
  font-size: 10px;
  color: var(--gray-400);
  grid-column: 2 / -1;
  margin-top: -4px;
  font-style: italic;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 999px;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform .2s;
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(14px); }

/* ── EDUCATIONAL SECTION ── */
.edu-section {
  padding: 56px 20px;
  background: var(--gray-50);
}
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}
.edu-main h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 14px;
  line-height: 1.3;
}
.edu-main h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 24px 0 8px;
}
.edu-main p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 12px;
}
.edu-main ul {
  padding-left: 20px;
  margin-bottom: 14px;
}
.edu-main ul li {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 4px;
}
.edu-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.quick-links-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.quick-links-box h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.quick-links-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-links-box ul li a {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.quick-links-box ul li a:hover { text-decoration: underline; }

/* ── BLOG PAGE STYLES ── */
.blog-hero {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: var(--white);
  padding: 40px 20px;
  text-align: center;
}
.blog-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.blog-hero p { opacity: .85; font-size: 16px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 40px 0;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s;
}
.blog-card:hover { box-shadow: var(--shadow-md); }
.blog-card-body { padding: 20px; }
.blog-card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: 8px;
}
.blog-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; color: var(--gray-900); }
.blog-card p { font-size: 14px; color: var(--gray-500); line-height: 1.6; }
.blog-card-date { font-size: 12px; color: var(--gray-400); margin-top: 12px; }

/* ── ARTICLE / LEGAL PAGE ── */
.page-hero {
  background: var(--gray-900);
  color: var(--white);
  padding: 36px 20px;
}
.page-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.page-hero p { color: #94a3b8; font-size: 14px; }
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px;
}
.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 36px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}
.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 20px 0 8px;
}
.article-body p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 14px;
}
.article-body ul, .article-body ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.article-body li {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 6px;
}
.article-body a { color: var(--primary); }
.article-body strong { color: var(--gray-800); }
.article-cta {
  background: var(--primary-light);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 32px 0;
  text-align: center;
}
.article-cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.article-cta p { font-size: 14px; color: var(--gray-600); margin-bottom: 14px; }

/* ── PRO MODAL ── */
.pro-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.pro-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalIn .18s ease;
}
.pro-modal-wide { max-width: 540px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.pro-modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--gray-400); line-height: 1;
  padding: 4px 8px; border-radius: 4px;
}
.pro-modal-close:hover { color: var(--gray-700); background: var(--gray-100); }
.pro-modal-icon { font-size: 40px; text-align: center; margin-bottom: 10px; }
.pro-modal h3 { text-align: center; font-size: 20px; color: var(--gray-900); margin-bottom: 8px; }
.pro-modal > p { text-align: center; color: var(--gray-500); font-size: 14px; margin-bottom: 16px; }
.pro-modal input[type="text"] {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--gray-200); border-radius: var(--radius);
  font-size: 13px; font-family: monospace; letter-spacing: .08em;
  box-sizing: border-box; transition: border-color .15s;
}
.pro-modal input[type="text"]:focus { outline: none; border-color: var(--primary); }

/* ── CLIENT BOOK ── */
.client-book {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.client-select {
  flex: 1; min-width: 140px;
  padding: 7px 10px;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  font-size: 13px; color: var(--gray-600);
  background: var(--white);
}

/* ── INVOICE HISTORY ── */
.history-list { max-height: 420px; overflow-y: auto; margin-top: 4px; }
.history-empty {
  text-align: center; color: var(--gray-400);
  padding: 32px 16px; font-size: 14px;
}
.history-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--gray-100);
}
.history-row:last-child { border-bottom: none; }
.history-info { flex: 1; min-width: 0; }
.history-inv-num { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.history-client  { font-size: 13px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-date    { font-size: 12px; color: var(--gray-400); }
.history-total   { font-weight: 600; color: var(--gray-700); white-space: nowrap; font-size: 14px; }
.history-actions { display: flex; gap: 4px; }

/* ── PRO ACTIVATE HINT ── */
.pro-activate-hint {
  font-size: 12px; color: var(--primary); opacity: .8;
}
.pro-activate-hint:hover { opacity: 1; }

/* ── TOAST ERROR ── */
.toast.error { background: var(--danger); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .builder-grid { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .invoice-preview-wrap { max-height: 600px; }
  .edu-grid { grid-template-columns: 1fr; }
  .edu-sidebar { position: static; }
}
@media (max-width: 640px) {
  .header-nav a:not(.btn) { display: none; }
  .items-header, .item-row {
    grid-template-columns: 1fr 60px 80px 80px 28px;
  }
  .hero h1 { font-size: 26px; }
  #invoiceDoc { padding: 24px 20px; }
  .inv-header { flex-direction: column; }
  .inv-title-area { text-align: left; }
  .premium-features { flex-direction: column; align-items: center; }
}
