:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f766e;
  --border: #e2e8f0;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: #f8fafc;
  color: var(--text);
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  background: linear-gradient(135deg, var(--bg), #172554 60%, #0f766e 120%);
  color: #fff;
  padding: 56px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  max-width: 760px;
  color: #dbeafe;
}

.hero-note {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 24px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.hero-note ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.9;
}

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

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e0f2fe; color: #0f172a; }

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.nav-wrap a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.stats-grid {
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card strong {
  font-size: 28px;
  color: var(--primary);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 10px 0 12px;
}

.section-heading input,
.tool-card input,
.tool-card select,
.tool-card textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font: inherit;
  background: #fff;
}

.group-title {
  margin: 32px 0 14px;
  font-size: 24px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card h4 {
  margin: 0;
  font-size: 20px;
}

.small {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.inline-fields.two-lines {
  grid-template-columns: repeat(2, 1fr);
}

.info-section,
.status-box {
  margin: 40px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.info-section ol,
.info-section ul {
  line-height: 1.8;
}

#qrCanvas,
#barcodeSvg,
.preview-img {
  max-width: 100%;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.preview-img {
  display: none;
}

.hidden { display: none !important; }

@media (max-width: 980px) {
  .hero-inner,
  .tool-grid,
  .stats-grid,
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .hero-inner,
  .tool-grid,
  .stats-grid,
  .info-grid,
  .inline-fields,
  .inline-fields.two-lines,
  .section-heading {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section-heading {
    align-items: stretch;
  }

  .hero {
    padding: 40px 0;
  }

  .nav-wrap {
    gap: 12px;
  }
}