/* Dark theme — match approved FreeInvoiceGeneratorr.com dark mockup.
   Loaded after home-fit.css. Uses body.dark-theme (toggled by theme button). */

body.dark-theme{
  --ink:#eef2ff;
  --muted:#93a0b8;
  --line:#243049;
  --blue:#3b82ff;
  --blue2:#2563eb;
  --soft:#0b1220;
  --softBlue:#122038;
  --shadow:0 18px 40px rgba(0,0,0,.45);
  --dk-bg:#050816;
  --dk-elev:#0c1324;
  --dk-card:#101a2e;
  --dk-input:#0a1220;
  --dk-border:#1c2a44;
  --dk-border-soft:#243553;
  --dk-text:#e8eefc;
  --dk-dim:#8b97b0;
  --dk-label:#a7b4cc;
  color:var(--dk-text);
  background:var(--dk-bg);
}

/* Page chrome */
body.dark-theme .site-header{
  background:rgba(8,14,28,.92);
  border-bottom-color:var(--dk-border);
  backdrop-filter:blur(14px);
}
body.dark-theme .brand{color:#f4f7ff}
body.dark-theme .brand .blue{color:#5b9dff}
body.dark-theme .brand .dot{color:#9db0d0}
body.dark-theme .navlinks{color:#c5d0e6}
body.dark-theme .navlinks a:hover{color:#fff}
body.dark-theme .icon-btn{color:#c5d0e6}
body.dark-theme .icon-btn:hover{color:#fff}
body.dark-theme .create-btn{
  background:linear-gradient(180deg,#4b8fff,#2563eb);
  box-shadow:0 8px 20px rgba(37,99,235,.38);
}
body.dark-theme .navlinks.open{
  background:#0c1324;
  border-color:var(--dk-border);
}

/* Hero */
body.dark-theme .hero{
  background:
    radial-gradient(900px 420px at 12% -10%,rgba(59,130,255,.18),transparent 60%),
    radial-gradient(700px 380px at 88% 8%,rgba(99,102,241,.12),transparent 55%),
    linear-gradient(180deg,#0a1224 0%,#050816 78%);
  border-bottom-color:var(--dk-border);
}
body.dark-theme .eyebrow{
  background:rgba(59,130,255,.16);
  color:#9ec2ff;
  border:1px solid rgba(91,157,255,.28);
}
body.dark-theme h1{color:#f5f8ff}
body.dark-theme h1 .blue{color:#6aa4ff}
body.dark-theme .subtitle{color:#a7b4cc}
body.dark-theme .benefit b{color:#eef2ff}
body.dark-theme .benefit small{color:#8b97b0}
body.dark-theme .benefit .circle{
  box-shadow:0 6px 16px rgba(0,0,0,.35),inset 0 0 0 1px rgba(255,255,255,.12);
}

/* Builder / form card */
body.dark-theme .builder-card{
  background:linear-gradient(180deg,#121c32,#0e172a);
  border:1px solid var(--dk-border);
  box-shadow:0 16px 40px rgba(0,0,0,.4);
}
body.dark-theme .doc-tab{
  background:#0a1220;
  border-color:var(--dk-border-soft);
  color:#c5d0e6;
}
body.dark-theme .doc-tab:hover{border-color:#3b82ff;color:#fff}
body.dark-theme .doc-tab.active{
  background:linear-gradient(180deg,#4b8fff,#2563eb);
  border-color:transparent;
  color:#fff;
  box-shadow:0 6px 16px rgba(37,99,235,.35);
}
body.dark-theme .panel-title,
body.dark-theme .items-title{color:#f0f4ff}
body.dark-theme .panel-title .ico-blue{color:#6aa4ff}
body.dark-theme .input,
body.dark-theme textarea,
body.dark-theme select:not(#siteLanguageSelect),
body.dark-theme .item-row,
body.dark-theme .item-row input{
  background:var(--dk-input);
  color:var(--dk-text);
  border-color:var(--dk-border-soft);
}
body.dark-theme .item-row input{border-right-color:var(--dk-border)}
body.dark-theme .input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus{
  border-color:#5b9dff;
  box-shadow:0 0 0 3px rgba(59,130,255,.2);
}
body.dark-theme .field-inline label,
body.dark-theme .settings-bottom label{color:var(--dk-label)}
body.dark-theme .items-table{border-color:var(--dk-border)}
body.dark-theme .items-head{
  background:#17233c;
  color:#d7e2f7;
}
body.dark-theme .item-row{background:#0c1424;border-top-color:var(--dk-border)}
body.dark-theme .del{color:#94a3b8}
body.dark-theme .del:hover{color:#ff6b6b}
body.dark-theme .add-item{
  background:#0a1220;
  border-color:#3b6fbf;
  color:#8cbcff;
}
body.dark-theme .add-item:hover{background:#122038;color:#fff}
body.dark-theme .calc{color:var(--dk-label)}
body.dark-theme .calc-val{color:#e8eefc}
body.dark-theme .calc-total{
  background:rgba(59,130,255,.14);
  color:#f5f8ff;
}
body.dark-theme .calc-total span:last-child{color:#6aa4ff}
body.dark-theme .draft-button{
  background:rgba(59,130,255,.14);
  border-color:#3b6fbf;
  color:#9ec2ff;
}
body.dark-theme .draft-button.secondary{
  background:#0a1220;
  border-color:var(--dk-border-soft);
  color:#c5d0e6;
}
body.dark-theme .advanced-options{color:#8cbcff}
body.dark-theme .advanced-note,
body.dark-theme .privacy-note{color:#8b97b0 !important}
body.dark-theme .advanced-actions{border-top-color:var(--dk-border)}
body.dark-theme .advanced-actions > b{color:#e8eefc}
body.dark-theme .country-mode-notice{
  background:#2a2210;
  border-color:#6b5420;
  color:#f0d9a0;
}
body.dark-theme .status-pill{background:#1a2740;color:#b7c4d6}
body.dark-theme .mobile-preview-button{
  background:#122038;
  border-color:#3b6fbf;
  color:#9ec2ff;
}

/* Right art (decorative) */
body.dark-theme .float-sheet{
  background:#121c32;
  border-color:var(--dk-border);
  box-shadow:0 12px 28px rgba(0,0,0,.45);
}
body.dark-theme .float-sheet b{color:#9ec2ff}
body.dark-theme .float-sheet i{background:#243553}
body.dark-theme .hand-note{color:#6aa4ff}
body.dark-theme .squiggle,
body.dark-theme .squiggle:after{border-color:#6aa4ff}
body.dark-theme .templates-label{color:#9ec2ff}
body.dark-theme .mini-template{
  background:#121c32;
  border-color:var(--dk-border);
  box-shadow:0 8px 20px rgba(0,0,0,.4);
}
body.dark-theme .mini-template i{background:#243553}
body.dark-theme .mini-template .box{background:#0a1220;border-color:#243553}

/* Invoice preview stays light (printed-page contrast on dark UI) */
body.dark-theme .preview-card{
  background:#f7f9fc;
  color:#0b1020;
  border:1px solid #d8e2ef;
  box-shadow:0 20px 48px rgba(0,0,0,.5);
}
body.dark-theme .preview-card .preview-logo strong,
body.dark-theme .preview-card .invoice-word,
body.dark-theme .preview-card .seller,
body.dark-theme .preview-card .meta,
body.dark-theme .preview-card .billbox,
body.dark-theme .preview-card .p-row,
body.dark-theme .preview-card .p-totals,
body.dark-theme .preview-card .preview-lower{
  color:#152033;
}
body.dark-theme .preview-card .preview-logo small{color:#667085}
body.dark-theme .preview-card .billbox{border-color:#dce5ef;background:#fff}
body.dark-theme .preview-card .p-row > div{border-color:#e8edf3}
body.dark-theme .preview-card .p-row.head{background:#edf3f8;color:#0b1020}
body.dark-theme .preview-card .p-totals .grand{background:#e6f2ff}
body.dark-theme .preview-card .p-totals .grand span:last-child{color:#0868ff}
body.dark-theme .preview-actions button{
  background:#0c1324;
  border-color:var(--dk-border);
  color:#e8eefc;
}
body.dark-theme .preview-actions .primary,
body.dark-theme #downloadBtn.primary{
  background:linear-gradient(180deg,#4b8fff,#2563eb);
  border-color:transparent;
  color:#fff;
  box-shadow:0 8px 18px rgba(37,99,235,.4);
}
body.dark-theme .workspace-actions a,
body.dark-theme a[href="/workspace/"]{
  color:#9ec2ff;
}

/* Trust strip — detailed styles live in home-icons.css */
body.dark-theme .hero-strip{color:var(--dk-dim)}
body.dark-theme .payment-note{color:#8b97b0}

/* Lower marketing sections */
body.dark-theme .section{
  background:var(--dk-bg);
  border-bottom-color:var(--dk-border);
}
body.dark-theme .kicker{
  background:rgba(59,130,255,.14);
  color:#9ec2ff;
}
body.dark-theme .section h2{color:#f5f8ff}
body.dark-theme .section p{color:var(--dk-dim)}
body.dark-theme .viewall{
  background:rgba(59,130,255,.14);
  color:#9ec2ff;
}
body.dark-theme .viewall:hover{background:rgba(59,130,255,.22);color:#fff}
body.dark-theme .tool-card,
body.dark-theme .country-card,
body.dark-theme .ind-card{
  background:var(--dk-card);
  border-color:var(--dk-border);
  color:var(--dk-text);
}
body.dark-theme .tool-card:hover,
body.dark-theme .country-card:hover,
body.dark-theme .ind-card:hover{
  border-color:#3b6fbf;
  box-shadow:0 10px 24px rgba(0,0,0,.35);
  transform:translateY(-2px);
}
body.dark-theme .tool-card small,
body.dark-theme .country-card small{color:var(--dk-dim)}
body.dark-theme .tool-icon{
  box-shadow:0 6px 14px rgba(0,0,0,.35);
}

/* How it works */
body.dark-theme .how{
  background:
    radial-gradient(700px 260px at 80% 40%,rgba(59,130,255,.12),transparent 60%),
    linear-gradient(90deg,#0a1428,#0c1830 55%,#0a1428);
  border-bottom-color:var(--dk-border);
}
body.dark-theme .how h2{color:#f5f8ff}
body.dark-theme .how p,
body.dark-theme .step p{color:var(--dk-dim)}
body.dark-theme .step b{color:#eef2ff}
body.dark-theme .num{
  background:linear-gradient(180deg,#4b8fff,#2563eb);
  box-shadow:0 8px 18px rgba(37,99,235,.35);
}
body.dark-theme .step:not(:last-child):after{color:#5b9dff}
body.dark-theme .doc-art{
  background:#121c32;
  box-shadow:0 10px 24px rgba(0,0,0,.4);
}
body.dark-theme .doc-art b{color:#9ec2ff}
body.dark-theme .doc-art i{background:#243553}
body.dark-theme .download-circle{
  background:linear-gradient(180deg,#4b8fff,#2563eb);
  box-shadow:0 8px 20px rgba(37,99,235,.4);
}

/* SEO / FAQ / footer */
body.dark-theme .content-section,
body.dark-theme .site-footer{
  background:var(--dk-bg);
  border-color:var(--dk-border);
}
body.dark-theme .faq-section{background:#070d1a}
body.dark-theme .content-card,
body.dark-theme .faq-grid details,
body.dark-theme .quick-search{
  background:var(--dk-card);
  border-color:var(--dk-border);
  color:var(--dk-text);
}
body.dark-theme .content-intro h2,
body.dark-theme .content-card h3,
body.dark-theme .faq-grid summary{color:#f0f4ff}
body.dark-theme .content-intro p,
body.dark-theme .content-card p,
body.dark-theme .content-card li,
body.dark-theme .faq-grid details p,
body.dark-theme .site-footer p,
body.dark-theme .site-footer nav a,
body.dark-theme .site-footer small{color:var(--dk-dim)}
body.dark-theme .site-footer nav a:hover{color:#9ec2ff}
body.dark-theme .faq-grid summary:after{color:#6aa4ff}
body.dark-theme .quick-search label{color:#d7e2f7}
body.dark-theme .quick-search input{
  background:var(--dk-input);
  border-color:var(--dk-border-soft);
  color:var(--dk-text);
}
body.dark-theme .quick-search a{
  border-top-color:var(--dk-border);
  color:#c5d0e6;
}
body.dark-theme .quick-search a:hover{color:#9ec2ff}
body.dark-theme .site-toast{background:#0c1324;border:1px solid var(--dk-border)}

/* Template-system / extras that appear on homepage */
body.dark-theme .calc-inline-link{color:#8cbcff !important}
body.dark-theme #sumTotal,
body.dark-theme #pvCurrency,
body.dark-theme #pvTotal,
body.dark-theme #mobilePreviewButton,
body.dark-theme .viewall{color:#6aa4ff}

/* Theme toggle affordance when dark is active */
body.dark-theme #themeButton{color:#fbbf24}

@media (max-width:900px){
  body.dark-theme .preview-card{
    /* Keep light preview on mobile too for printable contrast */
    background:#f7f9fc;
  }
}
