:root {
  --bg: #080d18;
  --elev: #0f172a;
  --card: #131e33;
  --input: #0a101f;
  --border: rgba(148, 163, 184, 0.16);
  --border-hi: rgba(148, 163, 184, 0.32);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.12);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --blue: #38bdf8;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(880px 420px at 50% -80px, rgba(56, 189, 248, 0.13), transparent 70%),
    radial-gradient(600px 320px at 85% 10%, rgba(16, 185, 129, 0.08), transparent 65%),
    var(--bg);
  color: var(--text);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(8, 13, 24, 0.86);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-badge {
  font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 999px;
  background: var(--green-bg); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.35);
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; background: var(--input); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; }
.lang-switch a { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; color: var(--muted); }
.lang-switch a.active { background: rgba(56,189,248,0.18); color: #e0f2fe; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--border-hi); background: rgba(255,255,255,0.04); color: var(--text); cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { background: rgba(255,255,255,0.09); }
.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669); color: #03150e; border-color: transparent;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.24);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }

.hero { padding: 56px 0 34px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: #6ee7b7;
  background: var(--green-bg); border: 1px solid rgba(16,185,129,0.32); margin-bottom: 18px;
}
.deadline-bar {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; border-radius: 10px; font-size: 13px; color: #fde68a;
  background: var(--amber-bg); border: 1px solid rgba(245,158,11,0.38); margin-bottom: 22px;
}
h1 { font-size: clamp(28px, 4.5vw, 48px); line-height: 1.12; letter-spacing: -0.03em; max-width: 880px; margin: 0 auto 14px; font-weight: 800; }
.grad { background: linear-gradient(90deg, #f8fafc 0%, #7dd3fc 52%, #34d399 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { max-width: 720px; margin: 0 auto 24px; color: var(--muted); font-size: clamp(15px, 1.9vw, 17.5px); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 18px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
section { padding: 28px 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; box-shadow: 0 12px 32px rgba(0,0,0,0.28); }
.grid-2 { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 20px; }
.grid-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.45); border-radius: 14px; padding: 28px 20px;
  text-align: center; background: rgba(10, 16, 31, 0.65); cursor: pointer;
  transition: all 0.16s ease; margin-bottom: 16px;
}
.dropzone:hover, .dropzone.dragover { background: rgba(56, 189, 248, 0.08); border-color: #38bdf8; }
.sample-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }

/* Invoice Sheet Preview */
.inv-paper {
  background: #f8fafc; color: #0f172a; border-radius: 10px; padding: 22px;
  font-size: 13.5px; box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.inv-paper h3 { font-size: 18px; color: #0f172a; margin-bottom: 4px; }
.inv-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; padding: 12px; background: #f1f5f9; border-radius: 8px; }
.inv-paper table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.inv-paper th, .inv-paper td { padding: 8px 6px; border-bottom: 1px solid #cbd5e1; text-align: left; }
.inv-paper th { color: #475569; font-weight: 700; font-size: 11.5px; text-transform: uppercase; }
.inv-paper .num { text-align: right; font-family: var(--mono); }
.inv-totals { margin-top: 14px; margin-left: auto; max-width: 280px; font-size: 13.5px; }
.inv-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.inv-totals .grand { font-size: 16px; font-weight: 800; border-top: 2px solid #0f172a; padding-top: 8px; margin-top: 4px; }

/* Validation Verdict */
.verdict { border-radius: 12px; padding: 16px; border: 1px solid var(--border); margin-bottom: 14px; }
.v-pass { background: var(--green-bg); border-color: rgba(16,185,129,0.45); }
.v-warn { background: var(--amber-bg); border-color: rgba(245,158,11,0.45); }
.v-fail { background: var(--red-bg); border-color: rgba(239,68,68,0.45); }
.chk-list { display: flex; flex-direction: column; gap: 6px; max-height: 440px; overflow-y: auto; padding-right: 4px; }
.chk-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border-radius: 8px; background: rgba(8,13,24,0.55); font-size: 12.5px;
}
.st-pass { color: #34d399; font-weight: 700; }
.st-warn { color: #fbbf24; font-weight: 700; }
.st-error { color: #f87171; font-weight: 700; }

/* Quick Generator */
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
input, select { width: 100%; padding: 9px 11px; border-radius: 8px; background: var(--input); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; outline: none; }
input:focus, select:focus { border-color: var(--blue); }
pre.xml-box {
  background: #050912; border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  font-family: var(--mono); font-size: 11.5px; color: #93c5fd; max-height: 300px; overflow: auto; white-space: pre;
}

/* Pricing */
.pro-card { border-color: rgba(16,185,129,0.5); background: linear-gradient(180deg, rgba(16,185,129,0.09) 0%, var(--card) 45%); }
.price-num { font-size: 38px; font-weight: 800; font-family: var(--mono); }
.feat-ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 16px 0 20px; font-size: 14px; color: #cbd5e1; }
.feat-ul li::before { content: "✓ "; color: var(--green); font-weight: 800; }
.feat-ul.muted li::before { content: "• "; color: var(--dim); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,7,13,0.8); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { max-width: 470px; width: 100%; background: var(--card); border: 1px solid var(--border-hi); border-radius: 16px; padding: 24px; }

footer { border-top: 1px solid var(--border); margin-top: 44px; padding: 26px 0 40px; font-size: 12.5px; color: var(--dim); }
.foot-flex { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-links a:hover { color: var(--text); }

@media (max-width: 880px) { .grid-2, .grid-equal, .grid-3, .inv-meta-grid, .form-2 { grid-template-columns: 1fr; } }
@media print {
  header, .no-print, footer, #generator, #pricing, #faq { display: none !important; }
  body { background: #fff; color: #000; }
  .inv-paper { box-shadow: none; padding: 0; }
}
