/* ============================================================
   MavexTech Polish v2 - DARK THEME
   Comprehensive dark mode override for tool pages, header, footer.
   Uses html/body prefix and !important to beat per-tool inline styles.
   ============================================================ */

:root{
  --mvx-bg: #0a0a0a;
  --mvx-surface: #141414;
  --mvx-surface-2: #1a1a1a;
  --mvx-border: #262626;
  --mvx-text: #e5e5e5;
  --mvx-text-strong: #fafafa;
  --mvx-text-muted: #a3a3a3;
  --mvx-accent: #60a5fa;
}

/* Global base */
html, html body{ background: #0a0a0a !important; color: #e5e5e5 !important; }
html body{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important; line-height: 1.65; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html body h1, html body h2, html body h3, html body h4, html body h5{ color: #fafafa !important; letter-spacing: -0.015em; }
html body p{ color: #d4d4d4; }
html body a{ color: #60a5fa; text-decoration: none; transition: color .15s; }
html body a:hover{ color: #93c5fd; }
html body code{ background: #1a1a1a !important; color: #fafafa !important; padding: 2px 6px; border-radius: 4px; font-size: 13px; border: 1px solid #262626 !important; }
html body ::selection{ background: #3b82f6; color: #fff; }
html{ scroll-behavior: smooth; }

/* HEADER */
html body .site-header{ position: sticky !important; top: 0 !important; z-index: 100 !important; background: rgba(10,10,10,0.92) !important; backdrop-filter: saturate(180%) blur(10px) !important; -webkit-backdrop-filter: saturate(180%) blur(10px) !important; border-bottom: 1px solid #1f1f1f !important; padding: 0 !important; }
html body .site-header .header-inner{ max-width: 1280px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
html body .site-header .site-branding{ display: flex; align-items: center; gap: 12px; }
html body .site-header .custom-logo-link{ display: block; line-height: 0; }
html body .site-header .custom-logo{ max-height: 38px !important; width: auto !important; height: auto !important; display: block; }
html body .site-header .site-description{ display: none !important; }

/* HEADER MENU */
html body .site-header .site-navigation .menu{ display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; align-items: center; }
html body .site-header .site-navigation .menu-item a{ display: inline-block !important; padding: 8px 14px !important; color: #a3a3a3 !important; font-weight: 500 !important; font-size: 14.5px !important; text-decoration: none !important; border-radius: 8px !important; transition: all .15s !important; white-space: nowrap; background: transparent !important; }
html body .site-header .site-navigation .menu-item a:hover{ color: #fafafa !important; background: #1a1a1a !important; }
html body .site-header .site-navigation .current-menu-item > a,
html body .site-header .site-navigation .current_page_item > a,
html body .site-header .site-navigation .current-menu-ancestor > a{ color: #fafafa !important; font-weight: 600 !important; background: #1a1a1a !important; }

/* FOOTER */
html body .site-footer{ background: #0a0a0a !important; border-top: 1px solid #1f1f1f !important; padding: 56px 0 28px !important; margin-top: 80px !important; color: #a3a3a3 !important; }
html body .site-footer .footer-inner{ max-width: 1280px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
html body .site-footer .site-branding{ display: flex; flex-direction: column; align-items: center; gap: 8px; }
html body .site-footer .custom-logo{ max-height: 34px !important; width: auto !important; height: auto !important; opacity: 0.85; }
html body .site-footer .site-description{ display: block !important; font-size: 14px !important; color: #737373 !important; margin: 0; }
html body .site-footer .site-navigation .menu{ display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; list-style: none; padding: 0; margin: 0; }
html body .site-footer .site-navigation .menu-item a{ color: #a3a3a3 !important; font-size: 14px !important; text-decoration: none !important; transition: color .15s; background: transparent !important; padding: 4px 8px !important; }
html body .site-footer .site-navigation .menu-item a:hover{ color: #fafafa !important; }
html body .site-footer .copyright,
html body .site-footer .copyright a{ color: #737373 !important; font-size: 13px !important; }

/* TOOL PAGES OVERRIDES */
html body .mvx-tool{ color: #e5e5e5 !important; }
html body .mvx-tool-head h1{ color: #fafafa !important; }
html body .mvx-tool-head p{ color: #a3a3a3 !important; }
html body .mvx-card{ background: #141414 !important; border: 1px solid #262626 !important; box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important; }
html body .mvx-row label{ color: #e5e5e5 !important; }
html body .mvx-row input[type=text],
html body .mvx-row input[type=number],
html body .mvx-row input[type=url],
html body .mvx-row input[type=date],
html body .mvx-row input[type=email],
html body .mvx-row input[type=password],
html body .mvx-row select,
html body .mvx-row textarea{ background: #1a1a1a !important; color: #e5e5e5 !important; border: 1px solid #2a2a2a !important; }
html body .mvx-row input::placeholder,
html body .mvx-row textarea::placeholder{ color: #525252 !important; }
html body .mvx-row input:focus,
html body .mvx-row textarea:focus,
html body .mvx-row select:focus{ background: #1f1f1f !important; border-color: #60a5fa !important; outline: none !important; box-shadow: 0 0 0 3px rgba(96,165,250,0.15) !important; }
html body .mvx-row input[type=color]{ background: #1a1a1a !important; border: 1px solid #2a2a2a !important; height: 50px !important; }

/* Buttons */
html body .mvx-btn-primary{ background: #fafafa !important; color: #0a0a0a !important; }
html body .mvx-btn-primary:hover{ background: #fff !important; }
html body .mvx-btn-secondary{ background: #1f1f1f !important; color: #e5e5e5 !important; border: 1px solid #2a2a2a !important; }
html body .mvx-btn-secondary:hover{ background: #262626 !important; border-color: #404040 !important; }

/* Result block */
html body .mvx-result{ background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%) !important; border: 1px solid #262626 !important; }
html body .mvx-result h3{ color: #a3a3a3 !important; }
html body .mvx-result-value{ color: #fafafa !important; }
html body .mvx-result-sub{ color: #a3a3a3 !important; }

/* Stat cards */
html body .mvx-stat{ background: #1a1a1a !important; border: 1px solid #262626 !important; }
html body .mvx-stat-label{ color: #a3a3a3 !important; }
html body .mvx-stat-value{ color: #fafafa !important; }

/* Tabs */
html body .mvx-tabs{ border-bottom-color: #262626 !important; }
html body .mvx-tab{ color: #a3a3a3 !important; }
html body .mvx-tab:hover{ color: #fafafa !important; }
html body .mvx-tab.active{ color: #fafafa !important; border-bottom-color: #60a5fa !important; }

/* Breadcrumb */
html body .mvx-breadcrumb{ color: #737373 !important; }
html body .mvx-breadcrumb a{ color: #a3a3a3 !important; }
html body .mvx-breadcrumb a:hover{ color: #fafafa !important; }

/* Info section */
html body .mvx-info{ background: #141414 !important; border: 1px solid #262626 !important; }
html body .mvx-info h2{ color: #fafafa !important; }
html body .mvx-info p, html body .mvx-info ul, html body .mvx-info li{ color: #d4d4d4 !important; }

/* Toast */
html body .mvx-toast{ background: #fafafa !important; color: #0a0a0a !important; }

/* Error/Success */
html body .mvx-error{ background: rgba(239,68,68,0.1) !important; border: 1px solid rgba(239,68,68,0.3) !important; color: #fca5a5 !important; }
html body .mvx-success{ background: rgba(34,197,94,0.1) !important; border: 1px solid rgba(34,197,94,0.3) !important; color: #86efac !important; }

/* File drop */
html body .mvx-file-drop{ background: #141414 !important; border: 2px dashed #2a2a2a !important; color: #a3a3a3 !important; }
html body .mvx-file-drop:hover{ background: #1a1a1a !important; border-color: #404040 !important; }
html body .mvx-file-list li{ background: #1a1a1a !important; border: 1px solid #262626 !important; color: #e5e5e5 !important; }
html body .mvx-file-list li button{ background: rgba(239,68,68,0.15) !important; color: #fca5a5 !important; }

/* Color preview, QR */
html body .mvx-color-preview{ border: 1px solid #262626 !important; }
html body .mvx-qr-wrap{ background: #fafafa !important; border: 1px solid #262626 !important; }

/* KD tool tables */
html body .mvx-kd-table th{ background: #1a1a1a !important; border-bottom: 1px solid #262626 !important; color: #fafafa !important; }
html body .mvx-kd-table td{ border-bottom: 1px solid #1f1f1f !important; color: #e5e5e5 !important; }
html body .mvx-kd-empty{ background: #141414 !important; color: #737373 !important; border: 1px dashed #2a2a2a !important; }
html body .mvx-kd-target-row{ background: rgba(96,165,250,0.05) !important; }

/* Status badges */
html body .mvx-kd-status.good{ background: rgba(34,197,94,0.15) !important; color: #86efac !important; }
html body .mvx-kd-status.ok{ background: rgba(245,158,11,0.15) !important; color: #fcd34d !important; }
html body .mvx-kd-status.low{ background: rgba(96,165,250,0.15) !important; color: #93c5fd !important; }
html body .mvx-kd-status.zero{ background: rgba(239,68,68,0.15) !important; color: #fca5a5 !important; }
html body .mvx-kd-status.high{ background: rgba(249,115,22,0.15) !important; color: #fdba74 !important; }

/* Converter inline rows */
html body #ln-results > div, html body #wt-results > div, html body #tp-results > div{ background: #1a1a1a !important; border: 1px solid #262626 !important; color: #e5e5e5 !important; }
html body #ln-results > div span, html body #wt-results > div span, html body #tp-results > div span{ color: #a3a3a3 !important; }

/* Category page */
html body .mvx-cat-page{ color: #e5e5e5 !important; }
html body .mvx-cat-head h1{ color: #fafafa !important; }
html body .mvx-cat-head p{ color: #a3a3a3 !important; }
html body .mvx-cat-item{ background: #141414 !important; border: 1px solid #262626 !important; color: #e5e5e5 !important; }
html body .mvx-cat-item:hover{ border-color: #60a5fa !important; box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important; color: #fafafa !important; }
html body .mvx-cat-title{ color: #fafafa !important; }
html body .mvx-cat-desc{ color: #a3a3a3 !important; }
html body .mvx-cat-tag{ background: #1f1f1f !important; color: #a3a3a3 !important; }
html body .mvx-cat-empty{ background: #141414 !important; color: #737373 !important; border: 1px dashed #2a2a2a !important; }

/* Utility pages */
html body .mvx-page{ color: #e5e5e5 !important; }
html body .mvx-page .mvx-lead{ color: #a3a3a3 !important; }
html body .mvx-form input, html body .mvx-form textarea{ background: #1a1a1a !important; color: #e5e5e5 !important; border: 1px solid #2a2a2a !important; }
html body .mvx-form button{ background: #fafafa !important; color: #0a0a0a !important; }
html body .mvx-muted{ color: #737373 !important; }

/* HOMEPAGE - "all tools" section styles */
html body .mvx-allsection{ max-width: 1280px; margin: 60px auto 0; padding: 0 24px; }
html body .mvx-allsection h2{ display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; margin: 0 0 6px; color: #fafafa !important; }
html body .mvx-allsection .sec-icon{ font-size: 26px; background: #1a1a1a; border: 1px solid #262626; border-radius: 10px; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; }
html body .mvx-allsection .sec-meta{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
html body .mvx-allsection .sec-meta a{ font-size: 13px; color: #60a5fa; text-decoration: none; font-weight: 500; }
html body .mvx-allsection .sec-meta a:hover{ color: #93c5fd; }
html body .mvx-allsection .sec-desc{ color: #a3a3a3; font-size: 15px; margin: 0 0 18px 60px; }
html body .mvx-tool-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
html body .mvx-tool-card{ display: flex; flex-direction: column; padding: 18px; background: #141414; border: 1px solid #262626; border-radius: 12px; text-decoration: none; color: #e5e5e5; transition: all .15s; min-height: 130px; }
html body .mvx-tool-card:hover{ border-color: #60a5fa; background: #1a1a1a; text-decoration: none; color: #fafafa; transform: translateY(-1px); }
html body .mvx-tool-card .icon{ font-size: 26px; line-height: 1; margin-bottom: 10px; }
html body .mvx-tool-card .name{ font-weight: 600; font-size: 15px; color: #fafafa; margin: 0 0 4px; }
html body .mvx-tool-card .desc{ font-size: 13px; color: #a3a3a3; margin: 0; line-height: 1.5; }

/* Homepage hero overrides */
html body .mvx-hp{ color: #e5e5e5 !important; }
html body .mvx-hp .mvx-hero h1{ background: linear-gradient(135deg, #fafafa 0%, #60a5fa 100%) !important; -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important; color: transparent !important; }
html body .mvx-hp .mvx-hero p.lead{ color: #a3a3a3 !important; }
html body .mvx-hp .mvx-hero-stat .num{ color: #fafafa !important; }
html body .mvx-hp .mvx-hero-stat .lbl{ color: #737373 !important; }
html body .mvx-hp .mvx-search{ background: #141414 !important; border: 1px solid #262626 !important; }
html body .mvx-hp .mvx-search input{ background: transparent !important; color: #e5e5e5 !important; }
html body .mvx-hp .mvx-search input::placeholder{ color: #525252 !important; }
html body .mvx-hp .mvx-search button{ background: #fafafa !important; color: #0a0a0a !important; }
html body .mvx-hp .mvx-section-title{ color: #fafafa !important; }
html body .mvx-hp .mvx-section-sub{ color: #a3a3a3 !important; }

/* WP buttons */
html body .wp-block-button__link,
html body input[type="submit"]:not(.mvx-btn),
html body button[type="submit"]:not(.mvx-btn){ background: #fafafa !important; color: #0a0a0a !important; padding: 12px 24px !important; border-radius: 10px !important; border: 0 !important; font-weight: 600 !important; font-size: 14px !important; cursor: pointer; transition: all .15s; }

/* Mobile */
@media (max-width: 900px){
  html body .site-header .header-inner{ padding: 12px 20px !important; flex-wrap: wrap; }
  html body .site-header .custom-logo{ max-height: 32px !important; }
  html body .site-header .site-navigation .menu{ gap: 0; flex-wrap: wrap; justify-content: center; }
  html body .site-header .site-navigation .menu-item a{ padding: 6px 10px !important; font-size: 13.5px !important; }
  html body .mvx-allsection h2{ font-size: 20px; }
}

/* Hide entry headers */
html body .entry-header{ display: none; }
