/* ============================================================
   DOOT CYBER SARTHI - Enterprise Design System
   Government/Official Grade - White + Navy Blue + Cyan
   ============================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* ─── CSS Custom Properties (Design Tokens) ─── */
:root {
  --primary:        #1a3f6b;   /* Deep Navy Blue */
  --primary-light:  #2563a8;
  --primary-soft:   #dbeafe;
  --accent:         #0ea5e9;   /* Sky Cyan */
  --accent-light:   #38bdf8;
  --accent-glow:    rgba(14,165,233,0.25);
  --success:        #16a34a;
  --warning:        #d97706;
  --danger:         #dc2626;
  --neutral-50:     #f8fafc;
  --neutral-100:    #f1f5f9;
  --neutral-200:    #e2e8f0;
  --neutral-300:    #cbd5e1;
  --neutral-400:    #94a3b8;
  --neutral-500:    #64748b;
  --neutral-600:    #475569;
  --neutral-700:    #334155;
  --neutral-800:    #1e293b;
  --neutral-900:    #0f172a;
  --white:          #ffffff;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:      0 10px 30px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
  --shadow-xl:      0 20px 50px rgba(0,0,0,.13);
  --shadow-primary: 0 4px 18px rgba(37,99,168,0.22);
  --radius-sm:      0.375rem;
  --radius:         0.625rem;
  --radius-lg:      1rem;
  --radius-xl:      1.5rem;
  --transition:     0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--neutral-50);
  color: var(--neutral-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Dark Mode */
body.dark {
  --neutral-50:  #0f172a;
  --neutral-100: #1e293b;
  --neutral-200: #334155;
  --neutral-300: #475569;
  --neutral-400: #64748b;
  --neutral-800: #e2e8f0;
  --neutral-900: #f8fafc;
  --white:       #1e293b;
  background-color: #0f172a;
  color: #e2e8f0;
}

/* ─── Typography ─── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--neutral-600); }
body.dark p { color: var(--neutral-400); }

a { text-decoration: none; color: inherit; }

/* ─── NAVBAR ─── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

body.dark #site-header {
  background: rgba(15,23,42,0.97);
  border-bottom-color: var(--neutral-700);
}

#site-header .header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.header-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.header-logo .brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

body.dark .header-logo .brand-name { color: #60a5fa; }

.header-logo .brand-tagline {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--neutral-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Desktop Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav a,
.header-nav button {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neutral-700);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.header-nav a:hover,
.header-nav button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

body.dark .header-nav a,
body.dark .header-nav button { color: var(--neutral-300); }
body.dark .header-nav a:hover,
body.dark .header-nav button:hover { color: #60a5fa; background: rgba(37,99,168,0.15); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Sign-In Button (Enterprise primary CTA) */
.btn-signin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white) !important;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border: 1px solid transparent;
  box-shadow: var(--shadow-primary), inset 0 1px 0 rgba(255,255,255,.12);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.btn-signin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37,99,168,0.35), inset 0 1px 0 rgba(255,255,255,.15);
  background: linear-gradient(135deg, #3174c2 0%, var(--primary-light) 100%);
}

/* Theme Toggle Button */
.btn-theme {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  cursor: pointer;
  color: var(--neutral-600);
  font-size: 1rem;
  transition: var(--transition);
}

.btn-theme:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--accent);
}

body.dark .btn-theme { background: var(--neutral-800); border-color: var(--neutral-700); color: #94a3b8; }

/* Hamburger */
.btn-hamburger {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  cursor: pointer;
  color: var(--neutral-600);
  font-size: 1.1rem;
  align-items: center; justify-content: center;
  transition: var(--transition);
}

@media (max-width: 900px) {
  .header-nav  { display: none !important; }
  .btn-hamburger { display: flex !important; }
}

@media (max-width: 768px) {
  #site-header .header-inner {
    height: 60px !important;
    padding: 0 0.75rem !important;
    gap: 0.5rem !important;
  }

  .header-logo {
    gap: 0.4rem !important;
  }

  .header-logo img {
    width: 32px !important;
    height: 32px !important;
  }

  .header-logo .brand-name {
    font-size: 0.88rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .header-logo .brand-tagline {
    display: none !important;
  }

  .header-actions {
    gap: 0.35rem !important;
    display: flex !important;
    align-items: center !important;
  }

  .btn-theme {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
  }

  .btn-signin {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }

  .btn-hamburger {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ─── Mobile Drawer ─── */
#mobile-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 300px; height: 100%;
  background: var(--white);
  z-index: 1100;
  box-shadow: var(--shadow-xl);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

body.dark #mobile-drawer { background: var(--neutral-800); }

#mobile-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--neutral-200);
}

body.dark .drawer-header { border-bottom-color: var(--neutral-700); }

.drawer-nav {
  padding: 1rem;
  flex: 1;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neutral-700);
  transition: var(--transition);
  margin-bottom: 0.15rem;
}

.drawer-nav a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

body.dark .drawer-nav a { color: var(--neutral-300); }
body.dark .drawer-nav a:hover { background: rgba(37,99,168,0.15); color: #60a5fa; }

.drawer-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neutral-400);
  padding: 0.75rem 1rem 0.35rem;
}

#mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

#mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── HERO SECTION ─── */
.hero-section {
  padding-top: 100px;
  padding-bottom: 5rem;
  background: linear-gradient(160deg, #f0f7ff 0%, #ffffff 50%, #f0f4ff 100%);
  position: relative;
  overflow: hidden;
}

body.dark .hero-section {
  background: linear-gradient(160deg, #0c1929 0%, #0f172a 50%, #0c1929 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  background: var(--primary-soft);
  border: 1px solid rgba(37,99,168,0.2);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

body.dark .hero-badge {
  background: rgba(37,99,168,0.15);
  border-color: rgba(37,99,168,0.4);
  color: #60a5fa;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  font-weight: 900;
  color: var(--neutral-900);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

body.dark .hero-title { color: #f1f5f9; }

.hero-title .text-accent {
  color: var(--primary-light);
  position: relative;
}

body.dark .hero-title .text-accent { color: #60a5fa; }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--neutral-600);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

body.dark .hero-subtitle { color: #94a3b8; }

/* Hero CTA Buttons */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.btn-primary-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,99,168,0.38);
}

.btn-secondary-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--white);
  border: 1.5px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.btn-secondary-hero:hover {
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

body.dark .btn-secondary-hero {
  color: #60a5fa;
  border-color: #2563a8;
  background: rgba(37,99,168,0.08);
}

/* Stats Row */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

body.dark .stat-value { color: #60a5fa; }

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--neutral-200);
  align-self: center;
}

body.dark .stat-divider { background: var(--neutral-700); }

/* Hero Visual */
.hero-visual {
  flex-shrink: 0;
  position: relative;
}

.hero-visual canvas {
  width: 420px !important;
  height: 420px !important;
}

/* ─── SECTION DEFAULTS ─── */
.section {
  padding: 5rem 0;
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--neutral-900);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

body.dark .section-title { color: #f1f5f9; }

.section-subtitle {
  font-size: 1rem;
  color: var(--neutral-500);
  max-width: 560px;
  line-height: 1.7;
}

/* ─── TOOL / FEATURE CARDS (Compact Modern Redesign) ─── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body.dark .tool-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Top accent glow line */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tool-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.15);
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.9);
}

.tool-card:hover::before { opacity: 1; }

/* Tool Icon Badge with HD Emoji / Icon support */
.tool-icon-badge {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-icon-badge {
  transform: scale(1.1) rotate(3deg);
}

/* Category Pill Tag */
.tool-tag {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
  margin-bottom: 2px;
}
.tag-cyber    { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.tag-telecom  { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.tag-finance  { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }
.tag-evidence { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.tag-osint    { background: rgba(244, 63, 94, 0.15); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.3); }

/* Icon Color Variants */
.icon-blue   { background: rgba(29,78,216,0.18);  color: #60a5fa; }
.icon-cyan   { background: rgba(14,116,144,0.18); color: #22d3ee; }
.icon-green  { background: rgba(21,128,61,0.18);  color: #4ade80; }
.icon-purple { background: rgba(124,58,237,0.18); color: #c084fc; }
.icon-orange { background: rgba(194,65,12,0.18);  color: #fb923c; }
.icon-red    { background: rgba(185,28,28,0.18);  color: #f87171; }
.icon-indigo { background: rgba(67,56,202,0.18); color: #818cf8; }
.icon-teal   { background: rgba(15,118,110,0.18); color: #2dd4bf; }
.icon-amber  { background: rgba(180,83,9,0.18);   color: #fbbf24; }

.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neutral-800);
  line-height: 1.3;
  margin: 2px 0 4px 0;
}

body.dark .tool-card h3 { color: #f8fafc; }

.tool-card p {
  font-size: 0.78rem;
  color: var(--neutral-600);
  line-height: 1.5;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.dark .tool-card p { color: #94a3b8; }

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.tool-card-link:hover {
  gap: 0.55rem;
  color: #818cf8;
}

body.dark .tool-card-link { color: #38bdf8; }

/* ─── NOTICE / TRUST BANNER ─── */
.trust-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 2.5rem 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.trust-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.trust-banner h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
  position: relative;
}

.trust-banner p {
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
  position: relative;
}

/* ─── FOOTER ─── */
footer.site-footer {
  background: var(--neutral-900);
  color: var(--neutral-400);
  padding: 3.5rem 0 1.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--neutral-800);
}

.footer-brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--neutral-500);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-social a {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  display: flex; align-items: center; justify-content: center;
  color: var(--neutral-400);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: white;
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neutral-300);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--neutral-500);
  transition: var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--neutral-600);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: rgba(14,165,233,0.1);
  border: 1px solid rgba(14,165,233,0.2);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

/* ─── GENERIC BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,168,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border-color: var(--primary-light);
}

.btn-outline:hover {
  background: var(--primary-soft);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: white;
}

/* ─── FORM ELEMENTS ─── */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--neutral-200);
  background: var(--white);
  color: var(--neutral-800);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

body.dark .form-input,
body.dark .form-select,
body.dark .form-textarea {
  background: var(--neutral-800);
  border-color: var(--neutral-700);
  color: #e2e8f0;
}

/* ─── TABLE ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead th {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.data-table tbody tr {
  border-bottom: 1px solid var(--neutral-100);
  transition: var(--transition);
}

body.dark .data-table tbody tr { border-bottom-color: var(--neutral-700); }

.data-table tbody tr:hover { background: var(--primary-soft); }
body.dark .data-table tbody tr:hover { background: rgba(37,99,168,0.1); }

.data-table td {
  padding: 0.65rem 1rem;
  color: var(--neutral-700);
}

body.dark .data-table td { color: #cbd5e1; }

/* ─── CARDS (generic) ─── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

body.dark .card {
  background: var(--neutral-800);
  border-color: var(--neutral-700);
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.dark .card-header { border-bottom-color: var(--neutral-700); }

.card-body { padding: 1.5rem; }

/* ─── ALERTS ─── */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  border: 1px solid transparent;
}

.alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.alert-danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.alert-info    { background: var(--primary-soft); color: var(--primary); border-color: #bfdbfe; }

/* ─── BADGE ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fff7ed; color: #b45309; }

/* ─── SPINNER ─── */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--neutral-200);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SECTION: Features Background Alternation ─── */
.section-alt { background: var(--neutral-100); }
body.dark .section-alt { background: rgba(15,23,42,0.5); }

/* ─── MONOSPACE ─── */
.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.82em;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-visual canvas { width: 320px !important; height: 320px !important; }
}

@media (max-width: 768px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-subtitle { max-width: 100%; }
  .hero-ctas { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ─── UTILITY CLASSES ─── */
.text-primary { color: var(--primary-light); }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--neutral-500); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-bold      { font-weight: 700; }
.fw-extra     { font-weight: 800; }
.mt-1  { margin-top: 0.25rem; }  .mt-2  { margin-top: 0.5rem; }
.mt-3  { margin-top: 0.75rem; }  .mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }   .mt-8  { margin-top: 2rem; }
.mb-1  { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; }
.mb-3  { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }  .mb-8 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ══════════════════════════════════════════════════════════════════
   UNIVERSAL MOBILE RESPONSIVE ENGINE (FOR ALL PAGES & TOOLS)
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Container Padding */
  .container, .section-container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    max-width: 100% !important;
  }

  /* Page Padding Top */
  #page-content {
    padding-top: 60px !important;
  }

  .pt-24, .pt-16, .pt-12 {
    padding-top: 1rem !important;
  }

  /* Section Headers */
  .section-header, .text-center.mb-8, .text-center.mb-6 {
    margin-bottom: 1.25rem !important;
  }

  .section-header h2, h2.section-title, h3.text-3xl, h3.text-4xl, h1.display-6 {
    font-size: 1.4rem !important;
    line-height: 1.25 !important;
  }

  .section-header p, p.section-subtitle, p.text-gray-500, p.text-gray-400 {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
  }

  /* Tool Cards & Containers */
  .card, div.card, .p-8, .p-6 {
    padding: 1.1rem 0.85rem !important;
    border-radius: 12px !important;
  }

  /* Forms & Action Bar Layout */
  div[style*="display: flex"], .flex-wrap, .flex-col, .flex-row {
    gap: 8px !important;
  }

  /* Input fields, textareas, selects */
  input[type="text"], input[type="search"], input[type="password"], input[type="url"], input[type="number"], 
  textarea, select, .form-control {
    font-size: 0.82rem !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 8px !important;
  }

  textarea {
    rows: 3 !important;
  }

  /* Buttons */
  button, .btn, .btn-primary, .btn-secondary {
    font-size: 0.82rem !important;
    padding: 0.55rem 1rem !important;
    border-radius: 8px !important;
  }

  /* Tables horizontal scrolling touch support */
  .overflow-x-auto, #result, #resultContainer, div[id*="result"], div[style*="overflow-x: auto"] {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-top: 0.75rem !important;
  }

  table {
    min-width: 580px !important;
  }

  th, td {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .tool-card {
    padding: 0.85rem 1rem !important;
  }

  /* Stack button bars vertically if narrow */
  .flex-wrap > button {
    flex: 1 1 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   CENTRALIZED ADAPTIVE THEME ENGINE FOR ALL TOOLS & PAGES
   ══════════════════════════════════════════════════════════════════ */

/* Global Section background mapping */
#page-content {
  background-color: var(--neutral-50) !important;
  color: var(--neutral-800) !important;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Tool Sections */
section.features, section.section {
  background-color: var(--neutral-50) !important;
  color: var(--neutral-800) !important;
}

/* Inputs, textareas, selects globally */
input[type="text"], input[type="search"], input[type="password"], input[type="url"], input[type="number"], 
textarea, select, .form-control {
  background-color: var(--white) !important;
  color: var(--neutral-800) !important;
  border: 1.5px solid var(--neutral-200) !important;
  transition: all 0.2s ease;
}

body.dark input[type="text"], body.dark input[type="search"], body.dark input[type="password"], body.dark input[type="url"], body.dark input[type="number"], 
body.dark textarea, body.dark select, body.dark .form-control {
  background-color: rgba(2, 6, 23, 0.7) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Cards globally - Light vs Dark */
.card, .content-wrapper .card, div.card {
  background-color: var(--white) !important;
  color: var(--neutral-800) !important;
  border: 1px solid var(--neutral-200) !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--radius-lg) !important;
}

body.dark .card, body.dark .content-wrapper .card, body.dark div.card {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(16px);
  color: #e2e8f0 !important;
}

/* Titles and labels */
.section-header h3, h3.text-3xl, h3.text-4xl, h2.section-title, .section-header h2 {
  color: var(--neutral-900) !important;
}
body.dark .section-header h3, body.dark h3.text-3xl, body.dark h3.text-4xl, body.dark h2.section-title, body.dark .section-header h2 {
  color: #f8fafc !important;
}

.section-header p, p.text-gray-500, p.text-gray-400, .section-subtitle {
  color: var(--neutral-600) !important;
}
body.dark .section-header p, body.dark p.text-gray-500, body.dark p.text-gray-400, body.dark .section-subtitle {
  color: var(--neutral-400) !important;
}

/* Dynamic Tables inside all Tools - FIX WHITE ON WHITE */
table, .min-w-full.border {
  background-color: var(--white) !important;
  color: var(--neutral-800) !important;
  border-color: var(--neutral-200) !important;
}

body.dark table, body.dark .min-w-full.border {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

thead, thead tr, thead th {
  background-color: var(--neutral-100) !important;
  color: var(--neutral-900) !important;
  font-weight: 700 !important;
}

body.dark thead, body.dark thead tr, body.dark thead th {
  background-color: #020617 !important;
  color: #38bdf8 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

tbody, tr, td {
  color: inherit !important;
  border-color: var(--neutral-200) !important;
}

body.dark tbody, body.dark tr, body.dark td {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Alternating rows for readability */
tbody tr:nth-child(even) {
  background-color: var(--neutral-50) !important;
}

body.dark tbody tr:nth-child(even) {
  background-color: rgba(2, 6, 23, 0.4) !important;
}

tbody tr:hover td {
  background-color: var(--primary-soft) !important;
}

body.dark tbody tr:hover td {
  background-color: rgba(56, 189, 248, 0.1) !important;
}

/* Meta texts below buttons */
#reportMeta {
  color: var(--neutral-500) !important;
}
body.dark #reportMeta {
  color: var(--neutral-400) !important;
}

/* Text and details containers inside generated reports */
.bg-gray-50, .dark\:bg-gray-700\/50 {
  background-color: var(--neutral-100) !important;
  border-color: var(--neutral-200) !important;
  color: var(--neutral-800) !important;
}

body.dark .bg-gray-50, body.dark .dark\:bg-gray-700\/50 {
  background-color: rgba(30, 41, 59, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

.text-gray-900, .dark\:text-gray-100 {
  color: var(--neutral-900) !important;
}
body.dark .text-gray-900, body.dark .dark\:text-gray-100 {
  color: #f8fafc !important;
}

.text-gray-400, .dark\:text-gray-400 {
  color: var(--neutral-500) !important;
}
body.dark .text-gray-400, body.dark .dark\:text-gray-400 {
  color: #94a3b8 !important;
}

.border-gray-200, .dark\:border-gray-600 {
  border-color: var(--neutral-200) !important;
}
body.dark .border-gray-200, body.dark .dark\:border-gray-600 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

