/* ═══════════════════════════════════════════════
   Scan ERP Blog — Shared Stylesheet
   Consistent design across all 27 blog posts
   ═══════════════════════════════════════════════ */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  background: #ffffff;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── Reading Progress Bar ── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── Header ── */
.site-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
}
.logo-name {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.header-nav a:hover { color: #2563eb; background: #f0f7ff; }
.header-nav .nav-cta {
  background: #2563eb;
  color: #fff !important;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  margin-left: 8px;
}
.header-nav .nav-cta:hover { background: #1d4ed8; color: #fff !important; }

/* ── Breadcrumb ── */
.breadcrumb {
  max-width: 780px;
  margin: 28px auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: #2563eb; }
.breadcrumb .sep { margin: 0 4px; color: #cbd5e1; }

/* ── Article ── */
article {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
article h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin: 24px 0 16px;
  letter-spacing: -0.6px;
}

/* Article meta bar */
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 36px;
  font-size: 13px;
}
.meta-author {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: #334155;
}
.meta-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.meta-divider { color: #e2e8f0; }
.meta-date { color: #64748b; }
.meta-read {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
}
.meta-tag {
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: auto;
}

article h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 52px 0 16px;
  letter-spacing: -0.4px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}
article h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 32px 0 12px;
}
article h4 {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
article p {
  font-size: 16px;
  color: #334155;
  margin-bottom: 20px;
  line-height: 1.8;
}
article ul, article ol {
  margin: 0 0 20px 24px;
  color: #334155;
}
article li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.7;
}
article strong { color: #1e293b; }
article em { color: #475569; }
article a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}
article a:hover { color: #1d4ed8; }

/* ── Callout boxes ── */
.callout {
  padding: 18px 22px;
  margin: 28px 0;
  border-radius: 0 10px 10px 0;
  border-left: 4px solid;
}
.callout, .callout-info {
  background: #f0f7ff;
  border-color: #2563eb;
}
.callout p, .callout-info p { margin-bottom: 0; color: #1e3a5f; }
.callout strong, .callout-info strong { color: #1e40af; }
.callout-tip {
  background: #f0fdf4;
  border-color: #16a34a;
}
.callout-tip p { margin-bottom: 0; color: #14532d; }
.callout-tip strong { color: #15803d; }
.callout-warning {
  background: #fffbeb;
  border-color: #d97706;
}
.callout-warning p { margin-bottom: 0; color: #78350f; }
.callout-warning strong { color: #b45309; }

/* ── Formula box ── */
.formula-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 32px;
  margin: 32px 0;
  text-align: center;
}
.formula-box code {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  background: #e0e7ff;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  margin: 8px 0;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.formula-box p { margin-bottom: 8px; font-size: 14px; color: #64748b; }

/* ── CTA box ── */
.cta-box {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 60%, #3b82f6 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 44px 40px;
  margin: 52px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.cta-box h3 {
  color: #ffffff;
  font-size: 22px;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
  position: relative;
}
.cta-box p {
  color: #bfdbfe;
  margin-bottom: 28px;
  font-size: 15px;
  position: relative;
}
.cta-btn {
  display: inline-block;
  background: #ffffff;
  color: #1e40af;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 36px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  color: #1e40af;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 28px 0; border-radius: 12px; border: 1px solid #e2e8f0; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0;
}
.comparison-table th {
  background: #0f172a;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  color: #f1f5f9;
  white-space: nowrap;
}
.comparison-table th:first-child { border-radius: 0; }
.comparison-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: top;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: #f8fafc; }
.comparison-table tr:hover td { background: #f0f7ff; transition: background 0.15s; }
.comparison-table .total-row td {
  font-weight: 700;
  color: #0f172a;
  background: #eff6ff !important;
  border-top: 2px solid #2563eb;
}

/* ── Author bio ── */
.author-bio {
  margin-top: 48px;
  padding: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.author-bio .bio-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.author-bio .bio-text { font-size: 14px; color: #475569; line-height: 1.6; }
.author-bio .bio-text strong { color: #0f172a; font-size: 15px; display: block; margin-bottom: 4px; }

/* ── Related posts ── */
.related-posts {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 2px solid #f1f5f9;
}
.related-posts h2 {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border: none !important;
  letter-spacing: -0.3px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  display: block;
  padding: 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  background: #fff;
}
.related-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37,99,235,0.1);
  transform: translateY(-2px);
  color: inherit;
}
.related-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.4;
}
.related-card p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 40px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  background: #f8fafc;
}
.footer-inner {
  max-width: 780px;
  margin: 0 auto;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  margin-bottom: 12px;
}
.footer-logo img { width: 28px; height: 28px; }
.footer-logo .logo-name { font-size: 15px; color: #0f172a; font-weight: 700; }
.site-footer a { color: #64748b; text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: #2563eb; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-nav .nav-cta { display: none; }
}
@media (max-width: 640px) {
  article h1 { font-size: 26px; }
  article h2 { font-size: 20px; }
  .cta-box { padding: 30px 22px; }
  .cta-box h3 { font-size: 19px; }
  .header-nav a:not(.nav-cta) { display: none; }
  .header-nav .nav-cta { display: inline-block; margin-left: 0; }
  .comparison-table { font-size: 12px; }
  .comparison-table th, .comparison-table td { padding: 9px 10px; }
  .formula-box { padding: 20px 18px; }
  .formula-box code { font-size: 13px; }
  .author-bio { flex-direction: column; gap: 12px; }
  .article-meta { gap: 8px; }
  .meta-tag { margin-left: 0; }
}
@media (max-width: 420px) {
  .header-inner { padding: 0 16px; }
  article { padding: 0 16px 60px; }
  .breadcrumb { padding: 0 16px; }
}
