@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Allura&family=Bad+Script&family=Caveat:wght@600&family=Dancing+Script:wght@700&family=Great+Vibes&family=Homemade+Apple&family=Marck+Script&family=MonteCarlo&family=Pacifico&family=Parisienne&family=Pinyon+Script&family=Reenie+Beanie&family=Sacramento&family=Satisfy&family=Yellowtail&display=swap');

/* ==========================================================================
   Convert Pro - 3D Glassmorphism Master Stylesheet
   Rich Midnight Cosmic Theme with Dynamic Aurora Borealis & WebGL 3D
   ========================================================================== */

:root {
  color-scheme: dark;
  /* Rich Midnight & Cosmic Palette (NOT pure black!) */
  --bg-deep: #0b1026;
  --bg-deep-grad: linear-gradient(135deg, #090e24 0%, #12183d 35%, #181338 70%, #0a0f26 100%);
  --bg-surface: rgba(20, 27, 56, 0.65);
  --bg-card: #171e35;
  --bg-card-hover: #1d2644;
  --bg-nav: rgba(13, 19, 44, 0.82);
  --bg-mega: rgba(15, 22, 50, 0.94);

  /* Glass Borders */
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-hover: rgba(255, 255, 255, 0.32);
  --border-glass-accent: rgba(229, 50, 45, 0.45);

  /* Parallax Dust Particle Color (RGB string for alpha transparency) */
  --dust-particle-color: 135, 115, 235;

  /* Primary Brand Neon Red */
  --primary-red: #e5322d;
  --primary-red-glow: rgba(229, 50, 45, 0.55);
  --primary-gradient: linear-gradient(135deg, #e5322d 0%, #f43f5e 100%);

  /* Typography Colors */
  --text-white: #ffffff;
  --text-light: #f1f5f9;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-darker: #64748b;

  /* Accent Neon Glows */
  --glow-cyan: rgba(6, 182, 212, 0.4);
  --glow-purple: rgba(147, 51, 234, 0.4);
  --glow-orange: rgba(249, 115, 22, 0.4);
  --glow-green: rgba(16, 185, 129, 0.4);

  /* Badges */
  --badge-new-bg: rgba(6, 182, 212, 0.2);
  --badge-new-border: rgba(56, 189, 248, 0.55);
  --badge-new-text: #38bdf8;

  /* UI Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows & Glows */
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 12px 28px -4px rgba(0, 0, 0, 0.45), 0 0 16px rgba(99, 102, 241, 0.15);
  --shadow-modal: 0 30px 60px -12px rgba(0, 0, 0, 0.85), 0 0 45px rgba(99, 102, 241, 0.25);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --header-height: 72px;
  --max-content-width: min(96vw, 3600px);
  --transition-fast: 0.16s ease;
  --transition-normal: 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Light Mode Theme Specification (Semi-White Background Palette)
   ========================================================================== */
html[data-theme="light"],
html.light,
body.light-mode {
  color-scheme: light;
  --bg-deep: #f1f5f9;
  --bg-deep-grad: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 45%, #e8edf5 100%);
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.9);
  --bg-mega: rgba(255, 255, 255, 0.98);
  --border-glass: rgba(15, 23, 42, 0.08);
  --border-glass-hover: rgba(229, 50, 45, 0.35);
  --border-glass-accent: rgba(229, 50, 45, 0.45);
  --text-white: #0f172a;
  --text-light: #1e293b;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-darker: #94a3b8;

  /* Parallax Dust Particle Color */
  --dust-particle-color: 14, 165, 233;

  /* Primary Brand Neon Red */
  --primary-red: #e5322d;
  --primary-red-glow: rgba(229, 50, 45, 0.25);
  --primary-gradient: linear-gradient(135deg, #e5322d 0%, #f43f5e 100%);

  /* Accent Glows */
  --glow-cyan: rgba(6, 182, 212, 0.15);
  --glow-purple: rgba(147, 51, 234, 0.15);
  --glow-orange: rgba(249, 115, 22, 0.15);
  --glow-green: rgba(16, 185, 129, 0.15);

  /* Badges */
  --badge-new-bg: rgba(6, 182, 212, 0.1);
  --badge-new-border: rgba(56, 189, 248, 0.35);
  --badge-new-text: #0284c7;

  /* Shadows & Glows */
  --shadow-glass: 0 10px 30px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(15, 23, 42, 0.02);
  --shadow-card-hover: 0 16px 36px -6px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 25px 60px -12px rgba(15, 23, 42, 0.15);
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-deep-grad);
  background-attachment: fixed;
  min-height: 100vh;
}

body {
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
}

/* --------------------------------------------------------------------------
   ConvertPro UI-Matched Custom Scrollbar System (Universal & Cross-Browser)
   -------------------------------------------------------------------------- */

/* Standard Firefox & Modern CSS Scrollbars */
* {
  scrollbar-width: thin;
}

/* Dark Mode Universal Scrollbars */
html.dark,
body.dark,
[data-theme="dark"],
html:not([data-theme="light"]):not(.light) {
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

/* Light / White Mode Universal Scrollbars */
html.light,
body.light-mode,
[data-theme="light"] {
  scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}

/* WebKit-based Browsers (Chrome, Edge, Safari, Opera, Brave) */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  border: 1.5px solid transparent;
  background-clip: padding-box;
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gradient);
  box-shadow: 0 0 10px rgba(229, 50, 45, 0.5);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* White / Light Mode WebKit Scrollbar Overrides */
[data-theme="light"] ::-webkit-scrollbar-track,
body.light-mode ::-webkit-scrollbar-track {
  background: transparent;
}

[data-theme="light"] ::-webkit-scrollbar-thumb,
body.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 9999px;
  border: 1.5px solid transparent;
  background-clip: padding-box;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover,
body.light-mode ::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gradient);
  box-shadow: 0 0 10px rgba(229, 50, 45, 0.35);
}

/* --------------------------------------------------------------------------
   Liquid Animated Gradient Background & Ambient Glow System
   -------------------------------------------------------------------------- */
.animated-gradient-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(-45deg,
      #070a1e 0%,
      #170d3a 22%,
      #081d33 45%,
      #220b30 70%,
      #09142e 88%,
      #120a2e 100%);
  background-size: 360% 360%;
  animation: gradient-drift-bg 22s ease-in-out infinite;
  will-change: background-position;
}

/* ==========================================================================
   Light Mode Semi-White Background System
   ========================================================================== */
[data-theme="light"] body,
body.light-mode {
  background-color: #f1f5f9;
  color: #334155;
}

[data-theme="light"] .animated-gradient-bg,
body.light-mode .animated-gradient-bg {
  background: linear-gradient(-45deg,
      #f8fafc 0%,
      #f1f5f9 22%,
      #e8edf5 45%,
      #f3f6fb 70%,
      #eaf0f8 88%,
      #f1f5f9 100%);
  background-size: 300% 300%;
  animation: gradient-drift-bg 26s ease-in-out infinite;
}

.gradient-glow-sphere {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(52px);
  will-change: transform;
}

[data-theme="light"] .gradient-glow-sphere,
body.light-mode .gradient-glow-sphere {
  opacity: 0.1;
  filter: blur(120px);
}

.glow-1 {
  top: 0;
  left: 0;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(99, 102, 241, 0.22) 35%, rgba(59, 130, 246, 0.08) 60%, transparent 80%);
  animation: float-across-screen 45s ease-in-out infinite;
  contain: strict;
  will-change: transform;
}

.glow-2,
.glow-3,
.glow-4 {
  display: none;
}

@keyframes float-across-screen {
  0% {
    transform: translate3d(4vw, 8vh, 0) scale(1);
  }

  16% {
    transform: translate3d(45vw, 4vh, 0) scale(1.08);
  }

  33% {
    transform: translate3d(76vw, 16vh, 0) scale(0.94);
  }

  50% {
    transform: translate3d(72vw, 62vh, 0) scale(1.06);
  }

  66% {
    transform: translate3d(36vw, 74vh, 0) scale(0.92);
  }

  83% {
    transform: translate3d(6vw, 52vh, 0) scale(1.04);
  }

  100% {
    transform: translate3d(4vw, 8vh, 0) scale(1);
  }
}

/* Interactive Cursor Ambient Glow Spotlight (High Performance GPU-accelerated) */
.cursor-glow-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  height: 500px;
  margin-top: -250px;
  margin-left: -250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.16) 0%, rgba(99, 102, 241, 0.06) 35%, transparent 70%);
  pointer-events: none;
  transform: translate3d(-500px, -500px, 0);
  transition: opacity 0.3s ease;
  will-change: transform;
  contain: strict;
}

[data-theme="light"] .cursor-glow-spotlight,
body.light-mode .cursor-glow-spotlight {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.04) 35%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Main Content Layout
   -------------------------------------------------------------------------- */
main {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Sticky Glass Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background-color: rgba(9, 14, 34, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.nav-container {
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo 3D Overhaul */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.8px;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  text-decoration: none;
  perspective: 800px;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #ff4d46 0%, #e5322d 50%, #b81c18 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow:
    0 4px 0 #8b100d,
    0 8px 18px rgba(229, 50, 45, 0.55),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.45),
    inset 0 -2px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  transform-style: preserve-3d;
  flex-shrink: 0;
}

.logo-icon-wrap svg {
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-icon-wrap {
  transform: rotateY(180deg) scale(1.08);
  box-shadow:
    0 5px 0 #8b100d,
    0 12px 28px rgba(229, 50, 45, 0.75),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
}

.logo-text {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.8px;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: text-shadow 0.3s ease;
}

.logo:hover .logo-text {
  text-shadow: 0 4px 16px rgba(229, 50, 45, 0.35), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* "Convert" in WHITE color in Dark Mode, and bold BLACK in Light Mode */
.logo-word-convert {
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.8px;
  transition: color var(--transition-fast);
}

/* "Pro" with vibrant Cyan-to-Purple Gradient exactly matching the image */
.logo-word-pro {
  font-weight: 900;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #00d2ff 0%, #2563eb 45%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-left: 1px;
}

/* In Light Theme: Make "Convert" bold deep black for crisp contrast on semi-white navbar */
[data-theme="light"] .logo-word-convert,
body.light-mode .logo-word-convert {
  color: #0f172a !important;
}

/* In Dark Theme: Make "Convert" pure white */
.logo-word-convert,
html.dark .logo-word-convert,
body.dark .logo-word-convert,
[data-theme="dark"] .logo-word-convert {
  color: #ffffff !important;
}

/* ==========================================================================
   File To File Pro - Scoped Brand Logo & Continuous RAF Spline Engine
   ========================================================================== */
.ftfp-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  background: transparent !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ftfp-logo-svg {
  height: 50px;
  width: auto;
  display: block;
  overflow: visible;
  will-change: transform;
}

@media (max-width: 820px) {
  .ftfp-logo-svg {
    height: 38px;
  }
}

.footer-brand-logo .ftfp-logo-svg {
  height: 38px !important;
}

.realtime-logo .ftfp-logo-svg {
  height: 32px;
}

.legal-header .ftfp-logo-svg {
  height: 44px;
}

.ftfp-brand-text {
  font-family: 'M PLUS Rounded 1c', 'Arial Rounded MT Bold', sans-serif !important;
  fill: #ffffff;
}

.ftfp-pro-text {
  font-family: 'M PLUS Rounded 1c', 'Arial Rounded MT Bold', sans-serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  fill: #ffffff;
}

.f2f-carrier-bg {
  fill: #0b1026;
}

[data-theme="light"] .ftfp-brand-text,
html.light .ftfp-brand-text,
body.light-mode .ftfp-brand-text,
body.light .ftfp-brand-text,
[data-theme="light"] .ftfp-pro-text,
html.light .ftfp-pro-text,
body.light-mode .ftfp-pro-text,
body.light .ftfp-pro-text {
  fill: #0f172a !important;
}

[data-theme="light"] .f2f-carrier-bg,
html.light .f2f-carrier-bg,
body.light-mode .f2f-carrier-bg,
body.light .f2f-carrier-bg {
  fill: #ffffff !important;
}

[data-theme="dark"] .ftfp-brand-text,
html.dark .ftfp-brand-text,
body.dark .ftfp-brand-text,
[data-theme="dark"] .ftfp-pro-text,
html.dark .ftfp-pro-text,
body.dark .ftfp-pro-text {
  fill: #ffffff !important;
}

[data-theme="dark"] .f2f-carrier-bg,
html.dark .f2f-carrier-bg,
body.dark .f2f-carrier-bg {
  fill: #0b1026 !important;
}

/* Ambient Halo behind opposing arrows: Black fade in Light Mode, White fade in Dark Mode */
.f2f-halo-stop-0 {
  stop-color: #000000;
  stop-opacity: 0.45;
  transition: stop-color 0.25s ease, stop-opacity 0.25s ease;
}
.f2f-halo-stop-35 {
  stop-color: #000000;
  stop-opacity: 0.25;
  transition: stop-color 0.25s ease, stop-opacity 0.25s ease;
}
.f2f-halo-stop-70 {
  stop-color: #000000;
  stop-opacity: 0.08;
  transition: stop-color 0.25s ease, stop-opacity 0.25s ease;
}
.f2f-halo-stop-100 {
  stop-color: #000000;
  stop-opacity: 0;
  transition: stop-color 0.25s ease;
}

[data-theme="light"] .f2f-halo-stop-0,
html.light .f2f-halo-stop-0,
body.light-mode .f2f-halo-stop-0,
body.light .f2f-halo-stop-0 {
  stop-color: #000000 !important;
  stop-opacity: 0.45 !important;
}
[data-theme="light"] .f2f-halo-stop-35,
html.light .f2f-halo-stop-35,
body.light-mode .f2f-halo-stop-35,
body.light .f2f-halo-stop-35 {
  stop-color: #000000 !important;
  stop-opacity: 0.25 !important;
}
[data-theme="light"] .f2f-halo-stop-70,
html.light .f2f-halo-stop-70,
body.light-mode .f2f-halo-stop-70,
body.light .f2f-halo-stop-70 {
  stop-color: #000000 !important;
  stop-opacity: 0.08 !important;
}
[data-theme="light"] .f2f-halo-stop-100,
html.light .f2f-halo-stop-100,
body.light-mode .f2f-halo-stop-100,
body.light .f2f-halo-stop-100 {
  stop-color: #000000 !important;
  stop-opacity: 0 !important;
}

[data-theme="dark"] .f2f-halo-stop-0,
html.dark .f2f-halo-stop-0,
body.dark-mode .f2f-halo-stop-0,
body.dark .f2f-halo-stop-0 {
  stop-color: #ffffff !important;
  stop-opacity: 0.65 !important;
}
[data-theme="dark"] .f2f-halo-stop-35,
html.dark .f2f-halo-stop-35,
body.dark-mode .f2f-halo-stop-35,
body.dark .f2f-halo-stop-35 {
  stop-color: #ffffff !important;
  stop-opacity: 0.38 !important;
}
[data-theme="dark"] .f2f-halo-stop-70,
html.dark .f2f-halo-stop-70,
body.dark-mode .f2f-halo-stop-70,
body.dark .f2f-halo-stop-70 {
  stop-color: #ffffff !important;
  stop-opacity: 0.14 !important;
}
[data-theme="dark"] .f2f-halo-stop-100,
html.dark .f2f-halo-stop-100,
body.dark-mode .f2f-halo-stop-100,
body.dark .f2f-halo-stop-100 {
  stop-color: #ffffff !important;
  stop-opacity: 0 !important;
}

/* Hardware-Accelerated Carriers for Zero-Delay Continuous Spline RAF Engine */
.f2f-carrier {
  will-change: transform;
  transform-origin: 135px 52px;
  pointer-events: none;
}

.f2f-carrier path,
.f2f-carrier text,
.f2f-sheen-sweep-bar,
.f2f-glow-num2,
.f2f-opposing-arrows,
.f2f-opposing-arrows path,
.f2f-opposing-arrows circle,
.f2f-halo-circle,
.f2f-file-left,
.f2f-file-right,
.f2f-clip-file-left,
.f2f-clip-file-right {
  transition: none !important;
}

.f2f-shadow-filter {
  filter: drop-shadow(-3px 8px 10px rgba(5, 11, 20, 0.35));
}

[data-theme="dark"] .f2f-shadow-filter,
html.dark .f2f-shadow-filter,
body.dark .f2f-shadow-filter {
  filter: drop-shadow(-3px 8px 14px rgba(0, 0, 0, 0.65));
}

@media (prefers-reduced-motion: reduce) {
  .f2f-carrier {
    will-change: auto;
  }
}

@keyframes pulse-gentle {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.14);
  }
}

/* Nav Center Links - Fluid scaling ensuring links are always visible on all desktop and tablet viewports */
.nav-center {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.9vw, 18px);
}

.nav-link {
  font-size: clamp(11px, 0.82vw, 13.5px);
  font-weight: 700;
  text-transform: uppercase;
  color: #e2e8f0;
  letter-spacing: 0.2px;
  padding: 7px clamp(5px, 0.65vw, 11px);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.09);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.nav-link.active {
  color: #ff4d4d;
  background-color: rgba(229, 50, 45, 0.15);
  text-shadow: 0 0 16px var(--primary-red-glow);
}

.nav-link .dropdown-arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.nav-link:hover .dropdown-arrow,
.nav-link.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Nav Right Actions */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(8px, 1vw, 16px);
  flex-shrink: 0;
}

/* Theme Toggle Button (Dark / Light Mode) - Enhanced with distinct gradient border in Dark Mode */
.btn-theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#0c122e, #0c122e) padding-box,
    linear-gradient(135deg, #e5322d 0%, #f43f5e 35%, #a855f7 70%, #06b6d4 100%) border-box !important;
  border: 2.5px solid transparent !important;
  color: var(--text-white);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: 0 0 16px rgba(229, 50, 45, 0.45), 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.btn-theme-toggle:hover {
  transform: translateY(-2px) scale(1.08);
  background: linear-gradient(#151b3d, #151b3d) padding-box,
    linear-gradient(135deg, #ff3b36 0%, #fb7185 35%, #c084fc 70%, #22d3ee 100%) border-box !important;
  border: 2.5px solid transparent !important;
  box-shadow: 0 0 25px rgba(229, 50, 45, 0.75), 0 0 35px rgba(168, 85, 247, 0.5) !important;
}

.theme-toggle-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* In Dark Mode: Moon is visible (Pure White), Sun is hidden */
.icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #ffffff !important;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
  pointer-events: auto;
}

.icon-moon svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

.icon-moon svg path {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

.icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.3);
  pointer-events: none;
}

/* In Light Mode: Sun is visible (Radiant Golden Amber with glowing aura, NOT full black!), Moon is hidden */
[data-theme="light"] .icon-sun,
body.light-mode .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #f59e0b !important;
  pointer-events: auto;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.55));
}

[data-theme="light"] .icon-sun svg,
body.light-mode .icon-sun svg {
  stroke: #ea580c !important;
  color: #f59e0b !important;
}

[data-theme="light"] .icon-sun svg circle,
body.light-mode .icon-sun svg circle {
  fill: #f59e0b !important;
  stroke: #ea580c !important;
}

[data-theme="light"] .icon-sun svg line,
body.light-mode .icon-sun svg line {
  stroke: #ea580c !important;
  stroke-width: 2.3 !important;
}

[data-theme="light"] .icon-moon,
body.light-mode .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.3);
  pointer-events: none;
}

.btn-apps-grid {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #cbd5e1;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-fast);
}

.btn-apps-grid:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.15);
}

/* Workflow Automation Run Button - Vibrant Neon Red Style */
.btn-workflow-run {
  background: var(--primary-gradient);
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px clamp(14px, 1.2vw, 22px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px var(--primary-red-glow);
  transition: all var(--transition-fast);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.btn-workflow-run:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(229, 50, 45, 0.7), 0 0 35px rgba(244, 63, 94, 0.45);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff !important;
}

.btn-workflow-run:active {
  transform: translateY(0);
}

/* Mobile Toggle */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: #f1f5f9;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
}

/* --------------------------------------------------------------------------
   Mega Menu Overlay & Floating Card Dropdown
   -------------------------------------------------------------------------- */
.mega-menu-wrapper {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  width: min(1140px, calc(100vw - 36px));
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  background-color: rgba(14, 20, 46, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 70px -10px rgba(0, 0, 0, 0.85), 0 0 35px rgba(229, 50, 45, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease,
    transform 0.1s ease,
    visibility 0.1s;
}

/* Invisible bridge preventing hover drop when cursor moves from navbar to card */
.mega-menu-wrapper::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

.mega-menu-wrapper::-webkit-scrollbar {
  width: 5px;
}

.mega-menu-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.mega-menu-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.mega-menu-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(229, 50, 45, 0.45);
}

.mega-menu-wrapper.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Mode Convert: Compact tailored card for the 3 Convert columns */
.mega-menu-wrapper.mode-convert {
  width: min(760px, calc(100vw - 32px));
}

.mega-menu-wrapper.mode-convert .mega-menu-container {
  padding: 24px 24px 26px;
}

.mega-menu-wrapper.mode-convert .mega-menu-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .mega-menu-wrapper.mode-convert .mega-menu-grid {
    grid-template-columns: 1fr;
  }
}

.mega-menu-backdrop {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: rgba(9, 14, 34, 0.55);
  backdrop-filter: blur(5px);
  z-index: 980;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease, visibility 0.1s;
}

.mega-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mega-menu-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 26px 30px 28px;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px 14px;
}

.mega-col {
  display: flex;
  flex-direction: column;
}

.mega-col-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mega-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.08s ease, border-color 0.08s ease, color 0.08s ease, transform 0.08s ease;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid transparent;
}

.mega-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
  text-shadow: none;
}

.mega-item.highlight {
  color: #ff5252;
  font-weight: 700;
}

.mega-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: none !important;
  box-shadow: none !important;
}

.mega-item-icon svg {
  width: 17px;
  height: 17px;
}

/* --------------------------------------------------------------------------
   App Switcher Launcher (9-Dots Dropdown)
   -------------------------------------------------------------------------- */
.apps-dropdown {
  position: absolute;
  top: calc(var(--header-height) + 10px);
  right: 28px;
  width: 330px;
  background: var(--bg-mega);
  backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-glass-hover);
  padding: 20px;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.22s ease;
}

.apps-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.apps-dropdown-title {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 14px;
  letter-spacing: 0.6px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-fast);
  color: #cbd5e1;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
}

.app-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.app-name {
  font-size: 12px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Hero Section with Shimmering Gradient Typography & 3D Artwork
   -------------------------------------------------------------------------- */
.hero-section {
  padding: clamp(16px, 2.5vh, 32px) 24px clamp(12px, 1.8vh, 22px);
  text-align: center;
  position: relative;
  background: transparent;
}

/* Flanking 3D Artworks - Refined, Professional Floating Motion with Balanced Non-Colliding Layout */
.hero-art {
  position: absolute;
  top: 22px;
  pointer-events: none;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  z-index: 1;
  opacity: 0.92;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-art-left {
  left: max(10px, calc(50% - 480px - 180px));
  animation: heroFloatLeft 6.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.hero-art-right {
  right: max(10px, calc(50% - 480px - 195px));
  animation: heroFloatRight 7.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.hero-art-left .hero-ill-img {
  width: 160px;
  /* Refined, compact size that never collides with text */
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(225, 29, 72, 0.15)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.06));
}

.hero-art-right .hero-ill-img {
  width: 175px;
  /* Balanced right-side tools size */
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(59, 130, 246, 0.15)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.06));
}

@keyframes heroFloatLeft {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes heroFloatRight {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

@media (max-width: 1300px) {
  .hero-title {
    font-size: 42px;
    max-width: 860px;
    letter-spacing: -0.5px;
  }

  .hero-art-left .hero-ill-img {
    width: 135px;
  }

  .hero-art-right .hero-ill-img {
    width: 150px;
  }

  .hero-art-left {
    left: 0;
  }

  .hero-art-right {
    right: 0;
  }
}

@media (max-width: 1100px) {
  .hero-title {
    font-size: 36px;
    max-width: 740px;
    letter-spacing: -0.4px;
  }

  .hero-art-left .hero-ill-img {
    width: 115px;
  }

  .hero-art-right .hero-ill-img {
    width: 125px;
  }

  .hero-art {
    opacity: 0.65;
  }
}

@media (max-width: 960px) {
  .hero-art {
    display: none;
  }
}

.hero-container {
  max-width: min(96vw, 2600px);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 44px);
  position: relative;
  z-index: 3;
}

.hero-title {
  position: relative;
  z-index: 2;
  /* Cleanly framed by background art with zero collision */
  font-size: clamp(32px, 3.2vw, 47px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: clamp(10px, 1.4vh, 18px);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero-highlight-word {
  color: #e5322d;
  -webkit-text-fill-color: #e5322d;
  font-weight: 900;
  display: inline-block;
  margin-right: 8px;
  letter-spacing: -0.5px;
}

[data-theme="dark"] .hero-highlight-word,
html.dark .hero-highlight-word {
  text-shadow: 0 0 28px rgba(229, 50, 45, 0.45);
}

.hero-underlined-wrap {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.hero-swoosh {
  position: absolute;
  bottom: -6px;
  left: -2px;
  width: calc(100% + 4px);
  height: 12px;
  pointer-events: none;
}

.hero-subtitle {
  position: relative;
  z-index: 2;
  font-size: clamp(15px, 1.3vw, 19px);
  color: #cbd5e1;
  line-height: 1.5;
  max-width: 820px;
  margin: 0 auto clamp(14px, 1.8vh, 22px);
  font-weight: 450;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Category Filter Pills (Glassmorphic) */
.filter-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 0.6vw, 10px);
  max-width: min(98vw, 1680px);
  margin: 0 auto clamp(12px, 1.6vh, 20px);
  padding: 4px;
  flex-wrap: wrap;
}

.filter-pill {
  font-size: clamp(12.5px, 0.9vw, 15px);
  font-weight: 700;
  padding: clamp(7px, 0.7vw, 10px) clamp(11px, 1.1vw, 20px);
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e2e8f0;
  border: 1px solid var(--border-glass);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.filter-pill .pill-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.filter-pill:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.filter-pill:active {
  transform: translateY(0) scale(0.98);
}

.filter-pill.active {
  background: var(--primary-gradient);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  box-shadow: 0 0 24px var(--primary-red-glow), 0 4px 16px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Widescreen Displays (>= 1420px): All filter pills sit comfortably in ONE row */
@media (min-width: 1420px) {
  .filter-container {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
  }
}

/* Laptops & High-DPI Displays (961px - 1419px): Calibrated fluid pills with ZERO clipping */
@media (max-width: 1419px) and (min-width: 961px) {
  .filter-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    max-width: 1260px;
    margin: 0 auto 16px;
  }

  .filter-pill {
    padding: 7px 13px;
    font-size: 13px;
    gap: 6px;
  }

  .filter-pill .pill-icon {
    width: 14px;
    height: 14px;
  }
}

/* Tablet & Medium screens (601px - 960px): Exactly 2 balanced rows of 4 matching columns */
@media (max-width: 960px) and (min-width: 601px) {
  .filter-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 760px;
    margin: 0 auto 20px;
  }

  .filter-pill {
    width: 100%;
    text-align: center;
    padding: 9px 11px;
    font-size: 12.5px;
  }
}

/* Mobile screens (<= 600px): Exactly 2 lines (4 columns x 2 rows) */
@media (max-width: 600px) {
  .hero-section {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .hero-container {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .filter-container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px 3.5px !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 2px !important;
    margin: 0 auto 16px !important;
    box-sizing: border-box !important;
  }

  .filter-pill,
  .filter-container .filter-pill,
  [data-theme="light"] .filter-pill,
  [data-theme="light"] .filter-container .filter-pill,
  body.light-mode .filter-pill,
  body.light-mode .filter-container .filter-pill,
  [data-theme="light"] .filter-pill.active,
  [data-theme="light"] .filter-container .filter-pill.active {
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 5px 2px !important;
    gap: 2.5px !important;
    width: 100% !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    letter-spacing: -0.28px !important;
    border-radius: 9999px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .filter-pill .pill-icon,
  .filter-container .filter-pill .pill-icon {
    width: 9.5px !important;
    height: 9.5px !important;
    min-width: 9.5px !important;
    flex-shrink: 0 !important;
  }

  .filter-pill span,
  .filter-container .filter-pill span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    max-width: 100% !important;
  }
}

@media (max-width: 340px) {
  .filter-container {
    gap: 4px 2px !important;
  }

  .filter-pill,
  .filter-container .filter-pill,
  [data-theme="light"] .filter-pill,
  [data-theme="light"] .filter-container .filter-pill,
  body.light-mode .filter-pill,
  body.light-mode .filter-container .filter-pill,
  [data-theme="light"] .filter-pill.active,
  [data-theme="light"] .filter-container .filter-pill.active {
    font-size: 8px !important;
    letter-spacing: -0.32px !important;
    padding: 4px 1px !important;
    gap: 2px !important;
  }

  .filter-pill .pill-icon,
  .filter-container .filter-pill .pill-icon {
    width: 8.5px !important;
    height: 8.5px !important;
    min-width: 8.5px !important;
  }
}

/* Search Bar (Glassmorphic) */
.search-bar-wrap {
  max-width: 620px;
  margin: clamp(12px, 1.5vh, 20px) auto 0;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

/* Shake animation when search submitted while empty */
@keyframes searchShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

.search-bar-wrap.search-empty-shake {
  animation: searchShake 0.45s ease-in-out;
}

.search-bar-wrap.search-empty-shake .search-input {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4), 0 4px 20px rgba(239, 68, 68, 0.3) !important;
}

/* Search empty warning pill badge */
.search-empty-warning {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px auto 0;
  max-width: 480px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: searchWarningPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}

@keyframes searchWarningPop {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-empty-warning.is-visible {
  display: inline-flex;
}

[data-theme="light"] .search-empty-warning,
body.light-mode .search-empty-warning {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fca5a5;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}

.search-input {
  width: 100%;
  padding: 15px 64px 15px 54px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  font-size: 16.5px;
  font-family: inherit;
  color: #ffffff;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.search-input::placeholder {
  color: #94a3b8;
  font-size: 15.5px;
}

.search-input:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(229, 50, 45, 0.65);
  box-shadow: 0 0 28px rgba(229, 50, 45, 0.4);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: #f43f5e;
  pointer-events: none;
  z-index: 5;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.search-bar-wrap:focus-within .search-icon {
  color: var(--primary-red);
  transform: translateY(-50%) scale(1.05);
}

.search-clear-btn {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #94a3b8;
  cursor: pointer;
  display: none;
  z-index: 5;
}

.search-clear-btn:hover {
  color: #ffffff;
}

/* Circular Arrow Submit Button */
.search-action-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e 0%, #e5322d 100%);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(229, 50, 45, 0.45);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  z-index: 6;
}

.search-action-btn:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 5px 18px rgba(229, 50, 45, 0.7);
}

.search-action-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Hero Trust Strip (matching media_1792668314256.png) */
.hero-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 36px);
  margin-top: clamp(12px, 1.6vh, 22px);
  padding: 6px 16px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.trust-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.16);
  color: #f43f5e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.trust-icon-circle svg {
  width: 18px;
  height: 18px;
}

.trust-text {
  display: flex;
  flex-direction: column;
}

.trust-title {
  font-size: 16px;
  font-weight: 750;
  color: #f8fafc;
  line-height: 1.3;
}

.trust-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.35;
}

.trust-divider {
  width: 1px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.14);
}

/* Mobile Trust Strip: 2 Balanced Rows on Mobile so NO words are hidden or cut off */
@media (max-width: 768px) {
  .hero-trust-strip {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 12px !important;
    padding: 8px 6px !important;
    margin: 10px auto 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .trust-divider {
    display: none !important;
  }

  .trust-item {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
  }

  .trust-icon-circle {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    flex-shrink: 0 !important;
  }

  .trust-icon-circle svg {
    width: 13px !important;
    height: 13px !important;
  }

  .trust-text {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  .trust-title,
  [data-theme="light"] .trust-title,
  body.light-mode .trust-title {
    font-size: 11.5px !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
  }

  .trust-desc,
  [data-theme="light"] .trust-desc,
  body.light-mode .trust-desc {
    font-size: 9.5px !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
  }
}

/* Showcase Section - Matching Picture 2 Reference */
.features-grid-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.showcase-card-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  background: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.showcase-card-wrapper:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.25);
}

.showcase-card-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  pointer-events: none;
}

.showcase-card-hotspot {
  position: absolute;
  left: 6%;
  bottom: 6.5%;
  width: 44%;
  height: 15.5%;
  border-radius: 9999px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 5;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.showcase-card-hotspot:hover {
  background-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

.showcase-card-hotspot:active {
  transform: scale(0.96);
}

/* Screen reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .features-grid-showcase {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 30px auto 0;
  }
}

/* --------------------------------------------------------------------------
   Tools Grid Section (Glassmorphism & 3D Tilt)
   -------------------------------------------------------------------------- */
.tools-section {
  max-width: clamp(1440px, 92vw, 1740px);
  width: 100%;
  margin: 0 auto;
  padding: 10px clamp(24px, 3vw, 56px) 40px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Prominent Featured Action Buttons (PDF Edit & Unicode To InPage)
   -------------------------------------------------------------------------- */
.f2f-featured-actions-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.5vw, 32px);
  margin: 6px auto 34px auto;
  padding: 0 16px;
  position: relative;
  z-index: 5;
}

.f2f-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-width: 320px;
  width: clamp(310px, 24vw, 360px);
  padding: 11px 26px 11px 18px;
  border-radius: 19px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  box-sizing: border-box;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.22s ease;
  will-change: transform, box-shadow;
}

/* Button 1: PDF Edit (Vibrant Red-Coral Gradient) */
.f2f-action-btn-red {
  background: linear-gradient(135deg, #f03d3e 0%, #ff6b3d 100%);
  box-shadow: 0 10px 24px -4px rgba(240, 61, 62, 0.40), 0 4px 10px -2px rgba(255, 107, 61, 0.25);
}

.f2f-action-btn-red:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -4px rgba(240, 61, 62, 0.55), 0 6px 16px -2px rgba(255, 107, 61, 0.35);
  filter: brightness(1.05);
}

/* Button 2: Unicode To InPage (Vibrant Royal Blue to Violet Gradient) */
.f2f-action-btn-blue {
  background: linear-gradient(135deg, #325cf6 0%, #6f34e8 100%);
  box-shadow: 0 10px 24px -4px rgba(50, 92, 246, 0.40), 0 4px 10px -2px rgba(111, 52, 232, 0.25);
}

.f2f-action-btn-blue:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -4px rgba(50, 92, 246, 0.55), 0 6px 16px -2px rgba(111, 52, 232, 0.35);
  filter: brightness(1.05);
}

/* Tactile Click / Press feedback */
.f2f-action-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Frosted Glass Squircle Icon Container (Clean, steady) */
.f2f-action-icon-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  flex-shrink: 0;
}

.f2f-action-icon-box svg {
  display: block;
}

/* Text Content Area */
.f2f-action-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  min-width: 0;
}

.f2f-action-title {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.f2f-action-subtitle {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.90);
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
}

/* Crisp Floating "NEW" Badge (Steady, locked to button) */
.f2f-action-badge {
  position: absolute;
  top: -9px;
  right: 22px;
  background: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.f2f-action-badge-red {
  color: #ef4444;
}

.f2f-action-badge-blue {
  color: #4f46e5;
}

/* --------------------------------------------------------------------------
   Dark Mode Harmonization: Deep Midnight Glass + Glowing Gradient Borders
   -------------------------------------------------------------------------- */
[data-theme="dark"] .f2f-action-btn-red,
html.dark .f2f-action-btn-red,
body.dark .f2f-action-btn-red,
body.dark-mode .f2f-action-btn-red {
  border: 1.8px solid transparent;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.28) 0%, rgba(249, 115, 22, 0.16) 100%) padding-box,
    linear-gradient(165deg, #182247 0%, #0f1733 100%) padding-box,
    linear-gradient(135deg, #ef4444 0%, #f97316 100%) border-box;
  background-clip: padding-box, padding-box, border-box;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .f2f-action-btn-red:hover,
html.dark .f2f-action-btn-red:hover,
body.dark .f2f-action-btn-red:hover,
body.dark-mode .f2f-action-btn-red:hover {
  transform: translateY(-4px);
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.38) 0%, rgba(249, 115, 22, 0.24) 100%) padding-box,
    linear-gradient(165deg, #1b254b 0%, #111a38 100%) padding-box,
    linear-gradient(135deg, #f87171 0%, #fb923c 100%) border-box;
  background-clip: padding-box, padding-box, border-box;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.7), 0 0 32px rgba(239, 68, 68, 0.5);
  filter: brightness(1.08);
}

[data-theme="dark"] .f2f-action-btn-blue,
html.dark .f2f-action-btn-blue,
body.dark .f2f-action-btn-blue,
body.dark-mode .f2f-action-btn-blue {
  border: 1.8px solid transparent;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.28) 0%, rgba(139, 92, 246, 0.16) 100%) padding-box,
    linear-gradient(165deg, #182247 0%, #0f1733 100%) padding-box,
    linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) border-box;
  background-clip: padding-box, padding-box, border-box;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(99, 102, 241, 0.35);
}

[data-theme="dark"] .f2f-action-btn-blue:hover,
html.dark .f2f-action-btn-blue:hover,
body.dark .f2f-action-btn-blue:hover,
body.dark-mode .f2f-action-btn-blue:hover {
  transform: translateY(-4px);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.38) 0%, rgba(139, 92, 246, 0.24) 100%) padding-box,
    linear-gradient(165deg, #1b254b 0%, #111a38 100%) padding-box,
    linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%) border-box;
  background-clip: padding-box, padding-box, border-box;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.7), 0 0 32px rgba(99, 102, 241, 0.5);
  filter: brightness(1.08);
}

/* Dark Mode Icon Squircle */
[data-theme="dark"] .f2f-action-btn-red .f2f-action-icon-box,
html.dark .f2f-action-btn-red .f2f-action-icon-box,
body.dark .f2f-action-btn-red .f2f-action-icon-box,
body.dark-mode .f2f-action-btn-red .f2f-action-icon-box {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.42);
  color: #fca5a5;
}

[data-theme="dark"] .f2f-action-btn-blue .f2f-action-icon-box,
html.dark .f2f-action-btn-blue .f2f-action-icon-box,
body.dark .f2f-action-btn-blue .f2f-action-icon-box,
body.dark-mode .f2f-action-btn-blue .f2f-action-icon-box {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.42);
  color: #93c5fd;
}

/* Dark Mode Badges */
[data-theme="dark"] .f2f-action-badge-red,
html.dark .f2f-action-badge-red,
body.dark .f2f-action-badge-red,
body.dark-mode .f2f-action-badge-red {
  background: #141b34;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .f2f-action-badge-blue,
html.dark .f2f-action-badge-blue,
body.dark .f2f-action-badge-blue,
body.dark-mode .f2f-action-badge-blue {
  background: #141b34;
  color: #c4b5fd;
  border: 1px solid rgba(99, 102, 241, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Dark Mode Subtitle */
[data-theme="dark"] .f2f-action-subtitle,
html.dark .f2f-action-subtitle,
body.dark .f2f-action-subtitle,
body.dark-mode .f2f-action-subtitle {
  color: #94a3b8;
}

/* Responsive: mobile 2-column layout */
@media (max-width: 680px) {
  .f2f-featured-actions-banner {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin: 4px auto 18px auto !important;
    padding: 0 10px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .f2f-action-btn {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 8px 10px 10px !important;
    gap: 8px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }
  .f2f-action-badge {
    font-size: 8px !important;
    padding: 1.5px 5px !important;
    top: -6px !important;
    right: 8px !important;
  }
  .f2f-action-icon-box {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    border-radius: 9px !important;
    flex-shrink: 0 !important;
  }
  .f2f-action-icon-box svg {
    width: 17px !important;
    height: 17px !important;
  }
  .f2f-action-content {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .f2f-action-title {
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  .f2f-action-subtitle {
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: auto;
  gap: clamp(16px, 1.3vw, 22px);
  align-items: start;
}

/* Glass Tool Card - Dark Theme (Deep Midnight Navy - Balanced Contrast) */
.tool-card {
  aspect-ratio: 1 / 1 !important;
  border: 1.8px solid transparent;
  background:
    linear-gradient(165deg, #1b254b 0%, #111a38 100%) padding-box,
    linear-gradient(135deg, var(--tool-accent, #e5322d) 0%, #f43f5e 35%, #a855f7 70%, #38bdf8 100%) border-box;
  background-clip: padding-box, border-box;
  border-radius: 20px;
  padding: clamp(16px, 1.25vw, 22px);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 24px var(--tool-accent-glow, rgba(229, 50, 45, 0.25));
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
  box-sizing: border-box;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-6px) translateZ(0);
  border-color: transparent;
  background:
    linear-gradient(165deg, #243163 0%, #18234d 100%) padding-box,
    linear-gradient(135deg, var(--tool-accent, #e5322d) 0%, #e11d48 30%, #9333ea 68%, #06b6d4 100%) border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 22px 52px -6px rgba(0, 0, 0, 0.75),
    0 0 38px var(--tool-accent-glow, rgba(229, 50, 45, 0.5));
  z-index: 10;
}

.card-specular-glare {
  display: none !important;
}

/* Card Header (Icon & Badge) */
.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin-bottom: 10px;
}

.tool-icon-wrapper {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 44px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  border-radius: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none !important;
  filter: none !important;
}

.tool-card:hover .tool-icon-wrapper {
  transform: translateY(-3px) scale(1.12);
  box-shadow: none !important;
  filter: none !important;
}

.tool-icon-wrapper svg {
  width: 23px !important;
  height: 23px !important;
  min-width: 23px !important;
  min-height: 23px !important;
  max-width: 23px !important;
  max-height: 23px !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 23px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card:hover .tool-icon-wrapper svg {
  transform: scale(1.1);
}

/* Card Content */
.tool-title {
  font-size: clamp(15.5px, 1.05vw, 17px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 5px;
  letter-spacing: -0.25px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  transition: color 0.25s ease;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* "New!" Badge with Cyan Glass Glow & Pulsing Animation */
.tool-badge-new {
  font-size: 12px;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--badge-new-bg);
  border: 1px solid var(--badge-new-border);
  color: var(--badge-new-text);
  line-height: 1.2;
  letter-spacing: 0.2px;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.45);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
  animation: badge-pulse 2.2s infinite ease-in-out;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

@keyframes badge-pulse {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
  }

  50% {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.7);
    transform: scale(1.05);
  }
}

.tool-description {
  font-size: clamp(12.5px, 0.8vw, 13.5px);
  color: #cbd5e1;
  line-height: 1.42;
  font-weight: 400;
  margin-top: 4px;
  text-shadow: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Workflow Promotional Card (Permanently Removed per user request) */
.workflow-promo-card {
  display: none !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
  background: linear-gradient(135deg, rgba(229, 50, 45, 0.16) 0%, rgba(124, 58, 237, 0.18) 50%, rgba(22, 30, 62, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(229, 50, 45, 0.35);
  border-radius: 18px;
  padding: clamp(13px, 1vw, 16px);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 24px rgba(229, 50, 45, 0.15);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.25s ease, background 0.25s ease;
}

.workflow-promo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(229, 50, 45, 0.9), rgba(168, 85, 247, 0.9), transparent);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.workflow-promo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 50, 45, 0.65);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 35px rgba(229, 50, 45, 0.3);
}

.workflow-promo-card:hover::before {
  opacity: 1;
}

.workflow-promo-bg-lines {
  position: absolute;
  top: 0;
  right: 0;
  width: 155px;
  height: 155px;
  color: rgba(229, 50, 45, 0.38);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.workflow-promo-card:hover .workflow-promo-bg-lines {
  transform: scale(1.08) rotate(4deg);
  color: rgba(229, 50, 45, 0.6);
}

.workflow-promo-title {
  font-size: 21.5px;
  font-weight: 750;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.25px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.workflow-promo-desc {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.58;
  margin-bottom: 20px;
}

.workflow-promo-btn {
  font-size: 14.5px;
  font-weight: 650;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 18px;
  width: fit-content;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.workflow-promo-card:hover .workflow-promo-btn {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #ffffff;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(229, 50, 45, 0.45);
}

/* Empty State */
.tools-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-glass-hover);
  display: none;
}

.tools-empty-state.visible {
  display: block;
}

.empty-state-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 14.5px;
  color: #94a3b8;
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   5. "Work Smarter, Not Harder" Key Features Showcase Section (Image 1)
   -------------------------------------------------------------------------- */
.showcase-section {
  padding: 10px clamp(16px, 2.5vw, 44px) 70px;
  background: transparent;
  position: relative;
}

.showcase-container {
  max-width: min(96vw, 1720px);
  margin: 0 auto;
}

.showcase-header-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.showcase-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(147, 51, 234, 0.3);
  color: #a855f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.12);
  transition: all var(--transition-fast);
}

.showcase-top-badge svg {
  color: #a855f7;
}

[data-theme="light"] .showcase-top-badge,
body.light-mode .showcase-top-badge {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}

[data-theme="light"] .showcase-top-badge svg,
body.light-mode .showcase-top-badge svg {
  color: #7e22ce;
}

.showcase-heading {
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .showcase-heading,
body.light-mode .showcase-heading {
  color: #0b1026 !important;
  text-shadow: none !important;
}

.showcase-subtitle {
  font-size: 15.5px;
  color: var(--text-body);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
}

[data-theme="light"] .showcase-subtitle,
body.light-mode .showcase-subtitle {
  color: #475569 !important;
}

/* 3-Column Features Grid */
.features-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

@media (max-width: 1080px) {
  .features-grid-v2 {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 0 auto;
  }
}

/* Feature Card V2 */
.feature-card-v2 {
  border-radius: 26px;
  padding: 30px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

/* Dark Mode Card Backgrounds (Preserving website's rich cosmic theme) */
.feature-card-v2.card-browser {
  background: linear-gradient(160deg, rgba(16, 24, 52, 0.88) 0%, rgba(13, 19, 44, 0.95) 100%);
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feature-card-v2.card-android {
  background: linear-gradient(160deg, rgba(26, 18, 50, 0.88) 0%, rgba(16, 13, 38, 0.95) 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feature-card-v2.card-cloud {
  background: linear-gradient(160deg, rgba(14, 28, 42, 0.88) 0%, rgba(10, 20, 32, 0.95) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.feature-card-v2:hover {
  transform: translateY(-6px);
}

.feature-card-v2.card-browser:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 30px rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.6);
}

.feature-card-v2.card-android:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 30px rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
}

.feature-card-v2.card-cloud:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 30px rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.6);
}

/* Light Mode Card Overrides (Matching Image 1 soft colored cards) */
[data-theme="light"] .feature-card-v2.card-browser,
body.light-mode .feature-card-v2.card-browser {
  background: linear-gradient(150deg, #ffffff 0%, #edf6fe 100%) !important;
  border: 1.5px solid rgba(186, 230, 253, 0.9) !important;
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.12) !important;
}

[data-theme="light"] .feature-card-v2.card-android,
body.light-mode .feature-card-v2.card-android {
  background: linear-gradient(150deg, #ffffff 0%, #faf5ff 100%) !important;
  border: 1.5px solid rgba(233, 213, 255, 0.9) !important;
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.12) !important;
}

[data-theme="light"] .feature-card-v2.card-cloud,
body.light-mode .feature-card-v2.card-cloud {
  background: linear-gradient(150deg, #ffffff 0%, #f0fdf4 100%) !important;
  border: 1.5px solid rgba(187, 247, 208, 0.9) !important;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.12) !important;
}

[data-theme="light"] .feature-card-v2.card-browser:hover,
body.light-mode .feature-card-v2.card-browser:hover {
  box-shadow: 0 20px 45px rgba(2, 132, 199, 0.18) !important;
  border-color: #0284c7 !important;
}

[data-theme="light"] .feature-card-v2.card-android:hover,
body.light-mode .feature-card-v2.card-android:hover {
  box-shadow: 0 20px 45px rgba(126, 34, 206, 0.18) !important;
  border-color: #7e22ce !important;
}

[data-theme="light"] .feature-card-v2.card-cloud:hover,
body.light-mode .feature-card-v2.card-cloud:hover {
  box-shadow: 0 20px 45px rgba(21, 128, 61, 0.18) !important;
  border-color: #15803d !important;
}

/* Card Header */
.feature-card-header {
  margin-bottom: 0;
}

.feature-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
  width: fit-content;
}

.feature-pill-badge svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.badge-browser {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #60a5fa;
}

.badge-android {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.badge-cloud {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #4ade80;
}

[data-theme="light"] .badge-browser,
body.light-mode .badge-browser {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

[data-theme="light"] .badge-android,
body.light-mode .badge-android {
  background: #f3e8ff !important;
  border-color: #e9d5ff !important;
  color: #7e22ce !important;
}

[data-theme="light"] .badge-cloud,
body.light-mode .badge-cloud {
  background: #dcfce7 !important;
  border-color: #bbf7d0 !important;
  color: #15803d !important;
}

.feature-card-title {
  font-size: clamp(24px, 1.7vw, 28px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.24;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}

[data-theme="light"] .feature-card-title,
body.light-mode .feature-card-title {
  color: #0b1026 !important;
}

.feature-card-desc {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.58;
  margin: 0;
  min-height: auto;
}

[data-theme="light"] .feature-card-desc,
body.light-mode .feature-card-desc {
  color: #334155 !important;
}

/* Card Body (Split layout with bullets/CTA on left, 3D artwork on right) */
.feature-card-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
  position: relative;
  min-height: clamp(210px, 15vw, 255px);
}

.feature-card-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 55%;
  max-width: 58%;
  position: relative;
  z-index: 2;
  min-width: 190px;
}

.feature-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-bullet-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14.5px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: -0.1px;
  line-height: 1.35;
}

[data-theme="light"] .feature-bullet-list li,
body.light-mode .feature-bullet-list li {
  color: #0f172a !important;
  font-weight: 700;
}

.bullet-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.bullet-check svg {
  width: 13px;
  height: 13px;
  stroke-width: 3.5;
}

.check-blue {
  background: #2563eb;
  color: #ffffff;
}

.check-purple {
  background: #7c3aed;
  color: #ffffff;
}

.check-green {
  background: #059669;
  color: #ffffff;
}

/* Action Buttons */
.feature-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none;
  width: fit-content;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  position: relative;
  z-index: 3;
}

.feature-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s ease;
}

.feature-btn:hover {
  transform: translateY(-2px);
}

.feature-btn:hover svg {
  transform: translateX(4px);
}

.feature-btn.is-static-badge {
  pointer-events: none !important;
  cursor: default !important;
  user-select: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
  transform: none !important;
}

.feature-btn.is-static-badge:hover {
  transform: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}

.feature-btn.is-static-badge:hover svg {
  transform: none !important;
}

.btn-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.btn-blue:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

.btn-purple {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
}

.btn-purple:hover {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5);
}

.btn-green {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.btn-green:hover {
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.5);
}

/* 3D Artwork Right Column (Laptop, Mobile, Cloud Showcase Images - Balanced & Clean) */
.feature-card-right {
  position: absolute;
  right: 0px;
  bottom: 0px;
  width: clamp(235px, 17vw, 295px);
  height: clamp(200px, 14.5vw, 245px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* Card 1: Laptop image - wide horizontal aspect */
.card-browser .feature-card-right {
  width: clamp(235px, 17vw, 295px);
  height: clamp(200px, 14.5vw, 245px);
  right: 0px;
  bottom: 0px;
}

/* Card 2: Mobile scanner - tall vertical aspect */
.card-android .feature-card-right {
  width: clamp(210px, 15.5vw, 265px);
  height: clamp(210px, 15.5vw, 260px);
  right: 4px;
  bottom: 0px;
}

/* Card 3: Cloud & integration - balanced wide aspect */
.card-cloud .feature-card-right {
  width: clamp(235px, 17vw, 295px);
  height: clamp(200px, 14.5vw, 245px);
  right: 0px;
  bottom: 0px;
}

.feature-artwork-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.22));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card-v2:hover .feature-artwork-img {
  transform: scale(1.06) translateY(-4px);
}

@media (max-width: 1200px) and (min-width: 1081px) {
  .feature-card-v2 {
    padding: 24px 20px 18px;
  }

  .feature-card-title {
    font-size: 20px;
  }

  .feature-card-desc {
    font-size: 13px;
  }

  .feature-bullet-list li {
    font-size: 12.5px;
  }

  .card-browser .feature-card-right,
  .card-cloud .feature-card-right {
    width: 170px;
    height: 135px;
  }

  .card-android .feature-card-right {
    width: 150px;
    height: 145px;
  }
}

@media (max-width: 1080px) {
  .features-grid-v2 {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin: 0 auto;
    gap: 32px;
  }

  .card-browser .feature-card-right,
  .card-cloud .feature-card-right {
    width: 275px;
    height: 240px;
  }

  .card-android .feature-card-right {
    width: 240px;
    height: 240px;
  }
}

@media (max-width: 600px) {
  .showcase-section {
    padding: 10px 12px 30px !important;
  }

  .showcase-header-wrap {
    margin-bottom: 16px !important;
  }

  .showcase-top-badge {
    padding: 4px 10px !important;
    font-size: 9.5px !important;
    margin-bottom: 6px !important;
  }

  .showcase-top-badge svg {
    width: 11px !important;
    height: 11px !important;
  }

  .showcase-heading {
    font-size: 22px !important;
    margin-bottom: 6px !important;
  }

  .showcase-subtitle {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
  }

  .features-grid-v2 {
    gap: 14px !important;
  }

  .feature-card-v2 {
    padding: 16px 14px 14px !important;
    border-radius: 18px !important;
    gap: 10px !important;
  }

  .feature-pill-badge {
    padding: 3.5px 9px !important;
    font-size: 9.5px !important;
    margin-bottom: 8px !important;
    gap: 4px !important;
  }

  .feature-pill-badge svg {
    width: 12px !important;
    height: 12px !important;
  }

  .feature-card-title {
    font-size: 17px !important;
    line-height: 1.25 !important;
    margin: 0 0 6px !important;
  }

  .feature-card-desc {
    font-size: 12px !important;
    line-height: 1.42 !important;
    margin: 0 0 4px !important;
  }

  .feature-card-body {
    min-height: auto !important;
    margin-top: 4px !important;
    gap: 10px !important;
    align-items: flex-end !important;
  }

  .feature-card-left {
    max-width: 65% !important;
    flex: 1 1 65% !important;
    min-width: 0 !important;
  }

  .feature-bullet-list {
    margin: 0 0 12px !important;
    gap: 6px !important;
  }

  .feature-bullet-list li {
    font-size: 11.5px !important;
    gap: 6px !important;
    line-height: 1.3 !important;
  }

  .bullet-check {
    width: 16px !important;
    height: 16px !important;
  }

  .bullet-check svg {
    width: 10px !important;
    height: 10px !important;
  }

  .feature-btn {
    padding: 7px 15px !important;
    font-size: 12px !important;
    gap: 5px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
  }

  .feature-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  .card-browser .feature-card-right,
  .card-cloud .feature-card-right {
    width: 110px !important;
    height: 95px !important;
    right: 0px !important;
    bottom: 0px !important;
  }

  .card-android .feature-card-right {
    width: 90px !important;
    height: 100px !important;
    right: 2px !important;
    bottom: 0px !important;
  }
}


/* --------------------------------------------------------------------------
   Footer Section
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 10;
  background-color: rgba(9, 14, 34, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 68px clamp(16px, 2.5vw, 44px) 34px;
}

.footer-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.15fr;
  gap: clamp(24px, 2.5vw, 44px);
  margin-bottom: 48px;
  align-items: start;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 26px;
  font-weight: 800;
  text-decoration: none;
}

.footer-brand-desc {
  font-size: 0.825rem;
  line-height: 1.45;
  color: #94a3b8;
  max-width: 300px;
  font-weight: 450;
  margin-top: 11px;
  margin-bottom: 0;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-link {
  font-size: 15px;
  font-weight: 500;
  color: #94a3b8;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-link:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.2px;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding-right: 76px; /* High clearance for floating scroll-to-top button */
}

.footer-bottom-links .footer-link {
  font-size: 14px;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer-bottom-links .footer-link:hover {
  transform: none !important;
  text-shadow: none !important;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Interactive Modals (Tool Playground & Auth)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(5, 8, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, visibility;
  transform: translateZ(0);
  transition: opacity 0.28s ease, visibility 0.28s;
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: rgba(18, 25, 54, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-xl);
  max-width: 820px;
  width: 94%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  will-change: transform, opacity;
  transform: scale(0.95) translateY(10px) translateZ(0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-overlay.is-active .modal-window {
  transform: scale(1) translateY(0) translateZ(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.modal-header {
  padding: 30px 30px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.modal-icon-badge svg {
  width: 30px;
  height: 30px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.modal-desc {
  font-size: 14px;
  color: #cbd5e1;
  margin-top: 4px;
}

.modal-body {
  padding: 0 30px 30px;
}

/* Upload Dropzone (Dark Glass) */
.dropzone-area {
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 44px 20px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
  cursor: pointer;
  margin-bottom: 20px;
}

.dropzone-area:hover,
.dropzone-area.drag-over {
  border-color: var(--primary-red);
  background-color: rgba(229, 50, 45, 0.1);
  box-shadow: 0 0 32px rgba(229, 50, 45, 0.25);
}

.dropzone-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  color: var(--primary-red);
  filter: drop-shadow(0 0 15px var(--primary-red-glow));
}

.dropzone-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.dropzone-hint {
  font-size: 13px;
  color: #94a3b8;
}

.btn-select-file {
  margin-top: 18px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-block;
  box-shadow: 0 4px 18px var(--primary-red-glow);
  transition: all var(--transition-fast);
}

.btn-select-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(229, 50, 45, 0.7);
}

/* ==========================================================================
   Tool Workspace Modal (High-Resolution Reference Design Match)
   Clean, solid, crisp white aesthetic with red accents & security badge
   ========================================================================== */
#toolModal.modal-overlay {
  background-color: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 2200 !important;
}

#toolModal .modal-window {
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 24px !important;
  max-width: 860px !important;
  width: 94% !important;
  padding: 36px 42px 30px 42px !important;
  box-shadow: 0 30px 65px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  position: relative !important;
  overflow: visible !important;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s ease !important;
}

#toolModal.is-active .modal-window {
  transform: scale(1) translateY(0) !important;
}

#toolModal .modal-header {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 0 !important;
  margin-bottom: 26px !important;
}

#toolModal .modal-icon-badge {
  width: 58px !important;
  height: 58px !important;
  border-radius: 15px !important;
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.15) !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

#toolModal .modal-icon-badge svg {
  width: 32px !important;
  height: 32px !important;
}

#toolModal .modal-title {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.3px !important;
  text-shadow: none !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

#toolModal .modal-desc {
  font-size: 15px !important;
  color: #64748b !important;
  font-weight: 400 !important;
  margin-top: 4px !important;
  line-height: 1.4 !important;
}

#toolModal .modal-close-btn {
  position: absolute !important;
  top: 26px !important;
  right: 26px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: none !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
  z-index: 10 !important;
}

#toolModal .modal-close-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  transform: scale(1.06) !important;
}

#toolModal .modal-close-btn svg {
  width: 17px !important;
  height: 17px !important;
}

#toolModal .modal-body {
  padding: 0 !important;
}

/* ==========================================================================
   Split Layout for HTML to PDF inside #toolModal (Side-by-Side: Input & Upload)
   ========================================================================== */
#toolModal.is-html-tool .modal-window {
  max-width: 990px !important;
  width: 95% !important;
}

#toolModal.is-html-tool .modal-html-split-wrapper.is-split {
  display: grid !important;
  grid-template-columns: 1fr 48px 1fr !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin-bottom: 20px !important;
}

#toolModal.is-html-tool .modal-html-url-section {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

#toolModal.is-html-tool .modal-html-card {
  border: 2px dashed #fca5a5 !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%) !important;
  padding: 32px 28px 28px 28px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

#toolModal.is-html-tool .modal-html-card:hover {
  border-color: #ef4444 !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.15) !important;
  transform: translateY(-1px) !important;
}

#toolModal.is-html-tool #dropzoneArea {
  margin-bottom: 0 !important;
  height: 100% !important;
  padding: 32px 28px 28px 28px !important;
  box-sizing: border-box !important;
}

#toolModal.is-html-tool #dropzoneArea .dropzone-text,
#toolModal.is-html-tool .modal-html-card .dropzone-text {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: -0.3px !important;
}

#toolModal.is-html-tool #dropzoneArea .dropzone-hint,
#toolModal.is-html-tool .modal-html-card .dropzone-hint {
  font-size: 13.5px !important;
  color: #64748b !important;
  margin-bottom: 20px !important;
  font-weight: 400 !important;
}

#toolModal.is-html-tool .modal-html-card textarea {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  padding: 14px 16px !important;
  outline: none !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  width: 100% !important;
  height: 270px !important;
  min-height: 220px !important;
  box-sizing: border-box !important;
}

#toolModal.is-html-tool .modal-html-card textarea:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12), inset 0 1px 3px rgba(0,0,0,0.05) !important;
}

#toolModal.is-html-tool .modal-html-textarea-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

#toolModal.is-html-tool .modal-html-card .btn-select-file {
  margin: 0 !important;
  width: 100% !important;
  justify-content: center !important;
  height: 48px !important;
}

/* Center vertical separator between Left Text Input and Right File Upload */
.modal-html-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.modal-html-divider .divider-line {
  flex: 1;
  width: 1.5px;
  background: #e2e8f0;
}

.modal-html-divider .divider-badge {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  border-radius: 9999px;
  padding: 5px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

@media (max-width: 820px) {
  #toolModal.is-html-tool .modal-html-split-wrapper.is-split {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .modal-html-divider {
    flex-direction: row !important;
    width: 100% !important;
    height: 28px !important;
    padding: 0 !important;
  }
  .modal-html-divider .divider-line {
    width: 100% !important;
    height: 1.5px !important;
  }
  .modal-html-divider .divider-badge {
    margin: 0 10px !important;
  }
}

/* Red dashed upload zone */
#toolModal .dropzone-area {
  border: 2px dashed #fca5a5 !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%) !important;
  padding: 50px 36px 42px 36px !important;
  text-align: center !important;
  cursor: pointer !important;
  margin-bottom: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

#toolModal .dropzone-area:hover,
#toolModal .dropzone-area.drag-over {
  border-color: #ef4444 !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.15) !important;
  transform: translateY(-1px) !important;
}

#toolModal .dropzone-cloud-icon {
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#toolModal .dropzone-cloud-icon svg {
  width: 104px !important;
  height: 68px !important;
}

#toolModal .dropzone-text {
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 16px 0 6px 0 !important;
  letter-spacing: -0.3px !important;
}

#toolModal .dropzone-hint {
  font-size: 15px !important;
  color: #64748b !important;
  margin-bottom: 26px !important;
  font-weight: 400 !important;
}

#toolModal .btn-select-file {
  background: #ef4444 !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 13px 36px !important;
  border-radius: 9999px !important;
  border: none !important;
  box-shadow: 0 5px 18px rgba(239, 68, 68, 0.38) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  margin: 0 !important;
}

#toolModal .btn-select-file:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 26px rgba(239, 68, 68, 0.48) !important;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

#toolModal .dropzone-format-info {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 18px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
}

#toolModal .dropzone-format-info svg {
  color: #64748b !important;
  width: 16px !important;
  height: 16px !important;
}

#toolModal .modal-security-badge {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 13px !important;
  color: #64748b !important;
  padding-left: 2px !important;
  margin-top: 20px !important;
}

#toolModal .modal-security-badge svg {
  flex-shrink: 0 !important;
  color: #ef4444 !important;
  width: 20px !important;
  height: 20px !important;
}

/* Mobile Responsive Optimization for #toolModal across all tools */
@media (max-width: 600px) {
  #toolModal.modal-overlay {
    padding: 12px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #toolModal .modal-window {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 18px 16px 16px 16px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #toolModal .modal-close-btn {
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
  }

  #toolModal .modal-header {
    gap: 12px !important;
    margin-bottom: 14px !important;
    padding-right: 34px !important;
  }

  #toolModal .modal-icon-badge {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
  }

  #toolModal .modal-icon-badge svg {
    width: 24px !important;
    height: 24px !important;
  }

  #toolModal .modal-title {
    font-size: 19px !important;
    line-height: 1.2 !important;
  }

  #toolModal .modal-desc {
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin-top: 2px !important;
  }

  #toolModal .modal-body {
    padding: 0 !important;
  }

  #toolModal .dropzone-area {
    padding: 22px 14px 18px 14px !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
  }

  #toolModal .dropzone-cloud-icon {
    margin-bottom: 4px !important;
  }

  #toolModal .dropzone-cloud-icon svg {
    width: 68px !important;
    height: 44px !important;
  }

  #toolModal .dropzone-text {
    font-size: 15px !important;
    font-weight: 750 !important;
    margin: 8px 0 3px 0 !important;
    line-height: 1.3 !important;
  }

  #toolModal .dropzone-hint {
    font-size: 12px !important;
    margin-bottom: 14px !important;
    line-height: 1.35 !important;
  }

  #toolModal .btn-select-file {
    padding: 10px 22px !important;
    font-size: 13.5px !important;
    border-radius: 9999px !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    gap: 6px !important;
  }

  #toolModal .btn-select-file svg {
    width: 15px !important;
    height: 15px !important;
  }

  #toolModal .dropzone-format-info {
    font-size: 11px !important;
    margin-top: 10px !important;
    gap: 4px !important;
  }

  #toolModal .dropzone-format-info svg {
    width: 13px !important;
    height: 13px !important;
  }

  #toolModal .modal-security-badge {
    padding: 6px 12px !important;
    font-size: 11px !important;
    gap: 6px !important;
    border-radius: 9999px !important;
    margin-top: 8px !important;
  }

  #toolModal .modal-security-badge svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* HTML to PDF compact mobile modal so both Option 1 (Code) & Option 2 (Upload) fit on screen without scrolling */
  #toolModal.is-html-tool.modal-overlay {
    padding: 8px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #toolModal.is-html-tool .modal-window {
    padding: 12px 14px 10px 14px !important;
    max-height: 96vh !important;
    overflow-y: auto !important;
  }

  #toolModal.is-html-tool .modal-header {
    gap: 8px !important;
    margin-bottom: 8px !important;
    padding-right: 28px !important;
  }

  #toolModal.is-html-tool .modal-icon-badge {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  #toolModal.is-html-tool .modal-icon-badge svg {
    width: 18px !important;
    height: 18px !important;
  }

  #toolModal.is-html-tool .modal-title {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  #toolModal.is-html-tool .modal-desc {
    font-size: 11px !important;
    line-height: 1.25 !important;
    margin-top: 1px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  #toolModal.is-html-tool .modal-html-split-wrapper.is-split {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-bottom: 0 !important;
  }

  /* Option 1: HTML Code Card */
  #toolModal.is-html-tool .modal-html-card {
    padding: 10px 12px 10px 12px !important;
    border-radius: 14px !important;
    border-width: 1.5px !important;
  }

  #toolModal.is-html-tool .modal-html-card .dropzone-text {
    font-size: 14px !important;
    margin: 0 0 5px 0 !important;
    line-height: 1.2 !important;
  }

  #toolModal.is-html-tool .modal-html-textarea-wrap,
  #toolModal.is-html-tool .modal-html-card > div[style*="margin-bottom"] {
    margin-bottom: 6px !important;
  }

  #toolModal.is-html-tool .modal-html-card textarea {
    height: 68px !important;
    min-height: 55px !important;
    max-height: 100px !important;
    font-size: 11px !important;
    padding: 6px 8px !important;
    line-height: 1.35 !important;
    border-radius: 8px !important;
    resize: none !important;
  }

  #toolModal.is-html-tool .modal-html-card .btn-select-file,
  #toolModal.is-html-tool #dropzoneArea .btn-select-file {
    height: 36px !important;
    min-height: 36px !important;
    font-size: 12px !important;
    padding: 5px 12px !important;
    border-radius: 9999px !important;
    gap: 5px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  #toolModal.is-html-tool .modal-html-card .btn-select-file svg,
  #toolModal.is-html-tool #dropzoneArea .btn-select-file svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Divider */
  #toolModal.is-html-tool .modal-html-divider {
    height: 16px !important;
    padding: 0 !important;
    margin: 1px 0 !important;
  }

  #toolModal.is-html-tool .modal-html-divider .divider-line {
    height: 1px !important;
  }

  #toolModal.is-html-tool .modal-html-divider .divider-badge {
    font-size: 9px !important;
    padding: 1px 6px !important;
    margin: 0 6px !important;
  }

  /* Option 2: Upload Dropzone Area */
  #toolModal.is-html-tool #dropzoneArea {
    padding: 10px 12px 8px 12px !important;
    border-radius: 14px !important;
    border-width: 1.5px !important;
    margin-bottom: 0 !important;
  }

  #toolModal.is-html-tool #dropzoneArea .dropzone-cloud-icon {
    margin-bottom: 2px !important;
  }

  #toolModal.is-html-tool #dropzoneArea .dropzone-cloud-icon svg {
    width: 40px !important;
    height: 26px !important;
  }

  #toolModal.is-html-tool #dropzoneArea .dropzone-text {
    font-size: 13px !important;
    margin: 2px 0 2px 0 !important;
    line-height: 1.2 !important;
  }

  #toolModal.is-html-tool #dropzoneArea .dropzone-hint {
    font-size: 10.5px !important;
    margin-bottom: 6px !important;
    line-height: 1.2 !important;
  }

  #toolModal.is-html-tool #dropzoneArea .dropzone-format-info {
    font-size: 9.5px !important;
    margin-top: 5px !important;
    gap: 3px !important;
  }

  #toolModal.is-html-tool #dropzoneArea .dropzone-format-info svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* Simulated Processing Area */
.processing-area {
  display: none;
  text-align: center;
  padding: 32px 20px;
}

.processing-area.is-active {
  display: block;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 20px 0 10px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e5322d, #f97316);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 15px rgba(229, 50, 45, 0.6);
}

.progress-status-text {
  font-size: 14.5px;
  font-weight: 600;
  color: #f1f5f9;
}

.download-result-box {
  display: none;
  background: rgba(229, 50, 45, 0.1);
  border: 1px solid rgba(229, 50, 45, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 16px;
  text-align: center;
}

.download-result-box.is-ready {
  display: block;
}

.btn-download-processed {
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(229, 50, 45, 0.45);
  transition: all var(--transition-fast);
}

.btn-download-processed:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(229, 50, 45, 0.65);
}

/* Toast Notification (Glassmorphism) - ALL NOTIFICATIONS OFF */
.toast-notice {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.toast-notice.is-show {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   Responsive Media Queries & Clean Square Grid Proportions (1:1 Ratio)
   -------------------------------------------------------------------------- */
.tools-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  grid-auto-rows: auto !important;
  gap: clamp(14px, 1.2vw, 18px) !important;
  align-items: start !important;
}

/* Tier 1: Wide Desktop (>= 1240px) -> 6 Columns */
@media (min-width: 1240px) {
  .tools-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 16px !important;
  }
}

/* Tier 2: Standard Desktop & Laptops (1020px - 1239px) -> 5 Columns */
@media (max-width: 1239px) and (min-width: 1020px) {
  .tools-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 15px !important;
  }
}

/* Tier 3: Compact Desktop & Snapped Windows (820px - 1019px) -> 4 Columns */
@media (max-width: 1019px) and (min-width: 820px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px !important;
  }
}

/* Tier 4: Tablets (600px - 819px) -> 3 Columns */
@media (max-width: 819px) and (min-width: 600px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
  }
}

/* Navbar breakpoint calibration for compact desktops and landscape tablets (821px - 1120px) */
@media (max-width: 1120px) and (min-width: 821px) {
  .nav-container {
    padding: 0 16px;
  }
  .logo {
    font-size: 26px;
    gap: 8px;
  }
  .logo-icon-wrap {
    width: 32px;
    height: 32px;
  }
  .nav-center {
    gap: 4px;
  }
  .nav-link {
    font-size: 11px;
    padding: 6px 6px;
  }
  .nav-right {
    gap: 8px;
  }
  .btn-theme-toggle {
    width: 36px;
    height: 36px;
  }
  .btn-apps {
    width: 36px;
    height: 36px;
  }
}

/* Navbar breakpoint calibration: collapses desktop nav on small devices (<= 820px) */
@media (max-width: 820px) {
  .nav-center {
    display: none;
  }

  .mobile-menu-btn {
    display: none !important;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-brand-col {
    grid-column: span 2;
  }

  .footer-brand-desc {
    max-width: 100%;
  }
}

/* Tier 5 & 6: Mobile Devices (<= 640px) -> Premium Compact 2-Column Grid */
@media (max-width: 640px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 !important;
  }

  .tool-card {
    padding: 12px 10px 10px 10px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 16px !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .tool-card-header {
    margin-bottom: 6px !important;
    gap: 6px !important;
  }

  .tool-icon-wrapper {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    flex: 0 0 36px !important;
    border-radius: 10px !important;
  }

  .tool-icon-wrapper svg {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    max-width: 19px !important;
    max-height: 19px !important;
    flex: 0 0 19px !important;
  }

  .tool-title {
    font-size: 13.5px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    margin-bottom: 3px !important;
    letter-spacing: -0.15px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .tool-description {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    margin-top: 2px !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .hero-title {
    font-size: 26px !important;
    line-height: 1.18 !important;
    letter-spacing: -0.4px !important;
    margin-bottom: 8px !important;
  }

  .hero-subtitle {
    font-size: 13.5px !important;
    line-height: 1.42 !important;
    margin-bottom: 16px !important;
  }

  .mega-menu-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px 12px !important;
  }
}

@media (max-width: 360px) {
  .tools-grid {
    gap: 8px !important;
  }

  .tool-card {
    padding: 10px 8px 8px 8px !important;
    border-radius: 14px !important;
  }

  .tool-icon-wrapper {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    flex: 0 0 32px !important;
  }

  .tool-icon-wrapper svg {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    flex: 0 0 17px !important;
  }

  .tool-title {
    font-size: 12.5px !important;
  }

  .tool-description {
    font-size: 10px !important;
  }
}

/* ==========================================================================
   Convert Pro - Comprehensive Light Mode Component Styling
   ========================================================================== */
[data-theme="light"] body,
body.light-mode {
  color: var(--text-body);
}

/* ==========================================================================
   Light Mode (Semi-White Background) Component Overrides
   ========================================================================== */
[data-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .nav-link {
  color: #334155;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.open {
  color: var(--primary-red);
  background-color: rgba(229, 50, 45, 0.08);
  text-shadow: none;
}

[data-theme="light"] .nav-link.active {
  color: var(--primary-red);
  background-color: rgba(229, 50, 45, 0.12);
  text-shadow: none;
}

[data-theme="light"] .btn-apps-grid {
  color: #334155;
  background-color: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .btn-apps-grid:hover {
  background-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

[data-theme="light"] .btn-theme-toggle,
body.light-mode .btn-theme-toggle {
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #e5322d 0%, #f43f5e 35%, #a855f7 70%, #06b6d4 100%) border-box !important;
  border: 2.5px solid transparent !important;
  color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(229, 50, 45, 0.25), 0 3px 10px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .btn-theme-toggle:hover,
body.light-mode .btn-theme-toggle:hover {
  transform: translateY(-2px) scale(1.08);
  background: linear-gradient(#fffbeb, #fffbeb) padding-box,
    linear-gradient(135deg, #ff3b36 0%, #fb7185 35%, #c084fc 70%, #22d3ee 100%) border-box !important;
  border: 2.5px solid transparent !important;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.45), 0 4px 16px rgba(229, 50, 45, 0.3) !important;
}

[data-theme="light"] .hero-title {
  color: #0b1026;
  -webkit-text-fill-color: #0b1026;
  background: none;
  text-shadow: none;
}

[data-theme="light"] .hero-highlight-word,
body.light-mode .hero-highlight-word {
  color: #e5322d !important;
  -webkit-text-fill-color: #e5322d !important;
}

[data-theme="light"] .hero-subtitle {
  color: #475569;
  font-size: 21px !important;
  text-shadow: none;
  font-weight: 500;
}

[data-theme="light"] .filter-pill {
  background-color: #ffffff;
  color: #1e293b;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .filter-pill:hover {
  background-color: #ffffff;
  color: var(--primary-red);
  border-color: rgba(229, 50, 45, 0.45);
  box-shadow: 0 4px 14px rgba(229, 50, 45, 0.16);
}

[data-theme="light"] .filter-pill.active {
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 15.5px !important;
  font-weight: 750 !important;
  border-color: transparent !important;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.35) !important;
}

[data-theme="light"] .search-input {
  background-color: #ffffff;
  color: #0f172a;
  font-size: 16.5px !important;
  border-color: #cbd5e1;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .search-input::placeholder {
  color: #94a3b8;
  font-size: 15.5px !important;
}

[data-theme="light"] .search-input:focus {
  background-color: #ffffff;
  border-color: var(--primary-red);
  box-shadow: 0 0 16px rgba(229, 50, 45, 0.18);
}

[data-theme="light"] .search-icon {
  color: #ef4444 !important;
}

[data-theme="light"] .search-clear-btn {
  color: #64748b;
}

/* Light Mode: Website Natural Background Preserved (No pink override) */
[data-theme="light"] .hero-section,
body.light-mode .hero-section {
  background: transparent !important;
}

[data-theme="light"] .trust-title,
body.light-mode .trust-title {
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 750 !important;
}

[data-theme="light"] .trust-desc,
body.light-mode .trust-desc {
  color: #64748b !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

[data-theme="light"] .trust-divider,
body.light-mode .trust-divider {
  background-color: rgba(226, 232, 240, 0.9);
}

[data-theme="light"] .trust-icon-circle,
body.light-mode .trust-icon-circle {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.22);
}

[data-theme="light"] .showcase-card-wrapper,
body.light-mode .showcase-card-wrapper {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .tool-card,
body.light-mode .tool-card {
  border: 1.8px solid transparent !important;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, var(--tool-accent, #e5322d) 0%, #f43f5e 35%, #a855f7 70%, #38bdf8 100%) border-box !important;
  background-clip: padding-box, border-box !important;
  border-radius: 20px !important;
  padding: clamp(16px, 1.25vw, 22px) !important;
  display: flex !important;
  flex-direction: column !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
  box-sizing: border-box !important;
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.05),
    0 0 16px var(--tool-accent-glow, rgba(229, 50, 45, 0.12)) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease !important;
}

[data-theme="light"] .tool-card:hover,
body.light-mode .tool-card:hover {
  transform: translateY(-6px) !important;
  border-color: transparent !important;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, var(--tool-accent, #e5322d) 0%, #e11d48 30%, #9333ea 68%, #06b6d4 100%) border-box !important;
  background-clip: padding-box, border-box !important;
  box-shadow:
    0 20px 42px -8px rgba(15, 23, 42, 0.12),
    0 0 28px var(--tool-accent-glow, rgba(229, 50, 45, 0.28)) !important;
}

[data-theme="light"] .tool-icon-wrapper,
body.light-mode .tool-icon-wrapper {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 44px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  border-radius: 13px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

[data-theme="light"] .tool-icon-wrapper svg,
body.light-mode .tool-icon-wrapper svg {
  width: 23px !important;
  height: 23px !important;
  min-width: 23px !important;
  min-height: 23px !important;
  max-width: 23px !important;
  max-height: 23px !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 23px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

[data-theme="light"] .tool-title,
body.light-mode .tool-title {
  font-size: clamp(15.5px, 1.05vw, 17px) !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
  margin-bottom: 5px !important;
  letter-spacing: -0.2px !important;
  text-shadow: none !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
}

[data-theme="light"] .tool-description,
body.light-mode .tool-description {
  font-size: clamp(12.5px, 0.8vw, 13.5px) !important;
  color: #475569 !important;
  line-height: 1.42 !important;
  font-weight: 450 !important;
  margin-top: 4px !important;
  text-shadow: none !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* Light Mode Mobile 2-Column Responsive Overrides (<= 640px) */
@media (max-width: 640px) {
  [data-theme="light"] .tool-card,
  body.light-mode .tool-card {
    aspect-ratio: 1 / 1 !important;
    padding: 12px 10px 10px 10px !important;
    border-radius: 16px !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  [data-theme="light"] .tool-card-header,
  body.light-mode .tool-card-header {
    margin-bottom: 6px !important;
    gap: 6px !important;
  }

  [data-theme="light"] .tool-icon-wrapper,
  body.light-mode .tool-icon-wrapper {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    flex: 0 0 36px !important;
    border-radius: 10px !important;
  }

  [data-theme="light"] .tool-icon-wrapper svg,
  body.light-mode .tool-icon-wrapper svg {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    max-width: 19px !important;
    max-height: 19px !important;
    flex: 0 0 19px !important;
  }

  [data-theme="light"] .tool-title,
  body.light-mode .tool-title {
    font-size: 13.5px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    margin-bottom: 3px !important;
    letter-spacing: -0.15px !important;
  }

  [data-theme="light"] .tool-description,
  body.light-mode .tool-description {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    margin-top: 2px !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }
}

@media (max-width: 360px) {
  [data-theme="light"] .tool-card,
  body.light-mode .tool-card {
    padding: 10px 8px 8px 8px !important;
    border-radius: 14px !important;
  }

  [data-theme="light"] .tool-icon-wrapper,
  body.light-mode .tool-icon-wrapper {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    flex: 0 0 32px !important;
  }

  [data-theme="light"] .tool-icon-wrapper svg,
  body.light-mode .tool-icon-wrapper svg {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    flex: 0 0 17px !important;
  }

  [data-theme="light"] .tool-title,
  body.light-mode .tool-title {
    font-size: 12.5px !important;
  }

  [data-theme="light"] .tool-description,
  body.light-mode .tool-description {
    font-size: 10px !important;
  }
}

/* ==========================================================================
   Workflow Promotional Card - Light Mode Overrides
   ========================================================================== */
[data-theme="light"] .workflow-promo-card,
body.light-mode .workflow-promo-card {
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 42%, #fef2f2 70%, #faf5ff 100%) !important;
  border: 1.5px solid rgba(229, 50, 45, 0.25) !important;
  border-radius: 20px !important;
  padding: clamp(16px, 1.25vw, 22px) !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05), 0 0 20px rgba(229, 50, 45, 0.06) !important;
}

[data-theme="light"] .workflow-promo-card:hover,
body.light-mode .workflow-promo-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(135deg, #ffffff 0%, #ffe4e6 50%, #f3e8ff 100%) !important;
  border-color: rgba(229, 50, 45, 0.5) !important;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.12), 0 0 28px rgba(229, 50, 45, 0.2) !important;
}

[data-theme="light"] .workflow-promo-card::before,
body.light-mode .workflow-promo-card::before {
  background: linear-gradient(90deg, transparent, rgba(229, 50, 45, 0.9), rgba(168, 85, 247, 0.85), transparent) !important;
  opacity: 1;
}

[data-theme="light"] .workflow-promo-bg-lines,
body.light-mode .workflow-promo-bg-lines {
  color: rgba(229, 50, 45, 0.22) !important;
}

[data-theme="light"] .workflow-promo-card:hover .workflow-promo-bg-lines,
body.light-mode .workflow-promo-card:hover .workflow-promo-bg-lines {
  color: rgba(229, 50, 45, 0.5) !important;
}

[data-theme="light"] .workflow-promo-title,
body.light-mode .workflow-promo-title {
  color: #0f172a !important;
  font-size: 21.5px !important;
  letter-spacing: -0.25px !important;
  margin-bottom: 12px !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

[data-theme="light"] .workflow-promo-desc,
body.light-mode .workflow-promo-desc {
  color: #475569 !important;
  font-size: 15px !important;
  text-shadow: none !important;
  font-weight: 500 !important;
  line-height: 1.58 !important;
  margin-bottom: 20px !important;
}

[data-theme="light"] .workflow-promo-btn,
body.light-mode .workflow-promo-btn {
  background: #ffffff !important;
  color: #e5322d !important;
  border: 1.5px solid rgba(229, 50, 45, 0.35) !important;
  box-shadow: 0 3px 12px rgba(229, 50, 45, 0.1) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding: 10px 18px !important;
}

[data-theme="light"] .workflow-promo-card:hover .workflow-promo-btn,
body.light-mode .workflow-promo-card:hover .workflow-promo-btn,
[data-theme="light"] .workflow-promo-btn:hover,
body.light-mode .workflow-promo-btn:hover {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 22px rgba(229, 50, 45, 0.45) !important;
}

/* Empty State Light Mode */
[data-theme="light"] .tools-empty-state,
body.light-mode .tools-empty-state {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="light"] .empty-state-title,
body.light-mode .empty-state-title {
  color: #0f172a !important;
}

[data-theme="light"] .empty-state-desc,
body.light-mode .empty-state-desc {
  color: #64748b !important;
}


[data-theme="light"] .mega-menu-wrapper {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .mega-col-title,
body.light-mode .mega-col-title {
  color: #0f172a !important;
  font-weight: 800;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .mega-item,
body.light-mode .mega-item,
[data-theme="light"] .mega-link,
body.light-mode .mega-link {
  color: #1e293b !important;
  font-weight: 600;
  text-shadow: none !important;
}

[data-theme="light"] .mega-item:hover,
body.light-mode .mega-item:hover,
[data-theme="light"] .mega-link:hover,
body.light-mode .mega-link:hover {
  background-color: rgba(229, 50, 45, 0.08) !important;
  color: var(--primary-red) !important;
  border-color: rgba(229, 50, 45, 0.25) !important;
  text-shadow: none !important;
}

[data-theme="light"] .mega-item.highlight,
body.light-mode .mega-item.highlight {
  color: var(--primary-red) !important;
  font-weight: 800;
}

[data-theme="light"] .mega-item-icon,
body.light-mode .mega-item-icon {
  filter: none !important;
  box-shadow: none !important;
}

[data-theme="light"] .apps-dropdown {
  background-color: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .apps-dropdown-title {
  color: #64748b;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .app-item {
  color: #334155;
}

[data-theme="light"] .app-item:hover {
  background-color: rgba(229, 50, 45, 0.08);
  color: var(--primary-red);
}

[data-theme="light"] .showcase-heading {
  color: #0f172a !important;
  text-shadow: none !important;
  font-weight: 800;
}

[data-theme="light"] .showcase-subtitle {
  color: #475569 !important;
  text-shadow: none !important;
}

[data-theme="light"] .feature-card-title {
  color: #0b1026 !important;
}

[data-theme="light"] .feature-card-desc {
  color: #475569 !important;
}

/* ==========================================================================
   Tool Workspace Modal - Light Mode Overrides (White Background & Clean Theme)
   ========================================================================== */
[data-theme="light"] .modal-overlay,
body.light-mode .modal-overlay {
  background-color: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

[data-theme="light"] .modal-window,
body.light-mode .modal-window {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 25px 70px -10px rgba(15, 23, 42, 0.16), 0 0 35px rgba(229, 50, 45, 0.08) !important;
}

[data-theme="light"] .modal-title,
body.light-mode .modal-title {
  color: #0f172a !important;
  text-shadow: none !important;
  font-weight: 800;
}

[data-theme="light"] .modal-desc,
body.light-mode .modal-desc {
  color: #475569 !important;
}

[data-theme="light"] .modal-close-btn,
body.light-mode .modal-close-btn {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

[data-theme="light"] .modal-close-btn:hover,
body.light-mode .modal-close-btn:hover {
  background-color: #fee2e2 !important;
  color: var(--primary-red) !important;
  border-color: #fca5a5 !important;
}

[data-theme="light"] .dropzone-area,
body.light-mode .dropzone-area {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .dropzone-area:hover,
[data-theme="light"] .dropzone-area.drag-over,
body.light-mode .dropzone-area:hover,
body.light-mode .dropzone-area.drag-over {
  background-color: #fff5f5 !important;
  border-color: var(--primary-red) !important;
  box-shadow: 0 0 24px rgba(229, 50, 45, 0.15) !important;
}

[data-theme="light"] .dropzone-text,
body.light-mode .dropzone-text {
  color: #0f172a !important;
  font-weight: 700;
}

[data-theme="light"] .dropzone-hint,
body.light-mode .dropzone-hint,
[data-theme="light"] .dropzone-subtext,
body.light-mode .dropzone-subtext {
  color: #64748b !important;
}


[data-theme="light"] .site-footer,
body.light-mode .site-footer {
  background-color: rgba(241, 245, 249, 0.85) !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
}

[data-theme="light"] .footer-brand-logo .logo-text {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .footer-brand-desc {
  color: #334155 !important;
}

[data-theme="light"] .footer-col-title {
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

[data-theme="light"] .footer-link {
  color: #334155 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

[data-theme="light"] .footer-link:hover {
  color: var(--primary-red) !important;
  text-shadow: none !important;
  font-weight: 600 !important;
}

[data-theme="light"] .footer-bottom {
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: #475569 !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
}

[data-theme="light"] .footer-bottom-links .footer-link {
  color: #334155 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
}

[data-theme="light"] .footer-bottom-links .footer-link:hover {
  color: var(--primary-red) !important;
}

/* ==========================================================================
   Mobile Footer Compact Typography & Layout (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .site-footer,
  [data-theme="light"] .site-footer,
  body.light-mode .site-footer {
    padding: 26px 14px 20px !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 10px !important;
    margin-bottom: 20px !important;
  }

  .footer-brand-col {
    grid-column: span 2 !important;
    margin-bottom: 4px !important;
  }

  .footer-brand-desc,
  [data-theme="light"] .footer-brand-desc,
  body.light-mode .footer-brand-desc {
    font-size: 11px !important;
    line-height: 1.42 !important;
    margin-top: 6px !important;
    max-width: 100% !important;
  }

  .footer-col-title,
  [data-theme="light"] .footer-col-title,
  body.light-mode .footer-col-title {
    font-size: 11.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 7px !important;
    line-height: 1.25 !important;
  }

  .footer-links {
    gap: 6px !important;
  }

  .footer-link,
  [data-theme="light"] .footer-link,
  body.light-mode .footer-link {
    font-size: 11.5px !important;
    font-weight: 450 !important;
    line-height: 1.35 !important;
  }

  .footer-bottom,
  [data-theme="light"] .footer-bottom,
  body.light-mode .footer-bottom {
    padding-top: 14px !important;
    font-size: 10.5px !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .footer-bottom-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px 10px !important;
  }

  .footer-bottom-links .footer-link,
  [data-theme="light"] .footer-bottom-links .footer-link,
  body.light-mode .footer-bottom-links .footer-link {
    font-size: 10px !important;
  }
}

@media (max-width: 360px) {
  .footer-col-title,
  [data-theme="light"] .footer-col-title,
  body.light-mode .footer-col-title {
    font-size: 11px !important;
  }

  .footer-link,
  [data-theme="light"] .footer-link,
  body.light-mode .footer-link {
    font-size: 10.5px !important;
  }
}

/* Mega Menu Highlighted Column (e.g. for CONVERT PDF) */
.mega-col.is-highlighted {
  background: rgba(229, 50, 45, 0.08);
  border: 1px solid rgba(229, 50, 45, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 0 24px rgba(229, 50, 45, 0.16);
  transition: all 0.3s ease;
}

[data-theme="light"] .mega-col.is-highlighted {
  background: rgba(229, 50, 45, 0.05);
  border: 1px solid rgba(229, 50, 45, 0.28);
  box-shadow: 0 4px 16px rgba(229, 50, 45, 0.12);
}

.mega-col.is-highlighted .mega-col-title {
  color: var(--primary-red);
  border-bottom-color: rgba(229, 50, 45, 0.3);
}

/* Workflow Modal Step Items */
.workflow-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workflow-step-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.workflow-step-item:hover {
  border-color: var(--border-glass-hover);
  transform: translateX(4px);
}

[data-theme="light"] .workflow-step-item {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(229, 50, 45, 0.4);
}

.step-details {
  flex: 1;
}

.step-details strong {
  display: block;
  font-size: 14px;
  color: var(--text-white);
  margin-bottom: 2px;
}

[data-theme="light"] .step-details strong {
  color: #0f172a;
}

.step-details p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

[data-theme="light"] .step-details p {
  color: #64748b;
}

.step-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(229, 50, 45, 0.12);
  color: var(--primary-red);
  border: 1px solid rgba(229, 50, 45, 0.3);
}

/* ==========================================================================
   Convert Pro Studio Workspace Styles (After Upload Stage)
   ========================================================================== */
.studio-workspace-section {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: clamp(8px, 1.4vh, 18px) clamp(16px, 2.5vw, 36px) clamp(8px, 1.4vh, 18px);
  position: relative;
  z-index: 10;
  animation: fadeInStudio 0.3s ease-out;
  transform: none !important;
  perspective: none !important;
  filter: none !important;
  box-sizing: border-box;
}

@keyframes fadeInStudio {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.studio-workspace-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(8px, 1.3vh, 16px);
  min-height: 0;
  height: 100%;
}

/* Top Studio Navigation Bar */
.studio-top-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(6px, 0.9vh, 10px) clamp(12px, 1.4vw, 20px);
  min-height: clamp(40px, 5vh, 48px);
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.studio-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.studio-back-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-glass);
  transform: translateX(-2px);
}

.studio-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(229, 50, 45, 0.12);
  border: 1px solid rgba(229, 50, 45, 0.3);
  color: var(--text-white);
  font-size: 14px;
  font-weight: 700;
}

.studio-tool-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-red);
  box-shadow: 0 0 10px var(--primary-red);
  animation: pulse-gentle 2s infinite;
}

.studio-files-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Real-Time Live Page Size Pill in Header */
.studio-pagesize-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2.5px 8px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  margin-left: 4px;
  transition: all var(--transition-fast);
}

[data-theme="light"] .studio-pagesize-pill,
body.light-mode .studio-pagesize-pill {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
}

.studio-stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-action-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.studio-action-icon-btn:hover {
  color: var(--text-white);
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.1);
}

.studio-action-icon-btn.has-selected-delete {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
}

.studio-action-icon-btn.has-selected-delete:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #dc2626 !important;
}

/* Two-Column Studio Layout */
.studio-layout {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr minmax(310px, 370px);
  gap: clamp(12px, 1.5vw, 22px);
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

/* LEFT CANVAS */
.studio-canvas {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: clamp(12px, 1.8vh, 22px) clamp(16px, 2vw, 26px);
  box-shadow: var(--shadow-glass);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* Floating Add More Files Button (Hidden per user request) */
.studio-add-more-wrap {
  display: none !important;
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
}

.studio-add-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
}

.studio-add-more-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 50, 45, 0.5);
  box-shadow: 0 10px 24px rgba(229, 50, 45, 0.25);
}

.add-more-icon-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 10px var(--primary-red-glow);
}

.badge-count {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  padding: 0 2px;
}

/* Uploaded Files Grid */
.studio-files-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(120px, 9.5vw, 150px), 1fr));
  gap: clamp(10px, 1vw, 14px);
  margin-top: 2px;
  margin-bottom: clamp(6px, 1vh, 12px);
  align-content: flex-start;
  overflow-y: auto;
  padding: 10px 8px 10px 8px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.03);
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

/* Centered Workspace Empty State (When no files uploaded) */
.studio-files-grid.is-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-height: 280px !important;
  margin: auto 0 !important;
  width: 100% !important;
  text-align: center !important;
  overflow: visible !important;
}

.studio-empty-state-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 20px;
  margin: auto;
  max-width: 480px;
  animation: fadeIn 0.3s ease-out;
}

.studio-empty-icon-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(229, 50, 45, 0.08);
  border: 1.5px solid rgba(229, 50, 45, 0.24);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(229, 50, 45, 0.14);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-empty-icon-circle svg {
  width: 38px;
  height: 38px;
}

.studio-empty-state-wrap:hover .studio-empty-icon-circle {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 10px 28px rgba(229, 50, 45, 0.25);
}

.studio-empty-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 8px 0;
  letter-spacing: -0.2px;
}

.studio-empty-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0 0 16px 0;
  max-width: 360px;
  line-height: 1.5;
}

.studio-empty-pagesize-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-body);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.studio-empty-pagesize-tag strong {
  color: #ff524e;
  font-weight: 700;
}

/* Light / White Mode Overrides for Centered Empty State */
[data-theme="light"] .studio-empty-icon-circle,
body.light-mode .studio-empty-icon-circle {
  background: rgba(229, 50, 45, 0.08);
  border-color: rgba(229, 50, 45, 0.25);
  color: #e5322d;
  box-shadow: 0 6px 18px rgba(229, 50, 45, 0.1);
}

[data-theme="light"] .studio-empty-title,
body.light-mode .studio-empty-title {
  color: #0f172a;
}

[data-theme="light"] .studio-empty-desc,
body.light-mode .studio-empty-desc {
  color: #64748b;
}

[data-theme="light"] .studio-empty-pagesize-tag,
body.light-mode .studio-empty-pagesize-tag {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .studio-empty-pagesize-tag strong,
body.light-mode .studio-empty-pagesize-tag strong {
  color: #e5322d;
}

.studio-files-grid::-webkit-scrollbar {
  width: 6px;
}

.studio-files-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9999px;
  margin: 6px 0;
}

.studio-files-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.studio-files-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gradient);
  box-shadow: 0 0 10px rgba(229, 50, 45, 0.5);
}

/* Light / White Mode Studio Files Grid Scrollbar */
[data-theme="light"] .studio-files-grid,
body.light-mode .studio-files-grid {
  scrollbar-color: rgba(15, 23, 42, 0.22) rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .studio-files-grid::-webkit-scrollbar-track,
body.light-mode .studio-files-grid::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 9999px;
  margin: 6px 0;
}

[data-theme="light"] .studio-files-grid::-webkit-scrollbar-thumb,
body.light-mode .studio-files-grid::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 9999px;
}

[data-theme="light"] .studio-files-grid::-webkit-scrollbar-thumb:hover,
body.light-mode .studio-files-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gradient);
  box-shadow: 0 0 10px rgba(229, 50, 45, 0.35);
}

/* Studio File Card */
.studio-file-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 7px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.studio-file-card:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 50, 45, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 14px rgba(229, 50, 45, 0.12);
}

.file-card-preview-wrap {
  width: 100%;
  height: clamp(115px, 16vh, 175px);
  background: rgba(11, 16, 38, 0.85);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: clamp(4px, 0.8vh, 8px);
  transition: all 0.3s ease;
}

[data-theme="light"] .file-card-preview-wrap,
body.light-mode .file-card-preview-wrap {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

.file-card-page-thumb {
  width: clamp(75px, 9vw, 115px);
  height: clamp(100px, 13.5vh, 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.25s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 2px 5px rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
  box-sizing: border-box;
}

[data-theme="light"] .file-card-page-thumb,
body.light-mode .file-card-page-thumb {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12), 0 2px 5px rgba(15, 23, 42, 0.06);
}

/* Real-Time Landscape Orientation */
.studio-files-grid.orientation-landscape {
  grid-template-columns: repeat(auto-fill, minmax(clamp(145px, 11vw, 180px), 1fr));
}

.file-card-page-thumb.is-landscape,
.orientation-landscape .file-card-page-thumb {
  width: 124px;
  height: 86px;
}

.file-card-page-thumb.is-landscape .file-thumb-doc-sheet,
.orientation-landscape .file-thumb-doc-sheet {
  padding: 6px 10px 5px;
}

.file-card-page-thumb.is-landscape .doc-sheet-body-lines,
.orientation-landscape .doc-sheet-body-lines {
  gap: 3px;
  margin-bottom: 6px;
}

.file-card-page-thumb.is-landscape .doc-sheet-sub-line,
.orientation-landscape .doc-sheet-sub-line {
  margin-bottom: 6px;
}

/* Real-Time Page Size Dimensions (Portrait) */
.file-card-page-thumb.pagesize-a4 {
  width: 96px;
  height: 132px;
}

.file-card-page-thumb.pagesize-a3 {
  width: 106px;
  height: 144px;
}

.file-card-page-thumb.pagesize-a5 {
  width: 86px;
  height: 118px;
}

.file-card-page-thumb.pagesize-a6 {
  width: 76px;
  height: 104px;
}

.file-card-page-thumb.pagesize-letter {
  width: 102px;
  height: 128px;
}

.file-card-page-thumb.pagesize-legal {
  width: 88px;
  height: 144px;
}

.file-card-page-thumb.pagesize-tabloid {
  width: 106px;
  height: 144px;
}

.file-card-page-thumb.pagesize-executive {
  width: 92px;
  height: 130px;
}

.file-card-page-thumb.pagesize-b5 {
  width: 92px;
  height: 126px;
}

.file-card-page-thumb.pagesize-b4 {
  width: 102px;
  height: 140px;
}

.file-card-page-thumb.pagesize-statement {
  width: 86px;
  height: 122px;
}

/* Real-Time Page Size Dimensions (Landscape) */
.file-card-page-thumb.is-landscape.pagesize-a4,
.orientation-landscape .file-card-page-thumb.pagesize-a4 {
  width: 124px;
  height: 86px;
}

.file-card-page-thumb.is-landscape.pagesize-a3,
.orientation-landscape .file-card-page-thumb.pagesize-a3 {
  width: 134px;
  height: 96px;
}

.file-card-page-thumb.is-landscape.pagesize-a5,
.orientation-landscape .file-card-page-thumb.pagesize-a5 {
  width: 110px;
  height: 78px;
}

.file-card-page-thumb.is-landscape.pagesize-a6,
.orientation-landscape .file-card-page-thumb.pagesize-a6 {
  width: 98px;
  height: 70px;
}

.file-card-page-thumb.is-landscape.pagesize-letter,
.orientation-landscape .file-card-page-thumb.pagesize-letter {
  width: 124px;
  height: 96px;
}

.file-card-page-thumb.is-landscape.pagesize-legal,
.orientation-landscape .file-card-page-thumb.pagesize-legal {
  width: 134px;
  height: 80px;
}

.file-card-page-thumb.is-landscape.pagesize-tabloid,
.orientation-landscape .file-card-page-thumb.pagesize-tabloid {
  width: 134px;
  height: 96px;
}

.file-card-page-thumb.is-landscape.pagesize-executive,
.orientation-landscape .file-card-page-thumb.pagesize-executive {
  width: 120px;
  height: 84px;
}

/* Real-Time Live Page Size Tag Badge */
.file-card-pagesize-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 5.5px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  pointer-events: none;
  z-index: 5;
  transition: all var(--transition-fast);
}

[data-theme="light"] .file-card-pagesize-badge,
body.light-mode .file-card-pagesize-badge {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.16);
  color: var(--primary-red);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Real-Time Live Image Quality Tag Badge */
.file-card-quality-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 5.5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  pointer-events: none;
  z-index: 5;
  transition: all var(--transition-fast);
}

.file-card-quality-badge.quality-ultra {
  background: rgba(229, 50, 45, 0.92);
  border: 1px solid rgba(254, 202, 202, 0.5);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(229, 50, 45, 0.45);
}

.file-card-quality-badge.quality-high {
  background: rgba(14, 165, 233, 0.92);
  border: 1px solid rgba(186, 230, 253, 0.5);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.35);
}

.file-card-quality-badge.quality-original {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e2e8f0;
}

[data-theme="light"] .file-card-quality-badge.quality-ultra,
body.light-mode .file-card-quality-badge.quality-ultra {
  background: #e5322d;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(229, 50, 45, 0.25);
}

[data-theme="light"] .file-card-quality-badge.quality-high,
body.light-mode .file-card-quality-badge.quality-high {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

[data-theme="light"] .file-card-quality-badge.quality-original,
body.light-mode .file-card-quality-badge.quality-original {
  background: #475569;
  color: #ffffff;
}

/* Quality Live-Morphing on Thumbnails */
.file-card-page-thumb.quality-ultra .file-thumb-img {
  image-rendering: -webkit-optimize-contrast;
  filter: contrast(1.08) saturate(1.05);
}

.file-card-page-thumb.quality-high .file-thumb-img {
  image-rendering: auto;
  filter: contrast(1.02);
}

.file-card-page-thumb.quality-original .file-thumb-img {
  image-rendering: auto;
  filter: none;
}

/* Top Bar Quality Pill */
.studio-quality-pill.quality-ultra {
  border-color: rgba(229, 50, 45, 0.45);
  color: #ef4444;
  background: rgba(229, 50, 45, 0.12);
}

.studio-quality-pill.quality-high {
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.studio-quality-pill.quality-original {
  border-color: rgba(148, 163, 184, 0.35);
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
}

/* Real-Time Margins */
.file-card-page-thumb.margin-none {
  padding: 0;
}

.file-card-page-thumb.margin-small {
  padding: 8px;
}

.file-card-page-thumb.margin-big {
  padding: 16px;
}

.file-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  display: block;
  transition: all 0.3s ease;
}

/* Fallback Realistic Document Sheet */
.file-thumb-doc-sheet {
  width: 100%;
  height: 100%;
  background: #ffffff;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.doc-sheet-header {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 8px;
}

.doc-sheet-title-line {
  width: 65%;
  height: 6px;
  border-radius: 2px;
  margin-bottom: 5px;
  opacity: 0.85;
}

.doc-sheet-sub-line {
  width: 45%;
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  margin-bottom: 12px;
}

.doc-sheet-body-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.doc-line {
  height: 3.5px;
  border-radius: 2px;
  background: #e2e8f0;
}

.doc-sheet-table {
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #f8fafc;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}

.doc-sheet-table .table-row {
  height: 4px;
  background: #e2e8f0;
  border-radius: 1px;
}

.doc-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 6px;
  margin-top: 4px;
}

.doc-sheet-badge {
  font-size: 9px;
  font-weight: 800;
  border: 1px solid;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
}

.doc-sheet-page {
  font-size: 8.5px;
  font-weight: 600;
  color: #94a3b8;
}

/* Loading Page 1 Spinner */
.file-thumb-loading {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  box-sizing: border-box;
}

.file-thumb-loading .loading-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(229, 50, 45, 0.15);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spinLoadingThumb 0.75s linear infinite;
}

@keyframes spinLoadingThumb {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.file-thumb-loading span {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}

.file-thumb-fallback {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary-red);
  padding: 12px;
  border-radius: 4px;
}

.file-card-badge {
  display: none !important;
}

.file-card-hover-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.studio-file-card:hover .file-card-hover-actions {
  opacity: 1;
}

.card-action-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.card-action-btn:hover {
  background: var(--primary-red);
  border-color: transparent;
  transform: scale(1.1);
}

.file-card-meta {
  width: 100%;
  margin-top: 8px;
  text-align: center;
}

.file-card-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.file-card-size {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Inline Canvas Dropzone - Executive Modern Glassmorphic Centered */
.studio-canvas-dropzone {
  flex-shrink: 0;
  border: 2px dashed rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  padding: clamp(8px, 1.3vh, 16px) clamp(16px, 2vw, 28px);
  min-height: clamp(52px, 8vh, 84px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: auto;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(229, 50, 45, 0.04) 50%, rgba(15, 23, 42, 0.65) 100%);
  width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.studio-canvas-dropzone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.studio-canvas-dropzone:hover {
  border-color: var(--primary-red);
  background: linear-gradient(135deg, rgba(229, 50, 45, 0.1) 0%, rgba(255, 75, 43, 0.05) 50%, rgba(15, 23, 42, 0.75) 100%);
  box-shadow: 0 14px 36px -4px rgba(229, 50, 45, 0.28), 0 6px 18px rgba(0, 0, 0, 0.3);
  color: var(--text-white);
  transform: translateY(-2px);
}

.dropzone-inner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 18px);
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.dropzone-icon-circle {
  width: clamp(34px, 4.8vh, 48px);
  height: clamp(34px, 4.8vh, 48px);
  border-radius: clamp(10px, 1.2vw, 14px);
  background: linear-gradient(135deg, rgba(229, 50, 45, 0.18) 0%, rgba(255, 75, 43, 0.08) 100%);
  border: 1.5px solid rgba(229, 50, 45, 0.35);
  color: #ff524e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.dropzone-icon-circle svg {
  width: clamp(18px, 2.4vh, 24px);
  height: clamp(18px, 2.4vh, 24px);
}

.studio-canvas-dropzone:hover .dropzone-icon-circle {
  transform: scale(1.08) rotate(-4deg);
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 20px var(--primary-red-glow);
}

.dropzone-text-content {
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.5vh, 6px);
  align-items: center;
  text-align: center;
}

.dropzone-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  text-align: center;
}

.dropzone-main-text {
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.dropzone-browse-cta {
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 800;
  color: var(--primary-red);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all var(--transition-fast);
}

.studio-canvas-dropzone:hover .dropzone-browse-cta {
  color: #ff7673;
  text-decoration-thickness: 2px;
}

.dropzone-format-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.format-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  transition: all var(--transition-fast);
}

.format-tag.tag-pdf {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.format-tag.tag-img {
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.28);
}

.format-tag.tag-doc {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.format-tag.tag-sheet {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.format-tag.tag-more {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.studio-canvas-dropzone:hover .format-tag {
  transform: translateY(-1px);
}

/* Light Mode Overrides for Canvas Dropzone */
[data-theme="light"] .studio-canvas-dropzone,
body.light-mode .studio-canvas-dropzone {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2.4px dashed #94a3b8;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .dropzone-main-text,
body.light-mode .dropzone-main-text {
  color: #0f172a;
}

[data-theme="light"] .dropzone-browse-cta,
body.light-mode .dropzone-browse-cta {
  color: #dc2626;
}

[data-theme="light"] .format-tag.tag-pdf,
body.light-mode .format-tag.tag-pdf {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

[data-theme="light"] .format-tag.tag-img,
body.light-mode .format-tag.tag-img {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

[data-theme="light"] .format-tag.tag-doc,
body.light-mode .format-tag.tag-doc {
  background: #e0e7ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

[data-theme="light"] .format-tag.tag-sheet,
body.light-mode .format-tag.tag-sheet {
  background: #d1fae5;
  color: #059669;
  border-color: #a7f3d0;
}

[data-theme="light"] .format-tag.tag-more,
body.light-mode .format-tag.tag-more {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

/* RIGHT SIDEBAR: Stretches full height matching canvas */
.studio-sidebar {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: clamp(10px, 1.4vh, 18px) clamp(12px, 1.2vw, 18px);
  box-shadow: var(--shadow-glass);
  box-sizing: border-box;
  overflow: hidden;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.studio-sidebar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.studio-sidebar-header {
  flex-shrink: 0;
  margin-bottom: clamp(4px, 0.7vh, 8px);
  padding-bottom: clamp(4px, 0.6vh, 8px);
  border-bottom: 1px solid var(--border-glass);
}

.studio-sidebar-title {
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.studio-sidebar-desc {
  font-size: clamp(11px, 0.75vw, 12px);
  color: var(--text-muted);
  line-height: 1.35;
}

.studio-options-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(4px, 0.8vh, 10px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-right: 0px;
  width: 100%;
  box-sizing: border-box;
}

.studio-options-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* When fewer options are shown, align to start */
.studio-options-body:not(:has(> .studio-option-group:nth-child(4))) {
  justify-content: flex-start;
  gap: clamp(8px, 1.2vh, 14px);
}

.studio-option-group {
  margin-bottom: 0px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.studio-group-label {
  display: block;
  font-size: clamp(10px, 0.7vw, 11px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: clamp(2px, 0.35vh, 4px);
}

/* Segmented Cards (Orientation, Margin & Image Quality) */
.studio-segmented-cards {
  display: grid;
  gap: clamp(4px, 0.6vw, 8px);
  width: 100%;
}

.quality-cards {
  grid-template-columns: 1fr 1fr 1fr;
}

.orientation-cards {
  grid-template-columns: 1fr 1fr;
}

.margin-cards {
  grid-template-columns: 1fr 1fr 1fr;
}

.color-cards {
  grid-template-columns: 1fr 1fr;
}

.studio-segmented-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: clamp(4px, 0.6vh, 7px) 3px;
  min-height: clamp(34px, 4.5vh, 46px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-body);
  font-size: clamp(10.5px, 0.75vw, 12px);
  font-weight: 600;
  box-sizing: border-box;
}

.studio-segmented-card svg {
  width: clamp(15px, 1.8vh, 18px);
  height: clamp(15px, 1.8vh, 18px);
}

.studio-segmented-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
  color: var(--text-white);
  transform: translateY(-1px);
}

.studio-segmented-card.active {
  background: rgba(229, 50, 45, 0.12);
  border-color: var(--primary-red);
  color: var(--primary-red);
  box-shadow: 0 0 18px rgba(229, 50, 45, 0.28);
}

.card-icon-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(18px, 2.2vh, 22px);
}

.card-icon-preview svg {
  width: clamp(15px, 1.8vh, 18px);
  height: clamp(15px, 1.8vh, 18px);
}

.page-shape.portrait {
  width: 16px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.page-shape.landscape {
  width: 22px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.margin-box {
  border: 1.5px dashed currentColor;
  background: currentColor;
  opacity: 0.45;
  border-radius: 2px;
}

.margin-none .margin-box {
  width: 18px;
  height: 18px;
}

.margin-small .margin-box {
  width: 13px;
  height: 13px;
}

.margin-big .margin-box {
  width: 9px;
  height: 9px;
}

/* Custom Select Dropdown */
.studio-custom-select-wrap {
  position: relative;
}

.studio-select {
  width: 100%;
  padding: clamp(6px, 0.8vh, 9px) 12px;
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-glass);
  color: var(--text-white);
  color-scheme: dark;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-height: clamp(34px, 4.4vh, 40px);
  box-sizing: border-box;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.studio-select option,
select option {
  background-color: #121835;
  color: #f8fafc;
  padding: 10px 14px;
}

.studio-select option:checked,
select option:checked {
  background-color: #e5322d;
  color: #ffffff;
}

.studio-select:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 16px var(--primary-red-glow);
}

.select-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

/* Checkboxes */
.smart-settings-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
}

.studio-checkbox-label input[type="checkbox"] {
  display: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.studio-checkbox-label input[type="checkbox"]:checked+.custom-checkbox {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(229, 50, 45, 0.4);
}

.studio-checkbox-label input[type="checkbox"]:checked+.custom-checkbox::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.badge-mini {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.4);
  margin-left: 6px;
}

/* Quality Pills */
.studio-pill-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.pill-toggle-btn {
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: center;
}

.pill-toggle-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(229, 50, 45, 0.4);
}

/* Sidebar Footer & Primary Action Button */
.studio-sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
}

.studio-action-summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
}

[data-theme="light"] .studio-action-summary,
body.light-mode .studio-action-summary {
  color: #64748b;
}

/* Centered Large Conversion Action Bar (Below Both Studio Boxes) - Elevated slightly higher */
.studio-bottom-action-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: clamp(6px, 1vh, 12px);
  margin-bottom: 0px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 20;
}

#studioActionSummary,
.studio-action-summary {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.studio-primary-action-btn {
  width: 100%;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 24px rgba(229, 50, 45, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.studio-primary-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(229, 50, 45, 0.7), 0 0 30px rgba(244, 63, 94, 0.4);
}

.studio-btn-large {
  min-width: min(100%, 300px);
  max-width: 520px;
  width: 100%;
  padding: clamp(11px, 1.4vh, 17px) clamp(28px, 3.2vw, 52px);
  min-height: clamp(48px, 6.2vh, 64px);
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 800;
  border-radius: clamp(14px, 1.2vw, 18px);
  box-shadow: 0 10px 32px var(--primary-red-glow), 0 3px 10px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  letter-spacing: 0.3px;
  transition: all var(--transition-normal);
}

.studio-btn-large svg {
  width: clamp(20px, 2.4vh, 24px);
  height: clamp(20px, 2.4vh, 24px);
}

.studio-btn-large:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 42px rgba(229, 50, 45, 0.8), 0 0 35px rgba(244, 63, 94, 0.5);
}

.studio-btn-large:active {
  transform: translateY(0) scale(0.99);
}

/* Hide site footer and home sections when in studio view so there is NOTHING below the Convert button */
body.in-studio .site-footer,
body.in-studio footer,
body.in-studio #homeView {
  display: none !important;
}

/* Studio page: 100% full viewport height fill, zero bottom dead space across ALL screen sizes and zoom levels */
body.in-studio {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.in-studio main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

body.in-studio .studio-workspace-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: clamp(8px, 1.4vh, 18px) clamp(16px, 2.5vw, 36px) clamp(8px, 1.4vh, 18px);
  min-height: 0;
  height: calc(100vh - var(--header-height));
  box-sizing: border-box;
}

/* Fullscreen Real-Time Conversion & Success Overlay */
.studio-processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 38, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 36px 24px 60px;
  overflow-y: auto;
  will-change: opacity;
  transform: translateZ(0);
  animation: fadeInStudio 0.25s ease-out;
}

.realtime-overlay-topbar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 20px;
  flex-shrink: 0;
}

.realtime-logo {
  font-size: 26px;
  text-decoration: none;
}

.studio-processing-modal {
  max-width: 540px;
  width: 94%;
  background: var(--bg-card);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border-glass-accent);
  border-radius: 28px;
  padding: 38px 36px 30px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 50px rgba(229, 50, 45, 0.18);
  margin: auto 0;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.processing-phase {
  display: block;
  width: 100%;
}

.realtime-engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  margin-bottom: 12px;
}

.engine-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-gentle 1.4s infinite;
}

.realtime-process-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.4px;
  line-height: 1.3;
  margin: 0 0 22px;
}

/* Real-Time SVG Circular Progress Indicator (Clockwise from top, no spinning) */
.realtime-spinner-container {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.realtime-spinner-glow {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.realtime-progress-svg {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
  transform-origin: center;
}

.realtime-track-circle {
  stroke: rgba(255, 255, 255, 0.08);
}

.realtime-active-circle {
  stroke: url(#realtimeRedGrad);
  transition: stroke-dashoffset 0.25s ease-out;
  filter: drop-shadow(0 0 10px rgba(229, 50, 45, 0.65));
}

.realtime-circle-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.realtime-percent-val {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.8px;
  line-height: 1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "tnum";
}

.realtime-circle-sub {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Professional Real-Time Status & Pipeline Card */
.realtime-status-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0 18px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.status-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.status-indicator-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 4px 10px;
  border-radius: 9999px;
}

.realtime-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  position: relative;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.status-live-tag {
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.6px;
  color: #f87171;
  text-transform: uppercase;
  line-height: 1;
}

.status-speed-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 650;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 10px;
  border-radius: 9999px;
  font-feature-settings: "tnum";
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-card-body {
  margin-bottom: 12px;
}

.realtime-step-text {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--text-white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Linear Track */
.realtime-linear-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
}

.realtime-linear-fill {
  height: 100%;
  background: linear-gradient(90deg, #e5322d 0%, #ef4444 50%, #f43f5e 100%);
  width: 0%;
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 6px rgba(229, 50, 45, 0.35);
  position: relative;
  overflow: hidden;
}

.realtime-linear-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: linear-shimmer 2s infinite linear;
}

@keyframes linear-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.status-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.file-name-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 65%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 550;
}

.file-name-chip svg {
  flex-shrink: 0;
  color: #94a3b8;
}

.bytes-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-feature-settings: "tnum";
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Modal Footer */
.realtime-modal-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.realtime-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 7px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.realtime-cancel-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  transform: translateY(-1px);
}

.realtime-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
}

/* Completed Phase */
.success-icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(229, 50, 45, 0.12);
  border: 2px solid rgba(229, 50, 45, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 28px rgba(229, 50, 45, 0.35), 0 4px 14px rgba(229, 50, 45, 0.2);
  color: var(--primary-red);
  animation: successPulse 2.5s ease-in-out infinite;
}

@keyframes successPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 28px rgba(229, 50, 45, 0.35), 0 4px 14px rgba(229, 50, 45, 0.2);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(229, 50, 45, 0.55), 0 6px 20px rgba(229, 50, 45, 0.3);
  }
}

.completed-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 4px;
}

.completed-filename {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 2px;
}

.completed-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Multi-page Results Grid */
#multiPagesDownloadSection {
  transition: all var(--transition-fast);
}

.multi-pages-scroll-grid::-webkit-scrollbar {
  width: 6px;
}

.multi-pages-scroll-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9999px;
}

.multi-pages-scroll-grid::-webkit-scrollbar-thumb {
  background: rgba(229, 50, 45, 0.4);
  border-radius: 9999px;
}

.multi-pages-scroll-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(229, 50, 45, 0.7);
}

.completed-actions-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.btn-download-main {
  width: 100%;
  padding: 17px 28px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 16.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 28px var(--primary-red-glow), 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-download-main:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 36px rgba(229, 50, 45, 0.7), 0 4px 14px rgba(0, 0, 0, 0.3);
}

.btn-download-main:active {
  transform: translateY(0) scale(0.99);
}

/* Modal Top-Right Close Button (Exits to Home View & Cancels Conversion) */
.completed-close-btn,
.processing-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
}

.completed-close-btn:hover,
.processing-close-btn:hover {
  background: rgba(229, 50, 45, 0.14);
  color: var(--primary-red);
  border-color: rgba(229, 50, 45, 0.4);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 16px rgba(229, 50, 45, 0.35);
}

/* Save to Google Drive Button */
.btn-google-drive {
  width: 100%;
  padding: 15px 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border-glass);
  color: var(--text-white);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.btn-google-drive:hover {
  background: rgba(38, 132, 252, 0.14);
  border-color: #2684fc;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(38, 132, 252, 0.25);
}

.btn-google-drive:active {
  transform: translateY(0);
}

.drive-icon-svg {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Download Again Button */
.btn-download-again {
  width: 100%;
  padding: 13.5px 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-download-again:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glass-hover);
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-download-again:active {
  transform: translateY(0);
}

.btn-back-to-files {
  width: 100%;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border-glass);
  color: var(--text-white);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.btn-back-to-files:hover {
  background: rgba(229, 50, 45, 0.14);
  border-color: var(--primary-red);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(229, 50, 45, 0.25);
}

.btn-back-to-files:active {
  transform: translateY(0);
}

/* Page Sequence Bar & Visual Controls (Permanently Removed) */
.studio-sequence-bar {
  display: none !important;
}

.seq-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.seq-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(229, 50, 45, 0.14);
  border: 1px solid rgba(229, 50, 45, 0.32);
  color: var(--primary-red);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

.seq-bar-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

.seq-bar-text strong {
  color: var(--text-white);
}

.seq-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-white);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.seq-sort-btn:hover {
  background: rgba(229, 50, 45, 0.12);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* Multi-File Selection & Batch Action Toolbar */
.seq-select-all-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.seq-select-all-wrap:hover {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #38bdf8;
}

[data-theme="light"] .seq-select-all-wrap,
body.light-mode .seq-select-all-wrap {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.16);
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .seq-select-all-wrap:hover,
body.light-mode .seq-select-all-wrap:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0284c7;
}

.seq-select-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #0284c7;
  cursor: pointer;
  margin: 0;
}

.seq-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(2, 132, 199, 0.35);
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.2px;
}

[data-theme="light"] .seq-selected-badge,
body.light-mode .seq-selected-badge {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.seq-sort-btn.btn-rotate-selected {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.35);
  color: #38bdf8;
}

.seq-sort-btn.btn-rotate-selected:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

[data-theme="light"] .seq-sort-btn.btn-rotate-selected,
body.light-mode .seq-sort-btn.btn-rotate-selected {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0284c7;
}

[data-theme="light"] .seq-sort-btn.btn-rotate-selected:hover,
body.light-mode .seq-sort-btn.btn-rotate-selected:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.seq-sort-btn.btn-delete-selected {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.seq-sort-btn.btn-delete-selected:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

[data-theme="light"] .seq-sort-btn.btn-delete-selected,
body.light-mode .seq-sort-btn.btn-delete-selected {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

[data-theme="light"] .seq-sort-btn.btn-delete-selected:hover,
body.light-mode .seq-sort-btn.btn-delete-selected:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.seq-sort-btn.btn-deselect-all {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.seq-sort-btn.btn-deselect-all:hover {
  background: rgba(148, 163, 184, 0.25);
  color: #ffffff;
}

[data-theme="light"] .seq-sort-btn.btn-deselect-all,
body.light-mode .seq-sort-btn.btn-deselect-all {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.15);
  color: #64748b;
}

[data-theme="light"] .seq-sort-btn.btn-deselect-all:hover,
body.light-mode .seq-sort-btn.btn-deselect-all:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* File Card Multi-Select Checkbox Toggle - Completely hidden per user instruction in favor of Marquee Selection */
.file-card-select-toggle {
  display: none !important;
}

/* ==========================================================================
   Desktop-Style Marquee / Drag Selection Box (Neela Sa Dabba)
   ========================================================================== */
.studio-marquee-box {
  position: absolute;
  border: 1.5px solid #2563eb;
  background: rgba(37, 99, 235, 0.2);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1000;
  display: none;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.32);
  box-sizing: border-box;
}

[data-theme="light"] .studio-marquee-box,
body.light-mode .studio-marquee-box {
  border: 1.5px solid #0284c7;
  background: rgba(2, 132, 199, 0.22);
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.28);
}

body.studio-marquee-active {
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Selected Card Highlight Frame */
.studio-file-card.is-selected {
  border-color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.12) !important;
  box-shadow: 0 0 0 2.5px #0284c7, 0 10px 24px rgba(2, 132, 199, 0.28) !important;
  transform: translateY(-2px);
}

[data-theme="light"] .studio-file-card.is-selected,
body.light-mode .studio-file-card.is-selected {
  border-color: #0284c7 !important;
  background: #e0f2fe !important;
  box-shadow: 0 0 0 2.5px #0284c7, 0 8px 22px rgba(2, 132, 199, 0.22) !important;
  transform: translateY(-2px);
}

/* Move badge when select toggle is present */
.studio-file-card .file-card-pagesize-badge {
  left: 6px;
  bottom: 6px;
}

/* File Card Order Badge (#1, #2, ...) - Hidden per user request */
.file-card-order-badge {
  display: none !important;
}

/* Card Move Controls */
.card-action-btn.btn-move-left,
.card-action-btn.btn-move-right {
  background: rgba(15, 23, 42, 0.9);
}

.card-action-btn.btn-move-left:hover,
.card-action-btn.btn-move-right:hover {
  background: #2563eb;
  border-color: transparent;
}

.studio-file-card {
  cursor: grab;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.studio-file-card:active {
  cursor: grabbing;
}

.studio-file-card img,
.studio-file-card .file-thumb-img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.studio-file-card .file-card-preview-wrap,
.studio-file-card .file-card-page-thumb {
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.studio-file-card .file-card-hover-actions,
.studio-file-card .card-action-btn {
  pointer-events: auto;
}

.studio-file-card.is-dragging {
  opacity: 0.35;
  transform: scale(0.95);
  border: 1.5px dashed var(--primary-red) !important;
}

.studio-file-card.drag-target {
  border-color: var(--primary-red) !important;
  box-shadow: 0 0 22px rgba(229, 50, 45, 0.45) !important;
  transform: scale(1.02);
}

[data-theme="light"] .btn-back-to-files,
body.light-mode .btn-back-to-files {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .btn-back-to-files:hover,
body.light-mode .btn-back-to-files:hover {
  background: rgba(229, 50, 45, 0.06);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

[data-theme="light"] .btn-convert-another,
body.light-mode .btn-convert-another {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
}

[data-theme="light"] .btn-convert-another:hover,
body.light-mode .btn-convert-another:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

/* ==========================================================================
   Studio Light Mode Overrides
   ========================================================================== */
[data-theme="light"] .studio-top-bar {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .studio-back-btn {
  background: rgba(15, 23, 42, 0.03);
  color: #475569;
}

[data-theme="light"] .studio-back-btn:hover {
  background: rgba(15, 23, 42, 0.07);
  color: #0f172a;
}

[data-theme="light"] .studio-tool-badge {
  color: #0f172a;
}

[data-theme="light"] .studio-files-count {
  color: #64748b;
  border-left-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .studio-action-icon-btn {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
  color: #475569;
}

[data-theme="light"] .studio-action-icon-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

[data-theme="light"] .studio-canvas {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-glass);
}

[data-theme="light"] .studio-sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-glass);
}

[data-theme="light"] .studio-add-more-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .badge-count {
  background: var(--primary-red);
  color: #ffffff;
  border-color: #ffffff;
}

[data-theme="light"] .studio-file-card {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .studio-file-card:hover {
  border-color: rgba(229, 50, 45, 0.4);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .file-card-preview-wrap {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .file-card-name {
  color: #0f172a;
}

[data-theme="light"] .file-card-size {
  color: #64748b;
}

[data-theme="light"] .studio-canvas-dropzone,
body.light-mode .studio-canvas-dropzone {
  border: 2.4px dashed #94a3b8;
  color: #64748b;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .studio-canvas-dropzone:hover,
body.light-mode .studio-canvas-dropzone:hover {
  border-color: var(--primary-red);
  background: linear-gradient(135deg, #fffafa 0%, #fef2f2 100%);
  box-shadow: 0 14px 32px -4px rgba(229, 50, 45, 0.18), 0 6px 16px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

[data-theme="light"] .studio-sidebar-title {
  color: #0f172a;
}

[data-theme="light"] .studio-sidebar-desc {
  color: #64748b;
}

[data-theme="light"] .studio-group-label {
  color: #64748b;
}

[data-theme="light"] .studio-segmented-card {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.09);
  color: #334155;
}

[data-theme="light"] .studio-segmented-card:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

[data-theme="light"] .studio-segmented-card.active {
  background: rgba(229, 50, 45, 0.06);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

[data-theme="light"] .studio-select,
body.light-mode .studio-select,
[data-theme="light"] select,
body.light-mode select {
  background-color: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  color-scheme: light;
}

[data-theme="light"] .studio-select option,
body.light-mode .studio-select option,
[data-theme="light"] select option,
body.light-mode select option {
  background-color: #ffffff;
  color: #0f172a;
}

[data-theme="light"] .studio-checkbox-label {
  color: #334155;
}

[data-theme="light"] .custom-checkbox {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.16);
}

[data-theme="light"] .studio-pill-toggle {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .pill-toggle-btn {
  color: #64748b;
}

[data-theme="light"] .studio-action-summary {
  color: #64748b;
}

[data-theme="light"] .studio-processing-overlay {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .studio-processing-modal {
  background: #ffffff;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 25px 70px -12px rgba(15, 23, 42, 0.12), 0 0 1px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .realtime-engine-pill {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fee2e2;
}

[data-theme="light"] .realtime-process-title {
  color: #0f172a;
}

[data-theme="light"] .realtime-track-circle {
  stroke: #f1f5f9;
}

[data-theme="light"] .realtime-percent-val {
  color: #0f172a;
}

[data-theme="light"] .realtime-circle-sub {
  color: #94a3b8;
}

[data-theme="light"] .realtime-status-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 10px 25px -4px rgba(15, 23, 42, 0.07);
}

[data-theme="light"] .status-indicator-wrap {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
}

[data-theme="light"] .status-live-tag {
  color: #dc2626;
}

[data-theme="light"] .status-speed-badge {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .realtime-step-text {
  color: #0f172a;
}

[data-theme="light"] .realtime-linear-track {
  background: #e9eef5;
  border: 1px solid rgba(203, 213, 225, 0.5);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .file-name-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .file-name-chip svg {
  color: #64748b;
}

[data-theme="light"] .bytes-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .realtime-cancel-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #64748b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .realtime-cancel-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.1);
}

[data-theme="light"] .realtime-trust-badge {
  color: #059669;
}

[data-theme="light"] .completed-title {
  color: #0f172a;
}

[data-theme="light"] .completed-filename {
  color: var(--primary-red);
}

[data-theme="light"] .completed-meta {
  color: #64748b;
}

[data-theme="light"] .btn-back-to-files,
body.light-mode .btn-back-to-files {
  background: #ffffff;
  border: 1.5px solid rgba(229, 50, 45, 0.45);
  color: #c92a25;
  box-shadow: 0 3px 12px rgba(229, 50, 45, 0.08);
}

[data-theme="light"] .btn-back-to-files svg,
body.light-mode .btn-back-to-files svg {
  stroke: #c92a25;
}

[data-theme="light"] .btn-back-to-files:hover,
body.light-mode .btn-back-to-files:hover {
  background: rgba(229, 50, 45, 0.1);
  border-color: var(--primary-red);
  color: #b91c1c;
  box-shadow: 0 6px 20px rgba(229, 50, 45, 0.2);
  transform: translateY(-2px);
}

[data-theme="light"] .btn-back-to-files:hover svg,
body.light-mode .btn-back-to-files:hover svg {
  stroke: #b91c1c;
}

[data-theme="light"] .btn-sub-action {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn-sub-action:hover {
  background: #ffffff;
  border-color: rgba(229, 50, 45, 0.4);
  color: var(--primary-red);
  box-shadow: 0 4px 14px rgba(229, 50, 45, 0.15);
  transform: translateY(-1px);
}

[data-theme="light"] .completed-close-btn,
[data-theme="light"] .processing-close-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
  color: #64748b;
}

[data-theme="light"] .completed-close-btn:hover,
[data-theme="light"] .processing-close-btn:hover {
  background: rgba(229, 50, 45, 0.1);
  color: var(--primary-red);
  border-color: rgba(229, 50, 45, 0.35);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 14px rgba(229, 50, 45, 0.2);
}

[data-theme="light"] .btn-google-drive {
  background: #ffffff;
  border: 1.5px solid rgba(15, 23, 42, 0.14);
  color: #1e293b;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .btn-google-drive:hover {
  background: rgba(38, 132, 252, 0.06);
  border-color: #2684fc;
  color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(38, 132, 252, 0.18);
}

[data-theme="light"] .btn-download-again {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.13);
  color: #334155;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn-download-again:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.24);
  color: #0f172a;
  transform: translateY(-2px);
}

/* Studio Responsive Breakpoints */
@media (max-width: 860px) {
  body.in-studio {
    height: auto;
    min-height: 100vh;
  }

  body.in-studio .studio-workspace-section {
    height: auto;
    min-height: auto;
  }

  .studio-workspace-container {
    height: auto;
  }

  .studio-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    flex: none;
  }

  .studio-canvas,
  .studio-sidebar {
    min-height: auto;
    height: auto;
    max-height: none;
    flex: none;
  }

  .studio-sidebar {
    position: static;
  }
}

/* Studio Mobile Layout Optimization (<= 600px for all tools when files are uploaded) */
@media (max-width: 600px) {
  .studio-workspace-section {
    padding: 10px 8px 30px !important;
  }

  .studio-workspace-container {
    padding: 0 4px !important;
    gap: 12px !important;
  }

  /* Top Bar */
  .studio-top-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
    min-height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .studio-back-btn {
    order: 1 !important;
    padding: 6px 12px !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
    height: 34px !important;
    border-radius: 8px !important;
    gap: 5px !important;
    flex: 0 0 auto !important;
  }

  .studio-back-btn span {
    white-space: nowrap !important;
  }

  .studio-stage-actions {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
  }

  .studio-action-icon-btn {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    height: 34px !important;
    border-radius: 8px !important;
    gap: 4px !important;
  }

  .studio-action-icon-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  /* Tool Badge: full-width 2nd row with zero horizontal overflow */
  .studio-tool-badge {
    order: 3 !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 9999px !important;
    box-sizing: border-box !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    margin-top: 2px !important;
  }

  .studio-tool-dot {
    width: 7px !important;
    height: 7px !important;
    flex-shrink: 0 !important;
  }

  #studioToolTitle {
    font-size: 12.5px !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .studio-files-count {
    font-size: 11px !important;
    padding-left: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .studio-pagesize-pill {
    font-size: 10px !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .studio-pagesize-pill svg {
    width: 9.5px !important;
    height: 9.5px !important;
  }

  /* Two-column layout on mobile -> single column with 12px gap */
  .studio-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  /* Canvas */
  .studio-canvas {
    padding: 12px 10px !important;
    border-radius: 18px !important;
    min-height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .studio-files-grid,
  .studio-files-grid.orientation-landscape {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    padding: 4px 0 6px 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: 350px !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* File Card size adjustments for 3 columns on mobile */
  .studio-file-card {
    padding: 4px 3px 6px !important;
    border-radius: 9px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .file-card-preview-wrap {
    height: 90px !important;
    padding: 3px !important;
    border-radius: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .studio-file-card .file-card-page-thumb {
    width: 56px !important;
    height: 80px !important;
    max-width: 90% !important;
    max-height: 80px !important;
  }

  .studio-file-card .file-card-page-thumb.is-landscape,
  .orientation-landscape .studio-file-card .file-card-page-thumb {
    width: 76px !important;
    height: 54px !important;
    max-width: 95% !important;
    max-height: 54px !important;
  }

  .file-card-pagesize-badge {
    font-size: 8px !important;
    padding: 1px 3px !important;
    top: 2px !important;
    left: 2px !important;
    border-radius: 3px !important;
  }

  .file-card-hover-actions {
    gap: 2px !important;
    padding: 2px !important;
  }

  .card-action-btn {
    width: 20px !important;
    height: 20px !important;
    border-radius: 4px !important;
  }

  .card-action-btn svg {
    width: 10px !important;
    height: 10px !important;
  }

  .file-card-meta {
    margin-top: 3px !important;
    width: 100% !important;
    padding: 0 1px !important;
    box-sizing: border-box !important;
  }

  .file-card-name {
    font-size: 10px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    line-height: 1.25 !important;
  }

  .file-card-size {
    font-size: 9px !important;
    display: block !important;
    line-height: 1.2 !important;
  }

  /* Compact "Drop more files here" on Mobile */
  .studio-canvas-dropzone {
    padding: 6px 8px !important;
    border-radius: 10px !important;
    margin-top: 6px !important;
    min-height: 38px !important;
    border-width: 1.5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .studio-canvas-dropzone .dropzone-inner-wrap {
    gap: 8px !important;
  }

  .studio-canvas-dropzone .dropzone-icon-circle {
    width: 26px !important;
    height: 26px !important;
    border-radius: 7px !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
  }

  .studio-canvas-dropzone .dropzone-icon-circle svg {
    width: 13px !important;
    height: 13px !important;
  }

  .studio-canvas-dropzone .dropzone-text-content {
    gap: 2px !important;
  }

  .studio-canvas-dropzone .dropzone-headline {
    font-size: 11px !important;
    gap: 4px !important;
    line-height: 1.2 !important;
  }

  .studio-canvas-dropzone .dropzone-main-text {
    font-size: 11px !important;
  }

  .studio-canvas-dropzone .dropzone-browse-cta {
    font-size: 11px !important;
  }

  .studio-canvas-dropzone .dropzone-max-badge {
    font-size: 9.5px !important;
    padding: 1px 5px !important;
    margin-left: 2px !important;
  }

  .studio-canvas-dropzone .dropzone-format-tags {
    gap: 4px !important;
    margin-top: 1px !important;
  }

  .studio-canvas-dropzone .format-tag {
    font-size: 9px !important;
    padding: 1px 5px !important;
  }

  .studio-canvas-dropzone .format-tag svg {
    width: 9px !important;
    height: 9px !important;
  }

  /* Sidebar */
  .studio-sidebar {
    padding: 16px 14px !important;
    border-radius: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: auto !important;
  }

  .studio-sidebar-header {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }

  .studio-sidebar-title {
    font-size: 16px !important;
    font-weight: 750 !important;
  }

  .studio-sidebar-desc {
    font-size: 12px !important;
  }

  /* Action Button */
  .btn-convert-action,
  #studioMainActionBtn {
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    height: 46px !important;
    border-radius: 12px !important;
  }

  /* ==========================================================================
     Studio Processing & Result Modal Mobile Optimization (All Tools)
     ========================================================================== */
  /* Hide floating scroll-to-top button in studio or when overlay/modals are active */
  body.in-studio .scroll-to-top,
  body.modal-open .scroll-to-top,
  body:has(.studio-processing-overlay[style*="display: flex"]) .scroll-to-top,
  body:has(#studioProcessingOverlay:not([style*="display: none"])) .scroll-to-top,
  body:has(#toolModal.active) .scroll-to-top {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Overlay container */
  .studio-processing-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 16px 12px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100000 !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    background: rgba(15, 23, 42, 0.65) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }

  .studio-processing-overlay[style*="display: none"] {
    display: none !important;
  }

  .realtime-overlay-topbar {
    display: none !important;
  }

  .realtime-logo-wrap {
    display: none !important;
  }

  /* Modal Card - Compact, centered, fits 100% of mobile viewports */
  .studio-processing-modal {
    width: 100% !important;
    max-width: 380px !important;
    padding: 24px 18px 20px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    margin: auto !important;
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.1) !important;
  }

  body.dark-mode .studio-processing-modal,
  [data-theme="dark"] .studio-processing-modal {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  /* Modal Close Button */
  .completed-close-btn,
  .processing-close-btn {
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
  }

  .completed-close-btn svg,
  .processing-close-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* Success Icon */
  .success-icon-wrap {
    width: 62px !important;
    height: 62px !important;
    margin: 0 auto 12px !important;
    box-shadow: 0 0 28px rgba(229, 50, 45, 0.22) !important;
  }

  .success-icon-wrap svg {
    width: 32px !important;
    height: 32px !important;
  }

  /* Result Title */
  .completed-title {
    font-size: 19px !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
    font-weight: 800 !important;
  }

  /* Result Filename - Strict prevention of horizontal overflow with ellipsis */
  .completed-filename {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: var(--primary-red) !important;
    margin-bottom: 4px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-break: break-all !important;
    display: block !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
  }

  /* Result Meta */
  .completed-meta {
    font-size: 11.5px !important;
    margin-bottom: 16px !important;
    line-height: 1.4 !important;
    color: #64748b !important;
  }

  /* Actions Group */
  .completed-actions-group {
    gap: 9px !important;
    width: 100% !important;
  }

  /* 1. Download Converted File Button */
  .btn-download-main {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 14.5px !important;
    font-weight: 800 !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    gap: 8px !important;
    box-shadow: 0 8px 20px var(--primary-red-glow) !important;
  }

  .btn-download-main svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
  }

  /* 2. Save to Google Drive Button */
  .btn-google-drive {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    min-height: 42px !important;
    border-radius: 12px !important;
    gap: 8px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(15, 23, 42, 0.14) !important;
    color: #1e293b !important;
  }

  body.dark-mode .btn-google-drive,
  [data-theme="dark"] .btn-google-drive {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f1f5f9 !important;
  }

  .btn-google-drive svg {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0 !important;
  }

  /* 3. Back to Uploaded Files Button */
  .btn-back-to-files {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    min-height: 42px !important;
    border-radius: 12px !important;
    gap: 8px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(229, 50, 45, 0.3) !important;
    color: #1e293b !important;
  }

  body.dark-mode .btn-back-to-files,
  [data-theme="dark"] .btn-back-to-files {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(229, 50, 45, 0.4) !important;
    color: #f1f5f9 !important;
  }

  .btn-back-to-files svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
  }

  /* Download Again Button (if visible) */
  .btn-download-again {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    min-height: 42px !important;
    border-radius: 12px !important;
    gap: 8px !important;
  }

  /* Processing Phase (when converting) on mobile */
  .realtime-engine-pill {
    font-size: 9.5px !important;
    padding: 3px 10px !important;
    margin-bottom: 10px !important;
  }

  .realtime-process-title {
    font-size: 17px !important;
    line-height: 1.3 !important;
    margin: 0 0 14px !important;
  }

  .realtime-spinner-container {
    width: 96px !important;
    height: 96px !important;
    margin: 0 auto 14px !important;
  }

  .realtime-progress-svg {
    width: 96px !important;
    height: 96px !important;
  }

  .realtime-percent-val {
    font-size: 18px !important;
  }

  .realtime-circle-sub {
    font-size: 8.5px !important;
  }

  .realtime-status-card {
    padding: 10px 12px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
  }

  .realtime-step-text {
    font-size: 12px !important;
  }

  .status-live-tag,
  .status-speed-badge {
    font-size: 9.5px !important;
  }

  .status-speed-badge svg {
    width: 10px !important;
    height: 10px !important;
  }

  .file-name-chip,
  .bytes-chip {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .realtime-modal-footer {
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .realtime-cancel-btn {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }

  .realtime-trust-badge {
    font-size: 9.5px !important;
  }

  /* Sign PDF Dedicated Studio Workspace Mobile Optimization */
  .sign-studio-container {
    min-height: auto !important;
    border-radius: 14px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .sign-pdf-toolbar {
    padding: 8px 8px !important;
    gap: 6px !important;
    justify-content: center !important;
  }

  .sign-tb-group {
    gap: 4px !important;
    justify-content: center !important;
  }

  .sign-tb-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
  }

  .sign-page-indicator {
    font-size: 11.5px !important;
    gap: 3px !important;
  }

  .sign-page-input {
    width: 32px !important;
    padding: 2px !important;
    font-size: 11.5px !important;
  }

  .sign-hint-badge {
    font-size: 10.5px !important;
    padding: 3px 6px !important;
    text-align: center !important;
  }

  .sign-pdf-stage-scroll {
    padding: 10px 6px !important;
    min-height: auto !important;
    max-height: calc(100vh - 270px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .sign-pdf-page-wrapper {
    max-width: 100% !important;
    margin: 0 auto !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  }

  #signPdfPageCanvas {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Watermark PDF Dedicated Studio Workspace Mobile Optimization */
  .watermark-studio-container {
    min-height: auto !important;
    border-radius: 14px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .watermark-pdf-toolbar {
    padding: 8px 8px !important;
    gap: 6px !important;
    justify-content: center !important;
  }

  .watermark-pdf-stage-scroll {
    padding: 10px 6px !important;
    min-height: auto !important;
    max-height: calc(100vh - 270px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .watermark-pdf-page-wrapper {
    max-width: 100% !important;
    margin: 0 auto !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  }

  #watermarkPdfPageCanvas {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Crop PDF Dedicated Studio Workspace Mobile Optimization */
  body.in-crop-studio .crop-studio-container {
    min-height: 400px !important;
    height: auto !important;
    border-radius: 14px !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .crop-studio-container {
    min-height: auto;
    border-radius: 14px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* Universal collapse for inactive studio containers on mobile */
  .sign-studio-container[style*="display: none"],
  .watermark-studio-container[style*="display: none"],
  .crop-studio-container[style*="display: none"],
  .split-pdf-studio-container[style*="display: none"],
  .compare-studio-container[style*="display: none"],
  .remove-pages-studio-container[style*="display: none"] {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  body.in-crop-studio .studio-canvas {
    min-height: 400px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
  }

  .crop-pdf-toolbar {
    padding: 8px 8px !important;
    gap: 6px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 44px !important;
  }

  .crop-pdf-toolbar .sign-tb-group {
    gap: 4px !important;
    justify-content: center !important;
  }

  .crop-pdf-toolbar .sign-tb-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
  }

  .crop-pdf-toolbar .sign-page-indicator {
    font-size: 11.5px !important;
    gap: 3px !important;
  }

  .crop-pdf-toolbar .sign-page-input {
    width: 32px !important;
    padding: 2px !important;
    font-size: 11.5px !important;
  }

  .crop-pdf-stage-scroll {
    padding: 10px 6px !important;
    min-height: 350px !important;
    max-height: calc(100vh - 270px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex: none !important;
  }

  .crop-pdf-page-wrapper {
    max-width: 100% !important;
    margin: 0 auto !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    position: relative !important;
  }

  #cropPdfPageCanvas {
    max-width: 100% !important;
    display: block !important;
  }

  .crop-files-bottom-strip {
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  /* Touch-friendly crop handles for mobile */
  .crop-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    touch-action: none !important;
  }
  .handle-nw { top: -9px !important; left: -9px !important; }
  .handle-n  { top: -9px !important; left: calc(50% - 9px) !important; }
  .handle-ne { top: -9px !important; right: -9px !important; }
  .handle-e  { top: calc(50% - 9px) !important; right: -9px !important; }
  .handle-se { bottom: -9px !important; right: -9px !important; }
  .handle-s  { bottom: -9px !important; left: calc(50% - 9px) !important; }
  .handle-sw { bottom: -9px !important; left: -9px !important; }
  .handle-w  { top: calc(50% - 9px) !important; left: -9px !important; }

  #cropOverlay {
    touch-action: none !important;
  }
}

/* ==========================================================================
   12. Floating Scroll-to-Top Button with Circular Progress Indicator
   ========================================================================== */
.scroll-to-top {
  position: fixed;
  bottom: 84px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(13, 20, 44, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 16px rgba(229, 50, 45, 0.22);
  cursor: pointer;
  z-index: 1200;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(14px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.scroll-to-top:hover {
  background: rgba(18, 27, 60, 0.98);
  border-color: rgba(229, 50, 45, 0.55);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 24px rgba(229, 50, 45, 0.45);
  transform: scale(1.08) translateY(-3px);
}

.scroll-to-top:active {
  transform: scale(0.96) translateY(0);
}

/* Circular SVG Progress Ring */
.scroll-progress-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  /* Starts fill from 12 o'clock (top) */
  pointer-events: none;
}

.progress-track {
  stroke: rgba(255, 255, 255, 0.12);
  transition: stroke 0.2s ease;
}

.progress-fill {
  stroke: #e5322d;
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 0.08s linear;
  filter: drop-shadow(0 0 4px rgba(229, 50, 45, 0.5));
}

/* Centered Up Arrow Icon */
.scroll-arrow-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
  transition: color 0.2s ease;
}

.scroll-arrow-icon svg {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-to-top:hover .scroll-arrow-icon svg {
  transform: translateY(-2px);
}

/* ==========================================================================
   Scroll-to-Top - Light Mode Overrides
   ========================================================================== */
[data-theme="light"] .scroll-to-top,
body.light-mode .scroll-to-top {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

[data-theme="light"] .scroll-to-top:hover,
body.light-mode .scroll-to-top:hover {
  background: #ffffff !important;
  border-color: rgba(229, 50, 45, 0.45) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16), 0 0 20px rgba(229, 50, 45, 0.28) !important;
}

[data-theme="light"] .progress-track,
body.light-mode .progress-track {
  stroke: rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] .progress-fill,
body.light-mode .progress-fill {
  stroke: #e5322d !important;
  filter: drop-shadow(0 0 3px rgba(229, 50, 45, 0.35)) !important;
}

[data-theme="light"] .scroll-arrow-icon,
body.light-mode .scroll-arrow-icon {
  color: #0f172a !important;
}

[data-theme="light"] .scroll-to-top:hover .scroll-arrow-icon,
body.light-mode .scroll-to-top:hover .scroll-arrow-icon {
  color: #e5322d !important;
}

@media (max-width: 640px) {
  .scroll-to-top {
    bottom: 84px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   ConvertPro Apps & Ecosystem Dropdown Menu
   ========================================================================== */
.apps-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 290px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 20px rgba(229, 50, 45, 0.15);
  padding: 12px;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.apps-dropdown.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.apps-dropdown-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 6px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.apps-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.18s ease;
  background: transparent;
}

.app-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.app-item-icon {
  font-size: 20px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.app-item-meta {
  display: flex;
  flex-direction: column;
}

.app-item .app-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}

.app-item .app-sub {
  font-size: 11px;
  color: #94a3b8;
}

/* Light Theme overrides for Apps Dropdown */
[data-theme="light"] .apps-dropdown,
body.light-mode .apps-dropdown {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14), 0 0 25px rgba(229, 50, 45, 0.08) !important;
}

[data-theme="light"] .apps-dropdown-header,
body.light-mode .apps-dropdown-header {
  color: #64748b !important;
  border-bottom-color: #f1f5f9 !important;
}

[data-theme="light"] .app-item:hover,
body.light-mode .app-item:hover {
  background: #f8fafc !important;
}

[data-theme="light"] .app-item-icon,
body.light-mode .app-item-icon {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .app-item .app-name,
body.light-mode .app-item .app-name {
  color: #0f172a !important;
}

[data-theme="light"] .app-item .app-sub,
body.light-mode .app-item .app-sub {
  color: #64748b !important;
}

/* --------------------------------------------------------------------------
   Compress PDF Target MB Options & Custom Input Styling
   -------------------------------------------------------------------------- */
.compress-opt-card {
  padding: 13px 15px !important;
  text-align: left !important;
  align-items: stretch !important;
  min-height: auto !important;
}

.compress-opt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.compress-opt-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-white);
  transition: color var(--transition-fast);
}

.compress-mb-badge {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(229, 50, 45, 0.12);
  border: 1px solid rgba(229, 50, 45, 0.3);
  color: var(--primary-red);
  font-feature-settings: 'tnum';
  letter-spacing: -0.2px;
  flex-shrink: 0;
}

.compress-mb-badge.custom-badge {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.compress-opt-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
  display: block;
}

.custom-mb-container {
  margin-top: 10px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-glass);
  border-radius: 12px;
  transition: all var(--transition-fast);
  animation: fadeInDown 0.25s ease-out;
}

.custom-mb-input-row {
  display: flex;
  align-items: center;
  position: relative;
  gap: 8px;
}

.custom-mb-input {
  width: 100%;
  padding: 10px 48px 10px 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  outline: none;
  font-feature-settings: 'tnum';
  transition: all var(--transition-fast);
}

.custom-mb-input:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 12px rgba(229, 50, 45, 0.25);
  background: rgba(255, 255, 255, 0.09);
}

.custom-mb-unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  pointer-events: none;
}

.quick-mb-chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.quick-mb-chip {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-mb-chip:hover {
  background: rgba(229, 50, 45, 0.15);
  border-color: var(--primary-red);
  color: #ffffff;
  transform: translateY(-1px);
}

.unit-toggle-btn {
  background: transparent;
  color: var(--text-muted);
  outline: none;
}

.unit-toggle-btn.active {
  background: var(--primary-red) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(229, 50, 45, 0.4);
}

.custom-target-ok-btn {
  background: var(--primary-red);
  color: #ffffff;
  outline: none;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.custom-target-ok-btn:hover {
  background: #dc2626 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 50, 45, 0.45) !important;
}

.custom-target-ok-btn:active {
  transform: translateY(0);
}

.custom-mb-container.active-custom-box {
  border-color: var(--primary-red) !important;
  box-shadow: 0 0 14px rgba(229, 50, 45, 0.22) !important;
}

[data-theme="light"] .custom-mb-container.active-custom-box,
body.light-mode .custom-mb-container.active-custom-box {
  border-color: var(--primary-red) !important;
  box-shadow: 0 0 14px rgba(229, 50, 45, 0.15) !important;
}

.compress-target-summary {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Light Mode Overrides for Compress PDF */
[data-theme="light"] .compress-opt-title,
body.light-mode .compress-opt-title {
  color: #0f172a !important;
}

[data-theme="light"] .custom-mb-container,
body.light-mode .custom-mb-container {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .custom-mb-input,
body.light-mode .custom-mb-input {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .custom-mb-unit,
body.light-mode .custom-mb-unit {
  color: #64748b !important;
}

[data-theme="light"] .quick-mb-chip,
body.light-mode .quick-mb-chip {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

[data-theme="light"] .quick-mb-chip:hover,
body.light-mode .quick-mb-chip:hover {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
  color: #dc2626 !important;
}

[data-theme="light"] .compress-mb-badge.custom-badge,
body.light-mode .compress-mb-badge.custom-badge {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

[data-theme="light"] .custom-unit-switcher,
body.light-mode .custom-unit-switcher {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .unit-toggle-btn,
body.light-mode .unit-toggle-btn {
  color: #64748b !important;
}

[data-theme="light"] .unit-toggle-btn.active,
body.light-mode .unit-toggle-btn.active {
  color: #ffffff !important;
}

/* ==========================================================================
   Sign PDF Studio Controls & Theme Adaptation (Light / Dark Mode)
   ========================================================================== */
.sign-mode-pills {
  display: flex;
  background: var(--bg-card, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.sign-mode-pill {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sign-mode-pill:hover {
  color: var(--text-primary, #0f172a);
}

.sign-mode-pill.active {
  background: #0284c7;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.sign-field-card-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-glass, rgba(0, 0, 0, 0.1));
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #0f172a) !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sign-field-card-btn span {
  color: var(--text-primary, #0f172a) !important;
}

.sign-field-card-btn:hover {
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.sign-tb-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-glass, rgba(0, 0, 0, 0.1));
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #0f172a) !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sign-tb-btn:hover {
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}

[data-theme="light"] .sign-field-card-btn,
body.light-mode .sign-field-card-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .sign-field-card-btn span,
body.light-mode .sign-field-card-btn span {
  color: #0f172a !important;
}

[data-theme="light"] .sign-tb-btn,
body.light-mode .sign-tb-btn {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="dark"] .sign-field-card-btn,
body.dark-mode .sign-field-card-btn {
  background: rgba(30, 41, 59, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .sign-field-card-btn span,
body.dark-mode .sign-field-card-btn span {
  color: #f8fafc !important;
}

/* ==========================================================================
   Unlock PDF Professional Security & Decryption Styles
   ========================================================================== */
.unlock-status-card {
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.unlock-status-card.unprotected {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.unlock-status-card.protected {
  background: rgba(229, 50, 45, 0.08);
  border: 1px solid rgba(229, 50, 45, 0.35);
}

.unlock-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.unlock-status-badge.unprotected-badge {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .unlock-status-badge.unprotected-badge,
body.dark-mode .unlock-status-badge.unprotected-badge {
  color: #fbbf24;
}

.unlock-status-badge.protected-badge {
  background: rgba(229, 50, 45, 0.16);
  color: #ef4444;
  border: 1px solid rgba(229, 50, 45, 0.35);
}

.unlock-status-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text-primary, #0f172a);
}

.unlock-status-desc {
  font-size: 12.5px;
  color: var(--text-secondary, #475569);
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.unlock-action-hint {
  font-size: 12px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-left: 3px solid #f59e0b;
  margin-bottom: 12px;
  line-height: 1.45;
}

[data-theme="dark"] .unlock-action-hint,
body.dark-mode .unlock-action-hint {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
}

.unlock-choose-encrypted-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.unlock-choose-encrypted-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
  filter: brightness(1.06);
}

.unlock-audit-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-glass, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
  padding: 10px 12px;
}

[data-theme="dark"] .unlock-audit-list,
body.dark-mode .unlock-audit-list {
  background: rgba(255, 255, 255, 0.03);
}

.unlock-audit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-secondary, #64748b);
}

.unlock-audit-item strong {
  color: #10b981;
  font-weight: 600;
}

.unlock-permissions-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-glass, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
  padding: 10px 12px;
}

[data-theme="dark"] .unlock-permissions-grid,
body.dark-mode .unlock-permissions-grid {
  background: rgba(255, 255, 255, 0.03);
}

.unlock-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.unlock-checkbox-row input[type="checkbox"] {
  accent-color: var(--primary-red, #e5322d);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ==========================================================================
   ConvertPro Studio Options Enhancement Suite
   (Protect PDF, Page Numbers, Repair PDF, PDF/A, Organize PDF)
   ========================================================================== */

/* --- Professional Protect & Unlock PDF Layout (iLovePDF Style) --- */
.protect-pro-group,
.unlock-pro-group {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.protect-pro-box,
.unlock-pro-box {
  display: flex !important;
  align-items: stretch !important;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  height: 50px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.protect-pro-box:focus-within,
.unlock-pro-box:focus-within {
  border-color: #e5322d !important;
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.16) !important;
}

.protect-pro-box.has-error,
.unlock-pro-box.has-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

[data-theme="dark"] .protect-pro-box,
body.dark-mode .protect-pro-box,
[data-theme="dark"] .unlock-pro-box,
body.dark-mode .unlock-pro-box {
  background: rgba(30, 41, 59, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .protect-pro-box:focus-within,
body.dark-mode .protect-pro-box:focus-within,
[data-theme="dark"] .unlock-pro-box:focus-within,
body.dark-mode .unlock-pro-box:focus-within {
  border-color: #e5322d !important;
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.25) !important;
}

.protect-pro-lock,
.unlock-pro-lock {
  width: 46px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  background: transparent;
}

[data-theme="dark"] .protect-pro-lock,
body.dark-mode .protect-pro-lock,
[data-theme="dark"] .unlock-pro-lock,
body.dark-mode .unlock-pro-lock {
  color: #94a3b8;
}

.protect-pro-input,
.unlock-pro-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 12px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  font-family: inherit !important;
  box-sizing: border-box;
  height: 100% !important;
}

[data-theme="dark"] .protect-pro-input,
body.dark-mode .protect-pro-input,
[data-theme="dark"] .unlock-pro-input,
body.dark-mode .unlock-pro-input {
  color: #f8fafc !important;
}

.protect-pro-btn,
.unlock-pro-btn {
  width: 52px;
  background: #e5322d !important;
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  flex-shrink: 0;
  padding: 0 !important;
  margin: 0 !important;
  transition: background-color 0.2s ease;
}

.protect-pro-btn:hover,
.unlock-pro-btn:hover {
  background: #dc2626 !important;
}

.protect-pro-btn:active,
.unlock-pro-btn:active {
  background: #b91c1c !important;
}

.protect-pro-match-track {
  height: 4px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

[data-theme="dark"] .protect-pro-match-track,
body.dark-mode .protect-pro-match-track {
  background: rgba(255, 255, 255, 0.12);
}

.protect-pro-match-bar {
  height: 100%;
  width: 0%;
  background: #e5322d;
  transition: width 0.25s ease, background-color 0.25s ease;
}

@keyframes unlockShakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake-error {
  animation: unlockShakeError 0.4s ease-in-out !important;
}

/* --- Password Field with Show/Hide Eye Toggle --- */
.studio-pw-field-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.studio-pw-input {
  width: 100% !important;
  padding: 11px 42px 11px 14px !important;
  font-family: inherit;
  font-size: 13.5px;
  box-sizing: border-box;
}

.studio-pw-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.studio-pw-toggle-btn:hover {
  color: var(--text-white, #ffffff);
  background: rgba(255, 255, 255, 0.08);
}

/* --- Password Strength Meter --- */
.studio-pw-meter-wrap {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
}

[data-theme="dark"] .studio-pw-meter-wrap,
body.dark-mode .studio-pw-meter-wrap {
  background: rgba(255, 255, 255, 0.03);
}

.studio-pw-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 5px;
}

.studio-pw-meter-title {
  color: var(--text-muted, #94a3b8);
}

.studio-pw-meter-status {
  font-weight: 700;
  color: #ef4444;
  transition: color 0.2s ease;
}

.studio-pw-meter-track {
  display: flex;
  gap: 4px;
  height: 4px;
  width: 100%;
}

.studio-pw-meter-seg {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color 0.25s ease;
}

/* Strength states */
.studio-pw-meter-wrap[data-strength="weak"] .studio-pw-meter-seg:nth-child(1) { background: #ef4444; }
.studio-pw-meter-wrap[data-strength="weak"] .studio-pw-meter-status { color: #ef4444; }

.studio-pw-meter-wrap[data-strength="medium"] .studio-pw-meter-seg:nth-child(1),
.studio-pw-meter-wrap[data-strength="medium"] .studio-pw-meter-seg:nth-child(2) { background: #f59e0b; }
.studio-pw-meter-wrap[data-strength="medium"] .studio-pw-meter-status { color: #f59e0b; }

.studio-pw-meter-wrap[data-strength="strong"] .studio-pw-meter-seg:nth-child(1),
.studio-pw-meter-wrap[data-strength="strong"] .studio-pw-meter-seg:nth-child(2),
.studio-pw-meter-wrap[data-strength="strong"] .studio-pw-meter-seg:nth-child(3) { background: #10b981; }
.studio-pw-meter-wrap[data-strength="strong"] .studio-pw-meter-status { color: #10b981; }

.studio-pw-meter-wrap[data-strength="strongest"] .studio-pw-meter-seg:nth-child(1),
.studio-pw-meter-wrap[data-strength="strongest"] .studio-pw-meter-seg:nth-child(2),
.studio-pw-meter-wrap[data-strength="strongest"] .studio-pw-meter-seg:nth-child(3),
.studio-pw-meter-wrap[data-strength="strongest"] .studio-pw-meter-seg:nth-child(4) { background: #059669; }
.studio-pw-meter-wrap[data-strength="strongest"] .studio-pw-meter-status { color: #059669; }

/* --- Permissions Box --- */
.studio-perms-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 12px;
}

[data-theme="dark"] .studio-perms-card,
body.dark-mode .studio-perms-card {
  background: rgba(255, 255, 255, 0.03);
}

.studio-perm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

[data-theme="dark"] .studio-perm-item,
body.dark-mode .studio-perm-item {
  color: var(--text-white, #f8fafc);
}

.studio-perm-item input[type="checkbox"] {
  accent-color: var(--primary-red, #e5322d);
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* --- Page Numbers 6-Position Grid & Live Preview Box --- */
.page-numbers-pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.page-num-pos-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  color: var(--text-muted, #94a3b8);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  line-height: 1.25;
}

.page-num-pos-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white, #ffffff);
  border-color: rgba(255, 255, 255, 0.2);
}

.page-num-pos-btn.active {
  background: rgba(229, 50, 45, 0.14) !important;
  border-color: var(--primary-red, #e5322d) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(229, 50, 45, 0.25);
}

.page-num-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  margin-top: 10px;
}

[data-theme="dark"] .page-num-preview-container,
body.dark-mode .page-num-preview-container {
  background: rgba(255, 255, 255, 0.02);
}

.page-num-sheet-mock {
  position: relative;
  width: 140px;
  height: 180px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.page-num-mock-lines {
  position: absolute;
  top: 24px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.page-num-mock-line {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
}

.page-num-mock-line.short { width: 60%; }
.page-num-mock-line.heading { height: 7px; width: 45%; background: #94a3b8; margin-bottom: 4px; }

.page-num-stamp-target {
  position: absolute;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  padding: 2px 5px;
  background: rgba(229, 50, 45, 0.12);
  border: 1px dashed #e5322d;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

/* Positioning targets in mock sheet */
.page-num-stamp-target[data-pos="top-left"] { top: 8px; left: 8px; }
.page-num-stamp-target[data-pos="top-center"] { top: 8px; left: 50%; transform: translateX(-50%); }
.page-num-stamp-target[data-pos="top-right"] { top: 8px; right: 8px; }
.page-num-stamp-target[data-pos="bottom-left"] { bottom: 8px; left: 8px; }
.page-num-stamp-target[data-pos="bottom-center"] { bottom: 8px; left: 50%; transform: translateX(-50%); }
.page-num-stamp-target[data-pos="bottom-right"] { bottom: 8px; right: 8px; }

/* --- Repair PDF Honest Bullets --- */
.repair-honest-list {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.repair-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-white, #f8fafc);
  line-height: 1.4;
}

.repair-bullet-icon {
  color: #38bdf8;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- PDF/A Neutral Archival Standard Card --- */
.pdfa-card-neutral {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.pdfa-card-neutral:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.pdfa-card-neutral.active {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: #10b981 !important;
}

.pdfa-check-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.pdfa-card-neutral.active .pdfa-check-circle {
  border-color: #10b981;
  background: #10b981;
  color: #ffffff;
}

/* ==========================================================================
   Convert Pro - Split PDF Dedicated Workspace & Options Styles
   Exact match to Reference Images 1 & 2 with App Design System Integration
   ========================================================================== */

/* Main Canvas Container */
.split-pdf-studio-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  gap: 22px;
  padding: 10px 16px 40px;
  box-sizing: border-box;
}

/* Subtitle */
.split-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-align: center;
  letter-spacing: 0.2px;
}

/* Uploaded PDF Card */
.split-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card, #171e35);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-md, 12px);
  padding: 12px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.split-file-thumb {
  width: 44px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.split-file-thumb img,
.split-file-thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.split-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.split-file-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-white, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-file-meta {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}

.split-replace-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-white, #ffffff);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.split-replace-btn:hover {
  background: rgba(229, 50, 45, 0.12);
  border-color: var(--primary-red, #e5322d);
  color: var(--primary-red, #e5322d);
}

/* Range Preview Container (Image 2) */
.split-ranges-preview-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.split-range-preview-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.split-range-preview-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-white, #ffffff);
  text-align: center;
  letter-spacing: 0.3px;
}

/* Dashed Box per Image 2 */
.split-range-preview-box {
  width: 100%;
  border: 1.5px dashed rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: rgba(15, 23, 42, 0.35);
  min-height: 250px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.split-preview-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.split-page-thumb-card {
  width: 148px;
  height: 208px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

.split-page-thumb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.split-page-thumb-card img,
.split-page-thumb-card canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.split-page-number {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-white, #ffffff);
}

/* Middle dots in range preview */
.split-preview-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  padding: 0 8px;
}

.split-preview-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-white, #ffffff);
  display: inline-block;
  opacity: 0.9;
}

/* Error Card (Corrupted / Encrypted PDF) */
.split-error-card {
  width: 100%;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}

.split-error-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-error-title {
  font-size: 16px;
  font-weight: 700;
  color: #ef4444;
}

.split-error-desc {
  font-size: 13.5px;
  color: var(--text-body, #cbd5e1);
  max-width: 480px;
  line-height: 1.5;
}

/* ==========================================================================
   Right Panel ("Split" Options) Styles (Image 1)
   ========================================================================== */
.split-options-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden !important;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.split-options-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-white, #ffffff);
  text-align: center;
  letter-spacing: -0.2px;
  margin: 0 0 2px 0;
  flex-shrink: 0 !important;
}

/* Tabs: Range vs Pages vs Size */
.split-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.14));
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0 !important;
  min-height: 64px !important;
}

.split-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted, #94a3b8);
  min-width: 0;
  min-height: 64px !important;
  flex-shrink: 0 !important;
  box-sizing: border-box;
}

.split-tab:last-child {
  border-right: none;
}

.split-tab.active {
  background: var(--bg-card, #171e35);
  color: var(--text-white, #ffffff);
}

.studio-sidebar:has(.split-options-wrap) .studio-sidebar-header {
  display: none !important;
}

.studio-sidebar:has(.split-options-wrap) .studio-options-body {
  justify-content: flex-start !important;
  gap: 0 !important;
}

.split-tab-check-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.split-tab-crown-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #f59e0b;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.45);
}

.split-unit-btn {
  background: transparent;
  color: var(--text-muted, #94a3b8);
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.split-unit-btn.active {
  background: var(--primary-red, #e5322d);
  color: #ffffff;
}

html[data-theme="light"] .split-unit-btn,
html.light .split-unit-btn,
body.light-mode .split-unit-btn {
  color: #64748b;
}

html[data-theme="light"] .split-unit-btn.active,
html.light .split-unit-btn.active,
body.light-mode .split-unit-btn.active {
  background: #e5322d;
  color: #ffffff;
}

.split-tab-icon {
  width: 32px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.split-tab-label {
  font-size: 13.5px;
  font-weight: 600;
}

/* Range Mode Selector */
.split-mode-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.split-mode-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white, #ffffff);
}

.split-mode-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.split-mode-btn {
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted, #94a3b8);
}

.split-mode-btn.active {
  border-color: var(--primary-red, #e5322d);
  color: var(--primary-red, #e5322d);
  background: rgba(229, 50, 45, 0.08);
}

/* Custom Ranges List */
.split-ranges-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.split-range-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
}

.split-range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.split-range-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-light, #f1f5f9);
}

.split-range-pill {
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border-radius: 4px;
  padding: 1px 7px;
}

.split-range-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.split-range-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* Two Connected Side-by-Side Inputs */
.split-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.split-input-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease;
}

.split-input-box:focus-within {
  border-color: var(--primary-red, #e5322d);
}

.split-input-box.has-error {
  border-color: #ef4444 !important;
}

.split-input-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  white-space: nowrap;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.split-num-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-white, #ffffff);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 8px 6px;
  outline: none;
}

.split-inline-error {
  font-size: 11.5px;
  font-weight: 600;
  color: #ef4444;
  margin-top: 2px;
}

/* Overlap Warning Banner */
.split-warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

/* "+ Add Range" Outlined Button */
.split-add-range-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid var(--primary-red, #e5322d);
  border-radius: 8px;
  background: transparent;
  color: var(--primary-red, #e5322d);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.split-add-range-btn:hover {
  background: rgba(229, 50, 45, 0.1);
  transform: translateY(-1px);
}

/* Checkbox Row */
.split-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.split-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-red, #e5322d);
  cursor: pointer;
  border-radius: 4px;
}

.split-checkbox-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body, #cbd5e1);
  cursor: pointer;
}

/* Fixed Mode Group */
.split-fixed-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
}

/* Pages Tab Box */
.split-pages-info-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  text-align: center;
  flex-shrink: 0 !important;
}

.split-pages-info-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-white, #ffffff);
}

.split-pages-info-desc {
  font-size: 12.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}

/* Dynamic Helper Text Banner */
.split-helper-banner {
  font-size: 12.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  border-left: 3px solid var(--primary-red, #e5322d);
  flex-shrink: 0 !important;
}

/* Pages Tab PNG Logo (Direct Transparent, No Box) */
.split-pages-logo-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 0 0;
  margin: 0 auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}

.split-pages-logo-img {
  width: 100%;
  max-width: 140px;
  max-height: 140px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 6px 16px rgba(229, 50, 45, 0.4));
  transition: transform 0.3s ease;
}

.split-pages-logo-img:hover {
  transform: translateY(-2px) scale(1.03);
}

/* Primary Red Split PDF Action Button */
.split-execute-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #e5322d 0%, #f43f5e 100%);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(229, 50, 45, 0.45);
  transition: all 0.22s ease;
  margin-top: 6px;
}

.split-execute-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 50, 45, 0.65);
}

.split-execute-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

/* ==========================================================================
   Light Mode Theme Adaptation for Split PDF
   ========================================================================== */
html[data-theme="light"] .split-subtitle,
html.light .split-subtitle,
body.light-mode .split-subtitle {
  color: #64748b;
}

html[data-theme="light"] .split-file-card,
html.light .split-file-card,
body.light-mode .split-file-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .split-file-name,
html.light .split-file-name,
body.light-mode .split-file-name {
  color: #0f172a;
}

html[data-theme="light"] .split-file-meta,
html.light .split-file-meta,
body.light-mode .split-file-meta {
  color: #64748b;
}

html[data-theme="light"] .split-replace-btn,
html.light .split-replace-btn,
body.light-mode .split-replace-btn {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

html[data-theme="light"] .split-replace-btn:hover,
html.light .split-replace-btn:hover,
body.light-mode .split-replace-btn:hover {
  background: rgba(229, 50, 45, 0.08);
  border-color: #e5322d;
  color: #e5322d;
}

html[data-theme="light"] .split-range-preview-title,
html.light .split-range-preview-title,
body.light-mode .split-range-preview-title {
  color: #0f172a;
}

html[data-theme="light"] .split-range-preview-box,
html.light .split-range-preview-box,
body.light-mode .split-range-preview-box {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] .split-page-number,
html.light .split-page-number,
body.light-mode .split-page-number {
  color: #1e293b;
}

html[data-theme="light"] .split-preview-dots span,
html.light .split-preview-dots span,
body.light-mode .split-preview-dots span {
  background-color: #0f172a;
}

html[data-theme="light"] .split-options-title,
html.light .split-options-title,
body.light-mode .split-options-title {
  color: #0f172a;
}

html[data-theme="light"] .split-tabs,
html.light .split-tabs,
body.light-mode .split-tabs {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

html[data-theme="light"] .split-tab,
html.light .split-tab,
body.light-mode .split-tab {
  border-color: #e2e8f0;
  color: #64748b;
}

html[data-theme="light"] .split-tab.active,
html.light .split-tab.active,
body.light-mode .split-tab.active {
  background: #ffffff;
  color: #0f172a;
}

html[data-theme="light"] .split-mode-label,
html.light .split-mode-label,
body.light-mode .split-mode-label {
  color: #0f172a;
}

html[data-theme="light"] .split-mode-btn,
html.light .split-mode-btn,
body.light-mode .split-mode-btn {
  background: #f1f5f9;
  color: #64748b;
  border-color: transparent;
}

html[data-theme="light"] .split-mode-btn.active,
html.light .split-mode-btn.active,
body.light-mode .split-mode-btn.active {
  background: #ffffff;
  border-color: #e5322d;
  color: #e5322d;
  box-shadow: 0 2px 8px rgba(229, 50, 45, 0.1);
}

html[data-theme="light"] .split-range-item,
html.light .split-range-item,
body.light-mode .split-range-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .split-range-title-wrap,
html.light .split-range-title-wrap,
body.light-mode .split-range-title-wrap {
  color: #1e293b;
}

html[data-theme="light"] .split-input-box,
html.light .split-input-box,
body.light-mode .split-input-box {
  background: #ffffff;
  border-color: #cbd5e1;
}

html[data-theme="light"] .split-input-label,
html.light .split-input-label,
body.light-mode .split-input-label {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

html[data-theme="light"] .split-num-input,
html.light .split-num-input,
body.light-mode .split-num-input {
  color: #0f172a;
}

html[data-theme="light"] .split-checkbox-text,
html.light .split-checkbox-text,
body.light-mode .split-checkbox-text {
  color: #334155;
}

html[data-theme="light"] .split-fixed-group,
html.light .split-fixed-group,
body.light-mode .split-fixed-group,
html[data-theme="light"] .split-pages-info-box,
html.light .split-pages-info-box,
body.light-mode .split-pages-info-box {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .split-pages-info-title,
html.light .split-pages-info-title,
body.light-mode .split-pages-info-title {
  color: #0f172a;
}

html[data-theme="light"] .split-helper-banner,
html.light .split-helper-banner,
body.light-mode .split-helper-banner {
  background: #f1f5f9;
  color: #475569;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .split-range-preview-box {
    gap: 16px;
    padding: 20px 14px;
  }
  .split-page-thumb-card {
    width: 110px;
    height: 154px;
  }
  .split-inputs-row {
    grid-template-columns: 1fr;
  }
}

/* Universal collapse for inactive studio containers (Global) */
.sign-studio-container[style*="display: none"],
.watermark-studio-container[style*="display: none"],
.crop-studio-container[style*="display: none"],
.split-pdf-studio-container[style*="display: none"],
.compare-studio-container[style*="display: none"],
.remove-pages-studio-container[style*="display: none"] {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   Sign PDF Dedicated Studio Workspace (Full-Width Interactive Canvas)
   ========================================================================== */
.sign-studio-container {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  flex: 1 1 auto;
  min-height: 580px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sign-studio-container,
body.light-mode .sign-studio-container {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.sign-pdf-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}

[data-theme="light"] .sign-pdf-toolbar,
body.light-mode .sign-pdf-toolbar {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

.sign-tb-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sign-tb-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sign-tb-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.sign-tb-btn.danger-btn:hover {
  background: rgba(229, 50, 45, 0.3);
  border-color: #e5322d;
}

[data-theme="light"] .sign-tb-btn,
body.light-mode .sign-tb-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}

[data-theme="light"] .sign-tb-btn:hover,
body.light-mode .sign-tb-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-theme="light"] .sign-tb-btn.danger-btn:hover,
body.light-mode .sign-tb-btn.danger-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

.sign-page-indicator {
  font-size: 12px;
  color: #ffffff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="light"] .sign-page-indicator,
body.light-mode .sign-page-indicator {
  color: #1e293b;
}

.sign-page-input {
  width: 38px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
  padding: 2px 4px;
}

[data-theme="light"] .sign-page-input,
body.light-mode .sign-page-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.sign-hint-badge {
  font-size: 12px;
  color: #38bdf8;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

[data-theme="light"] .sign-hint-badge,
body.light-mode .sign-hint-badge {
  color: #0284c7;
}

.sign-pdf-stage-scroll {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 520px;
  max-height: 75vh;
  overflow: auto;
  background: #0b1120;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

[data-theme="light"] .sign-pdf-stage-scroll,
body.light-mode .sign-pdf-stage-scroll {
  background: #f1f5f9;
}

.sign-pdf-page-wrapper {
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  background: #ffffff;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  margin: 0 auto;
}

[data-theme="light"] .sign-pdf-page-wrapper,
body.light-mode .sign-pdf-page-wrapper {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

#signPdfPageCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

#signPdfAnnotationOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.sign-annotation-item {
  position: absolute;
  border: 2px dashed #0284c7;
  background: rgba(2, 132, 199, 0.08);
  cursor: grab;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 4px;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  touch-action: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.sign-annotation-item:hover,
.sign-annotation-item.active-item {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4);
}

.sign-annotation-item:active,
.sign-annotation-item.is-dragging {
  cursor: grabbing !important;
  border-color: #e5322d;
  box-shadow: 0 8px 24px rgba(229, 50, 45, 0.35);
}

.sign-annotation-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  -webkit-user-drag: none;
}

.sign-annotation-item span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-weight: 700;
  line-height: 1.2;
}

.sign-resize-handle {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 14px;
  height: 14px;
  background: #0284c7;
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: se-resize;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sign-item-ctrls {
  position: absolute;
  top: -28px;
  right: 0;
  display: none;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 2px;
  gap: 3px;
  z-index: 10;
}

.sign-annotation-item:hover .sign-item-ctrls,
.sign-annotation-item.active-item .sign-item-ctrls {
  display: inline-flex;
}

.sign-ctrl-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}

.sign-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sign-ctrl-btn.del-btn:hover {
  background: #dc2626;
}

.sign-field-card-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.sign-field-card-btn:hover {
  background: rgba(2, 132, 199, 0.15);
  border-color: #0284c7;
  transform: translateY(-1px);
}

[data-theme="light"] .sign-field-card-btn,
body.light-mode .sign-field-card-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sign-field-card-btn:hover,
body.light-mode .sign-field-card-btn:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
  color: #0284c7;
}

.sign-security-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #ffffff;
  cursor: pointer;
}

[data-theme="light"] .sign-security-label,
body.light-mode .sign-security-label {
  color: #1e293b;
}

/* ==========================================================================
   Watermark PDF Dedicated Studio Workspace (Interactive Draggable Watermark)
   ========================================================================== */
.watermark-studio-container {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  flex: 1 1 auto;
  min-height: 580px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .watermark-studio-container,
body.light-mode .watermark-studio-container {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.watermark-pdf-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}

[data-theme="light"] .watermark-pdf-toolbar,
body.light-mode .watermark-pdf-toolbar {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

.watermark-pdf-stage-scroll {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 12px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 520px;
  max-height: 75vh;
  overflow: auto;
  background: #0b1120;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

[data-theme="light"] .watermark-pdf-stage-scroll,
body.light-mode .watermark-pdf-stage-scroll {
  background: #f1f5f9;
}

.watermark-pdf-page-wrapper {
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  background: #ffffff;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  margin: 0 auto;
}

[data-theme="light"] .watermark-pdf-page-wrapper,
body.light-mode .watermark-pdf-page-wrapper {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

#watermarkPdfPageCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

#watermarkPdfAnnotationOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  overflow: hidden;
  z-index: 15;
}

/* Interactive Draggable Watermark Stamp Box */
.watermark-drag-item {
  position: absolute;
  border: 2px dashed #0284c7;
  background: rgba(2, 132, 199, 0.12);
  cursor: grab;
  border-radius: 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 10px 22px;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  touch-action: none;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  z-index: 20;
}

.watermark-drag-item:hover,
.watermark-drag-item.is-active {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35), 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 1 !important;
}

.watermark-drag-item.is-dragging {
  cursor: grabbing !important;
  border-color: var(--primary-red) !important;
  box-shadow: 0 12px 32px rgba(229, 50, 45, 0.35) !important;
  opacity: 1 !important;
}

.watermark-drag-label {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: none;
  line-height: 1.1;
  text-align: center;
}

.watermark-drag-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
  pointer-events: none;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

/* Watermark Interactive Rotation Handle (Mouse Rotation) */
.watermark-rotate-stem {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 2px;
  height: 18px;
  background: #0284c7;
  transform: translateX(-50%);
  pointer-events: none;
}

.watermark-rotate-handle {
  position: absolute;
  top: -38px;
  left: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  cursor: grab;
  pointer-events: auto;
  z-index: 30;
  transition: transform 0.15s ease, background 0.15s ease;
}

.watermark-rotate-handle:hover,
.watermark-rotate-handle.is-rotating {
  background: var(--primary-red);
  transform: translateX(-50%) scale(1.22);
  cursor: grabbing;
}

.watermark-angle-badge {
  position: absolute;
  top: -64px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
}

.watermark-rotate-handle.is-rotating ~ .watermark-angle-badge,
.watermark-drag-item.is-rotating .watermark-angle-badge {
  display: block;
}

/* Watermark Font Options Grid */
.watermark-font-pill {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all var(--transition-fast);
  text-align: left;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.watermark-font-pill:hover {
  border-color: rgba(2, 132, 199, 0.5);
  background: rgba(2, 132, 199, 0.08);
}

.watermark-font-pill.active {
  border-color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.18) !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35);
  color: #ffffff;
}

[data-theme="light"] .watermark-font-pill,
body.light-mode .watermark-font-pill {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  color: #1e293b;
}

[data-theme="light"] .watermark-font-pill.active,
body.light-mode .watermark-font-pill.active {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

/* Rotate PDF Range Chips */
.rotate-range-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.rotate-range-chip:hover {
  background: rgba(229, 50, 45, 0.12);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

[data-theme="light"] .rotate-range-chip,
body.light-mode .rotate-range-chip {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.1);
  color: #334155;
}

[data-theme="light"] .rotate-range-chip:hover,
body.light-mode .rotate-range-chip:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

/* ==========================================================================
   Organize PDF Pro Sidebar & Tool Controls
   ========================================================================== */
.organize-pdf-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.organize-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-sizing: border-box;
  min-height: 36px;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.organize-btn:hover:not(:disabled):not(.is-disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-glass-hover);
  color: var(--text-white);
  transform: translateY(-1px);
}

.organize-btn:active:not(:disabled):not(.is-disabled) {
  transform: translateY(0);
}

.organize-btn:disabled,
.organize-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.organize-btn.primary-action {
  background: rgba(229, 50, 45, 0.12);
  border-color: rgba(229, 50, 45, 0.4);
  color: var(--primary-red);
}

.organize-btn.primary-action:hover:not(:disabled):not(.is-disabled) {
  background: var(--primary-red);
  color: #ffffff;
  border-color: var(--primary-red);
}

.organize-btn.danger-action {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.organize-btn.danger-action:hover:not(:disabled):not(.is-disabled) {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

[data-theme="light"] .organize-btn,
body.light-mode .organize-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .organize-btn:hover:not(:disabled):not(.is-disabled),
body.light-mode .organize-btn:hover:not(:disabled):not(.is-disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-theme="light"] .organize-btn.primary-action,
body.light-mode .organize-btn.primary-action {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #e5322d;
}

[data-theme="light"] .organize-btn.primary-action:hover:not(:disabled):not(.is-disabled),
body.light-mode .organize-btn.primary-action:hover:not(:disabled):not(.is-disabled) {
  background: #e5322d;
  color: #ffffff;
  border-color: #e5322d;
}

[data-theme="light"] .organize-btn.danger-action,
body.light-mode .organize-btn.danger-action {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

[data-theme="light"] .organize-btn.danger-action:hover:not(:disabled):not(.is-disabled),
body.light-mode .organize-btn.danger-action:hover:not(:disabled):not(.is-disabled) {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* ==========================================================================
   Compare PDF Tool - Dedicated Styles & Comparison Viewer
   100% Theme-Compatible (Light & Dark)
   ========================================================================== */

.compare-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.compare-doc-badge.is-original {
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(37, 99, 235, 0.35);
}
.compare-doc-badge.is-modified {
  background: rgba(229, 50, 45, 0.15);
  color: #e5322d;
  border: 1px solid rgba(229, 50, 45, 0.35);
}

.compare-option-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.compare-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Compare PDF Custom Options Tabs & Controls */
.compare-sidebar-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  margin-bottom: 14px;
}
[data-theme="light"] .compare-sidebar-tabs,
body.light-mode .compare-sidebar-tabs {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.compare-sidebar-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}
.compare-sidebar-tab:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}
[data-theme="light"] .compare-sidebar-tab,
body.light-mode .compare-sidebar-tab {
  color: #64748b;
}
[data-theme="light"] .compare-sidebar-tab:hover,
body.light-mode .compare-sidebar-tab:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}
.compare-sidebar-tab.active {
  background: #e5322d;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(229, 50, 45, 0.35);
}

.compare-tab-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  line-height: 1.2;
}

.compare-tab-pane {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.compare-tab-pane.active {
  display: flex;
  animation: compareFadeIn 0.2s ease forwards;
}

@keyframes compareFadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.compare-preset-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.compare-preset-chip {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.compare-preset-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-white);
}
[data-theme="light"] .compare-preset-chip,
body.light-mode .compare-preset-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}
[data-theme="light"] .compare-preset-chip:hover,
body.light-mode .compare-preset-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.compare-preset-chip.active {
  background: rgba(229, 50, 45, 0.15) !important;
  border-color: rgba(229, 50, 45, 0.45) !important;
  color: #e5322d !important;
  font-weight: 700;
}

.compare-swap-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  padding: 0 4px;
}
.compare-swap-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: #e5322d;
  background: rgba(229, 50, 45, 0.08);
  border: 1px solid rgba(229, 50, 45, 0.25);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.compare-swap-btn:hover {
  background: rgba(229, 50, 45, 0.16);
  border-color: #e5322d;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(229, 50, 45, 0.2);
}
[data-theme="light"] .compare-swap-btn,
body.light-mode .compare-swap-btn {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}
[data-theme="light"] .compare-swap-btn:hover,
body.light-mode .compare-swap-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

.compare-toggle-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
  display: block;
}

.compare-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}
.compare-toggle-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="light"] .compare-toggle-item,
body.light-mode .compare-toggle-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}
[data-theme="light"] .compare-toggle-item:hover,
body.light-mode .compare-toggle-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.compare-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-white);
}
[data-theme="light"] .compare-toggle-label,
body.light-mode .compare-toggle-label {
  color: #1e293b;
}

.compare-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.compare-dot.dot-added { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.compare-dot.dot-removed { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.compare-dot.dot-modified { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.compare-dot.dot-visual { background: #8b5cf6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.4); }
.compare-dot.dot-page { background: #06b6d4; box-shadow: 0 0 6px rgba(6, 182, 212, 0.4); }

.compare-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: grid;
  place-content: center;
  flex-shrink: 0;
}
.compare-checkbox:checked {
  background: #e5322d;
  border-color: #e5322d;
}
.compare-checkbox:checked::before {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
[data-theme="light"] .compare-checkbox,
body.light-mode .compare-checkbox {
  border-color: #94a3b8;
}

/* Accordion */
.compare-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.compare-accordion-header:hover {
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .compare-accordion-header,
body.light-mode .compare-accordion-header {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}
.compare-accordion-chevron {
  transition: transform 0.25s ease;
}
.compare-accordion-header.active .compare-accordion-chevron {
  transform: rotate(180deg);
}
.compare-accordion-body {
  display: none;
  padding-top: 10px;
}
.compare-accordion-body.open {
  display: block;
}

/* Comparison Studio Viewport Stage */
.compare-studio-container {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  position: relative;
}
[data-theme="light"] .compare-studio-container,
body.light-mode .compare-studio-container {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.compare-viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border-glass);
}
[data-theme="light"] .compare-viewer-topbar,
body.light-mode .compare-viewer-topbar {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.compare-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.compare-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.compare-back-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
[data-theme="light"] .compare-back-btn,
body.light-mode .compare-back-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.compare-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
}
.compare-stat-pill.pill-add { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.compare-stat-pill.pill-rem { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.compare-stat-pill.pill-mod { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.compare-stat-pill.pill-vis { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.3); }

.compare-download-dropdown-wrap {
  position: relative;
}

.compare-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #e5322d;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 50, 45, 0.3);
  transition: all 0.2s ease;
}
.compare-download-btn:hover {
  background: #dc2626;
  box-shadow: 0 6px 16px rgba(229, 50, 45, 0.4);
}

.compare-download-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 260px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 100;
}
.compare-download-menu.show {
  display: flex;
}
[data-theme="light"] .compare-download-menu,
body.light-mode .compare-download-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}
.compare-download-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
[data-theme="light"] .compare-download-menu button,
body.light-mode .compare-download-menu button {
  color: #1e293b;
}
.compare-download-menu button:hover {
  background: rgba(229, 50, 45, 0.12);
  color: #e5322d;
}

/* Modes Bar */
.compare-modes-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 10px;
}
[data-theme="light"] .compare-modes-bar,
body.light-mode .compare-modes-bar {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
}

.compare-mode-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compare-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.compare-mode-tab:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}
.compare-mode-tab.active {
  color: #ffffff;
  background: #e5322d;
  border-color: #e5322d;
}
[data-theme="light"] .compare-mode-tab,
body.light-mode .compare-mode-tab {
  color: #64748b;
}
[data-theme="light"] .compare-mode-tab:hover,
body.light-mode .compare-mode-tab:hover {
  color: #0f172a;
  background: #e2e8f0;
}
[data-theme="light"] .compare-mode-tab.active,
body.light-mode .compare-mode-tab.active {
  color: #ffffff;
  background: #e5322d;
  border-color: #e5322d;
}

/* Nav & Zoom Toolbar */
.compare-nav-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compare-tool-btn {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-white);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.compare-tool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .compare-tool-btn,
body.light-mode .compare-tool-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

/* Main Split Stage */
.compare-main-stage {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* Left Drawer: Differences Explorer */
.compare-diff-drawer {
  width: 270px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[data-theme="light"] .compare-diff-drawer,
body.light-mode .compare-diff-drawer {
  background: #fafafa;
  border-right-color: #e2e8f0;
}

.compare-drawer-header {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
[data-theme="light"] .compare-drawer-header,
body.light-mode .compare-drawer-header {
  border-bottom-color: #e2e8f0;
}

.compare-diff-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-diff-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.compare-diff-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}
[data-theme="light"] .compare-diff-item,
body.light-mode .compare-diff-item {
  background: #ffffff;
  border-color: #e2e8f0;
}
[data-theme="light"] .compare-diff-item:hover,
body.light-mode .compare-diff-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.compare-diff-item.is-added { border-left: 3px solid #10b981; }
.compare-diff-item.is-removed { border-left: 3px solid #ef4444; }
.compare-diff-item.is-modified { border-left: 3px solid #f59e0b; }
.compare-diff-item.is-visual { border-left: 3px solid #8b5cf6; }

.compare-diff-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.compare-diff-item-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.compare-diff-item-type.type-added { color: #10b981; }
.compare-diff-item-type.type-removed { color: #ef4444; }
.compare-diff-item-type.type-modified { color: #f59e0b; }
.compare-diff-item-type.type-visual { color: #8b5cf6; }

.compare-diff-item-page {
  font-size: 10px;
  color: var(--text-muted);
}
.compare-diff-item-snippet {
  font-size: 11.5px;
  color: var(--text-white);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="light"] .compare-diff-item-snippet,
body.light-mode .compare-diff-item-snippet {
  color: #1e293b;
}

/* Viewport Area */
.compare-viewport-wrapper {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto !important;
  overflow-x: auto;
  display: block;
  padding: 24px 20px;
  background: rgba(0, 0, 0, 0.15);
  scrollbar-width: thin;
  scrollbar-color: #e5322d rgba(255, 255, 255, 0.08);
}
.compare-viewport-wrapper::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.compare-viewport-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 6px;
}
.compare-viewport-wrapper::-webkit-scrollbar-thumb {
  background: #e5322d;
  border-radius: 6px;
}
.compare-viewport-wrapper::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}
[data-theme="light"] .compare-viewport-wrapper,
body.light-mode .compare-viewport-wrapper {
  background: #f1f5f9;
  scrollbar-color: #e5322d #e2e8f0;
}
[data-theme="light"] .compare-viewport-wrapper::-webkit-scrollbar-track,
body.light-mode .compare-viewport-wrapper::-webkit-scrollbar-track {
  background: #e2e8f0;
}

/* Side by side layout - Multi-Page Continuous Stack */
.compare-side-by-side-stage {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  align-items: center;
  transition: all 0.2s ease;
}

.compare-page-row {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: center;
  align-items: flex-start;
  scroll-margin-top: 16px;
}

.compare-page-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 580px;
  transition: max-width 0.2s ease;
}

.compare-col-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
}
[data-theme="light"] .compare-col-header,
body.light-mode .compare-col-header {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

.compare-canvas-box {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.compare-canvas-box img {
  display: block;
  width: 100%;
  height: auto;
}

/* Page Placeholder for Mismatched Page Counts */
.compare-page-placeholder {
  min-height: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border-radius: 8px;
  border: 2px dashed rgba(229, 50, 45, 0.4);
  background: rgba(229, 50, 45, 0.03);
}
.compare-page-placeholder.is-added {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.03);
}
.compare-page-placeholder .ph-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.compare-page-placeholder.is-removed .ph-tag {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.compare-page-placeholder.is-added .ph-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.compare-page-placeholder p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.5;
  margin: 0;
}

/* Collapsible Differences Drawer */
.compare-diff-drawer {
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.compare-diff-drawer.is-collapsed {
  width: 44px !important;
  min-width: 44px !important;
}
.compare-diff-drawer.is-collapsed .compare-diff-list,
.compare-diff-drawer.is-collapsed [data-filter] {
  display: none !important;
}
.compare-diff-drawer.is-collapsed .compare-drawer-header {
  padding: 10px 4px;
  justify-content: center;
}
.compare-diff-drawer.is-collapsed .compare-drawer-header span {
  display: none;
}
.compare-drawer-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.compare-drawer-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-white);
}
[data-theme="light"] .compare-drawer-toggle-btn,
body.light-mode .compare-drawer-toggle-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}
[data-theme="light"] .compare-drawer-toggle-btn:hover,
body.light-mode .compare-drawer-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Fullscreen Mode */
.compare-studio-container.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  border: none !important;
}
.compare-studio-container.is-fullscreen .compare-viewport-wrapper.is-fit-page .compare-canvas-box img {
  max-height: calc(100vh - 170px);
}

/* Toolbar Divider */
.cmp-toolbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 4px;
}
[data-theme="light"] .cmp-toolbar-divider,
body.light-mode .cmp-toolbar-divider {
  background: #cbd5e1;
}

/* Bottom Action Bar for Comparison Results (Drop-Up CTA Architecture) - STRICTLY only in Compare PDF viewer */
.compare-bottom-action-bar {
  display: none !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 6px;
  position: relative;
  animation: fadeInStudio 0.25s ease-out;
}

body.compare-viewer-active .compare-bottom-action-bar {
  display: flex !important;
}

body.compare-viewer-active #studioConvertBtn {
  display: none !important;
}

.compare-dropup-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.compare-primary-download-btn {
  box-shadow: 0 10px 32px var(--primary-red-glow), 0 3px 10px rgba(0, 0, 0, 0.28);
  gap: 12px;
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  min-width: min(100%, 340px);
}

.compare-dropup-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 4px;
  opacity: 0.95;
}

.compare-primary-download-btn.is-active .compare-dropup-chevron {
  transform: rotate(180deg);
}

/* Upward-Opening Drop-Up Popover Menu */
.compare-dropup-menu {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(12px) scale(0.96);
  width: 420px;
  max-width: min(94vw, 440px);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.25);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
}

.compare-dropup-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

[data-theme="light"] .compare-dropup-menu,
body.light-mode .compare-dropup-menu {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.18), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.compare-dropup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}
[data-theme="light"] .compare-dropup-header,
body.light-mode .compare-dropup-header {
  border-bottom-color: #f1f5f9;
}

.compare-dropup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-white);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}
[data-theme="light"] .compare-dropup-item,
body.light-mode .compare-dropup-item {
  color: #1e293b;
}

.compare-dropup-item:hover {
  background: rgba(229, 50, 45, 0.09);
  border-color: rgba(229, 50, 45, 0.25);
  transform: translateX(2px);
}

.compare-dropup-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(229, 50, 45, 0.12);
  color: #e5322d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compare-dropup-item-text {
  flex: 1 1 auto;
  min-width: 0;
}
.compare-dropup-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.25;
}
[data-theme="light"] .compare-dropup-item-title,
body.light-mode .compare-dropup-item-title {
  color: #0f172a;
}
.compare-dropup-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 2px;
}

.compare-dropup-badge {
  font-size: 10px;
  font-weight: 800;
  color: #e5322d;
  background: rgba(229, 50, 45, 0.1);
  border: 1px solid rgba(229, 50, 45, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.compare-dropup-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 4px 6px;
}
[data-theme="light"] .compare-dropup-divider,
body.light-mode .compare-dropup-divider {
  background: #f1f5f9;
}

.compare-dropup-item-sub {
  flex: 1 1 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-white);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
[data-theme="light"] .compare-dropup-item-sub,
body.light-mode .compare-dropup-item-sub {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.compare-dropup-item-sub:hover {
  background: rgba(229, 50, 45, 0.1);
  border-color: rgba(229, 50, 45, 0.3);
  color: #e5322d;
}

/* Compare Viewer Active Layout on Studio Section - Zero Page Scrollbar, 100% Responsive at Any Scale/DPI */
body.in-studio.compare-viewer-active {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
}
body.in-studio.compare-viewer-active .studio-workspace-section {
  height: calc(100vh - var(--header-height)) !important;
  max-height: calc(100vh - var(--header-height)) !important;
  min-height: 0 !important;
  padding: 6px clamp(12px, 2vw, 24px) 8px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.in-studio.compare-viewer-active .studio-workspace-container {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  gap: 6px !important;
  overflow: hidden !important;
  justify-content: space-between !important;
}
body.in-studio.compare-viewer-active .studio-layout {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  align-items: stretch !important;
  overflow: hidden !important;
}
body.in-studio.compare-viewer-active .studio-canvas {
  flex: 1 1 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  padding: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
}
[data-theme="dark"] body.in-studio.compare-viewer-active .studio-canvas,
body.dark.in-studio.compare-viewer-active .studio-canvas {
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.in-studio.compare-viewer-active .compare-studio-container {
  flex: 1 1 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  border: none !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: none !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
body.in-studio.compare-viewer-active .compare-viewer-topbar {
  flex-shrink: 0 !important;
  padding: 8px 16px !important;
}
body.in-studio.compare-viewer-active .compare-modes-bar {
  flex-shrink: 0 !important;
  padding: 6px 16px !important;
}
body.in-studio.compare-viewer-active .compare-main-stage {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
}
body.in-studio.compare-viewer-active .compare-diff-drawer {
  height: 100% !important;
  overflow-y: auto !important;
}
body.in-studio.compare-viewer-active .compare-viewport-wrapper {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
}
body.in-studio.compare-viewer-active .studio-sidebar {
  flex: 1 1 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.in-studio.compare-viewer-active .studio-sidebar-header {
  flex-shrink: 0 !important;
}
body.in-studio.compare-viewer-active .studio-options-scrollable {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}
body.in-studio.compare-viewer-active .studio-bottom-action-bar {
  flex-shrink: 0 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: 6px !important;
  margin-bottom: 2px !important;
  padding: 0 !important;
}
body.in-studio.compare-viewer-active .compare-bottom-action-bar {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

.compare-highlight-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.compare-box-highlight {
  position: absolute;
  border-radius: 3px;
  pointer-events: auto;
  transition: all 0.2s ease;
}
.compare-box-highlight.box-added {
  border: 1.5px solid #10b981;
  background: rgba(16, 185, 129, 0.2);
}
.compare-box-highlight.box-removed {
  border: 1.5px solid #ef4444;
  background: rgba(239, 68, 68, 0.2);
}
.compare-box-highlight.box-modified {
  border: 1.5px solid #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}
.compare-box-highlight.box-visual {
  border: 1.5px dashed #8b5cf6;
  background: rgba(139, 92, 246, 0.18);
}
.compare-box-highlight:hover {
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(229, 50, 45, 0.5);
  z-index: 10;
}

/* Overlay Mode */
.compare-overlay-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.compare-overlay-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 16px;
  border-radius: 9999px;
  border: 1px solid var(--border-glass);
}
[data-theme="light"] .compare-overlay-slider-wrap,
body.light-mode .compare-overlay-slider-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
}

/* Text Diff Mode */
.compare-text-stage {
  width: 100%;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
[data-theme="light"] .compare-text-stage,
body.light-mode .compare-text-stage {
  background: #ffffff;
  border-color: #e2e8f0;
}
.compare-text-block {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.compare-text-block.diff-added {
  background: rgba(16, 185, 129, 0.12);
  border-left: 3px solid #10b981;
  color: #10b981;
}
.compare-text-block.diff-removed {
  background: rgba(239, 68, 68, 0.12);
  border-left: 3px solid #ef4444;
  color: #ef4444;
  text-decoration: line-through;
}
.compare-text-block.diff-modified {
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
  color: #f59e0b;
}

/* ==========================================================================
   Crop PDF Dedicated Studio Workspace (Interactive Real-Time Crop Engine)
   ========================================================================== */
body.in-crop-studio .studio-canvas {
  padding: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  overflow: hidden !important;
}
[data-theme="dark"] body.in-crop-studio .studio-canvas,
body.dark.in-crop-studio .studio-canvas {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.crop-studio-container {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  flex: 1 1 auto;
  min-height: 580px;
  background: rgba(15, 23, 42, 0.75);
  border: none !important;
  border-radius: var(--radius-xl) !important;
  overflow: hidden;
  box-shadow: none !important;
  position: relative;
}
[data-theme="light"] .crop-studio-container,
body.light-mode .crop-studio-container {
  background: #ffffff;
}

.crop-pdf-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 8px 16px;
  height: 48px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}
[data-theme="light"] .crop-pdf-toolbar,
body.light-mode .crop-pdf-toolbar {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.1);
}
@media (max-width: 1100px) {
  .crop-pdf-toolbar .sign-hint-badge {
    display: none !important;
  }
}

/* Scrollable PDF Stage (Centers 1 complete page cleanly; supports smooth Zoom In & Out) */
.crop-pdf-stage-scroll {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 20px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 480px;
  overflow: auto;
  background: #0b1120;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #e5322d rgba(255, 255, 255, 0.08);
}
.crop-pdf-stage-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
.crop-pdf-stage-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}
.crop-pdf-stage-scroll::-webkit-scrollbar-thumb {
  background: #e5322d;
  border-radius: 6px;
}
.crop-pdf-stage-scroll::-webkit-scrollbar-thumb:hover {
  background: #ff433e;
}
[data-theme="light"] .crop-pdf-stage-scroll,
body.light-mode .crop-pdf-stage-scroll {
  background: #f1f5f9;
}
[data-theme="light"] .crop-pdf-stage-scroll::-webkit-scrollbar-track,
body.light-mode .crop-pdf-stage-scroll::-webkit-scrollbar-track {
  background: #e2e8f0;
}

/* PDF Page Canvas Wrapper */
.crop-pdf-page-wrapper {
  position: relative;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  background: #ffffff;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  margin: 0 auto;
  display: inline-block;
  flex-shrink: 0;
  transition: width 0.1s ease, height 0.1s ease;
}
[data-theme="light"] .crop-pdf-page-wrapper,
body.light-mode .crop-pdf-page-wrapper {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.15);
}

#cropPdfPageCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Annotation & Crop Overlay */
#cropOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  overflow: hidden;
  z-index: 15;
  cursor: crosshair;
}

/* Interactive Crop Box */
.crop-box {
  position: absolute;
  border: 2px solid #e5322d;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  pointer-events: auto;
  cursor: move;
  box-sizing: border-box;
  touch-action: none;
  z-index: 20;
  transition: border-color 0.1s ease;
}
.crop-box.is-dragging {
  border-color: #ff4742;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
}

/* Rule of Thirds Guidelines inside Crop Box */
.crop-grid-line {
  position: absolute;
  pointer-events: none;
  border-style: dashed;
  border-color: rgba(229, 50, 45, 0.4);
}
.crop-grid-h1 { top: 33.333%; left: 0; right: 0; border-top-width: 1px; }
.crop-grid-h2 { top: 66.666%; left: 0; right: 0; border-top-width: 1px; }
.crop-grid-v1 { left: 33.333%; top: 0; bottom: 0; border-left-width: 1px; }
.crop-grid-v2 { left: 66.666%; top: 0; bottom: 0; border-left-width: 1px; }

/* 8 Resizing Handles */
.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2px solid #e5322d;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  z-index: 30;
  box-sizing: border-box;
}
.crop-handle:hover {
  background: #e5322d;
  transform: scale(1.15);
}
.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.handle-n  { top: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.handle-e  { top: calc(50% - 6px); right: -6px; cursor: ew-resize; }
.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.handle-s  { bottom: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.handle-w  { top: calc(50% - 6px); left: -6px; cursor: ew-resize; }

/* Floating Dimension Badge */
.crop-dim-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Sidebar Margin Stepper Controls */
.crop-margin-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.crop-margin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.crop-margin-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}
.crop-stepper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  overflow: hidden;
}
[data-theme="light"] .crop-stepper,
body.light-mode .crop-stepper {
  background: #ffffff;
  border-color: #cbd5e1;
}
.crop-stepper button {
  width: 28px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
[data-theme="light"] .crop-stepper button,
body.light-mode .crop-stepper button {
  color: #1e293b;
}
.crop-stepper button:hover {
  background: rgba(255, 255, 255, 0.12);
}
.crop-stepper input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-white);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  padding: 4px;
}
[data-theme="light"] .crop-stepper input,
body.light-mode .crop-stepper input {
  color: #1e293b;
}
.crop-stepper .crop-unit-text {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding-right: 6px;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.crop-quick-action-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.crop-action-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.crop-action-mini-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}
[data-theme="light"] .crop-action-mini-btn,
body.light-mode .crop-action-mini-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
[data-theme="light"] .crop-action-mini-btn:hover,
body.light-mode .crop-action-mini-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}
.crop-action-mini-btn.active {
  border-color: #e5322d !important;
  color: #e5322d !important;
  background: rgba(229, 50, 45, 0.1) !important;
}

/* Crop PDF Unit Switcher Pill Group */
.crop-unit-pill-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
[data-theme="light"] .crop-unit-pill-group,
body.light-mode .crop-unit-pill-group {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Crop PDF Unit Switcher Pill */
.crop-unit-pill {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.crop-unit-pill:hover {
  color: var(--text-white);
}
[data-theme="light"] .crop-unit-pill:hover,
body.light-mode .crop-unit-pill:hover {
  color: #0f172a;
}
.crop-unit-pill.active {
  background: #e5322d !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(229, 50, 45, 0.4);
}

/* Live Dimension Summary Card */
.crop-dimension-summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
}
[data-theme="light"] .crop-dimension-summary-card,
body.light-mode .crop-dimension-summary-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* Scope Option Cards (All Pages / Current Page / Range) */
.crop-scope-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}
.crop-scope-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.crop-scope-option.active {
  border-color: #e5322d !important;
  background: rgba(229, 50, 45, 0.08) !important;
}
[data-theme="light"] .crop-scope-option,
body.light-mode .crop-scope-option {
  background: #ffffff;
  border-color: #e2e8f0;
}
[data-theme="light"] .crop-scope-option:hover,
body.light-mode .crop-scope-option:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
[data-theme="light"] .crop-scope-option.active,
body.light-mode .crop-scope-option.active {
  background: rgba(229, 50, 45, 0.06) !important;
  border-color: #e5322d !important;
}
.crop-scope-radio-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.crop-scope-option.active .crop-scope-radio-circle {
  border-color: #e5322d;
  background: #e5322d;
}
.crop-scope-option.active .crop-scope-radio-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}
[data-theme="light"] .crop-scope-radio-circle,
body.light-mode .crop-scope-radio-circle {
  border-color: #94a3b8;
}
.crop-scope-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-white);
}
[data-theme="light"] .crop-scope-title,
body.light-mode .crop-scope-title {
  color: #0f172a;
}
.crop-scope-desc {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ==========================================================================
   Crop PDF Bottom Multi-File Strip & Horizontal Scroll Bar (Professional SaaS UI)
   ========================================================================== */
.crop-files-bottom-strip {
  display: flex !important;
  flex-direction: column !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  padding: 8px 16px 10px 16px !important;
  flex-shrink: 0 !important;
  height: 94px !important;
  max-height: 94px !important;
  box-sizing: border-box !important;
  gap: 7px !important;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04) !important;
  z-index: 10;
}
[data-theme="dark"] .crop-files-bottom-strip,
body.dark .crop-files-bottom-strip {
  background: #0b1120 !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3) !important;
}

.crop-files-strip-bar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 2px !important;
}
.crop-files-strip-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.crop-files-pill-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(229, 50, 45, 0.08) !important;
  border: 1px solid rgba(229, 50, 45, 0.22) !important;
  border-radius: 20px !important;
  padding: 3px 9px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #e5322d !important;
  letter-spacing: 0.2px !important;
}
[data-theme="dark"] .crop-files-pill-badge,
body.dark .crop-files-pill-badge {
  background: rgba(229, 50, 45, 0.16) !important;
  border-color: rgba(229, 50, 45, 0.35) !important;
  color: #fca5a5 !important;
}

.crop-files-pill-count {
  background: #e5322d !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  padding: 1px 6px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  min-width: 15px !important;
  text-align: center !important;
  line-height: 1.3 !important;
}

.crop-files-divider {
  color: #cbd5e1 !important;
  font-size: 12px !important;
}
[data-theme="dark"] .crop-files-divider,
body.dark .crop-files-divider {
  color: rgba(255, 255, 255, 0.2) !important;
}

.crop-files-strip-sub {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 500 !important;
  letter-spacing: 0.1px !important;
}
[data-theme="dark"] .crop-files-strip-sub,
body.dark .crop-files-strip-sub {
  color: #94a3b8 !important;
}

.crop-files-strip-right {
  display: flex !important;
  align-items: center !important;
}
.crop-active-doc-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(15, 23, 42, 0.04) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 6px !important;
  padding: 2.5px 8px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
}
[data-theme="dark"] .crop-active-doc-tag,
body.dark .crop-active-doc-tag {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
.crop-active-doc-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #22c55e !important;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6) !important;
}

.crop-files-scroll-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 2px 4px 2px !important;
  scrollbar-width: thin !important;
  scrollbar-color: #e5322d rgba(0, 0, 0, 0.08) !important;
}
.crop-files-scroll-row::-webkit-scrollbar {
  height: 6px !important;
}
.crop-files-scroll-row::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06) !important;
  border-radius: 4px !important;
}
.crop-files-scroll-row::-webkit-scrollbar-thumb {
  background: #e5322d !important;
  border-radius: 4px !important;
}
.crop-files-scroll-row::-webkit-scrollbar-thumb:hover {
  background: #ff433e !important;
}
[data-theme="dark"] .crop-files-scroll-row,
body.dark .crop-files-scroll-row {
  scrollbar-color: #e5322d rgba(255, 255, 255, 0.08) !important;
}
[data-theme="dark"] .crop-files-scroll-row::-webkit-scrollbar-track,
body.dark .crop-files-scroll-row::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25) !important;
}

/* File Chip */
.crop-file-chip {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 4px 10px 4px 6px !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  min-width: 180px !important;
  max-width: 240px !important;
  height: 48px !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="dark"] .crop-file-chip,
body.dark .crop-file-chip {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}
.crop-file-chip:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-1px) !important;
}
[data-theme="dark"] .crop-file-chip:hover,
body.dark .crop-file-chip:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
.crop-file-chip.active {
  border-color: #e5322d !important;
  background: #fff5f5 !important;
  box-shadow: 0 3px 12px rgba(229, 50, 45, 0.18) !important;
}
[data-theme="dark"] .crop-file-chip.active,
body.dark .crop-file-chip.active {
  background: rgba(229, 50, 45, 0.14) !important;
  border-color: #e5322d !important;
  box-shadow: 0 4px 14px rgba(229, 50, 45, 0.25) !important;
}

.crop-chip-thumb {
  width: 30px !important;
  height: 38px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  max-height: 38px !important;
  background: #ffffff !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.crop-chip-img {
  width: 30px !important;
  height: 38px !important;
  max-width: 30px !important;
  max-height: 38px !important;
  object-fit: cover !important;
  display: block !important;
}
.crop-chip-pdf-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  background: #fee2e2 !important;
}

.crop-chip-info {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
.crop-chip-name {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3 !important;
}
[data-theme="dark"] .crop-chip-name,
body.dark .crop-chip-name {
  color: #f1f5f9 !important;
}
.crop-chip-meta {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 2px !important;
}
.crop-chip-status {
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  background: #f1f5f9 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}
[data-theme="dark"] .crop-chip-status,
body.dark .crop-chip-status {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
.crop-chip-status.active {
  color: #e5322d !important;
  background: rgba(229, 50, 45, 0.12) !important;
}
[data-theme="dark"] .crop-chip-status.active,
body.dark .crop-chip-status.active {
  color: #fca5a5 !important;
  background: rgba(229, 50, 45, 0.22) !important;
}
.crop-chip-size {
  font-size: 9.5px !important;
  color: #94a3b8 !important;
}

.crop-chip-remove-btn {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.65 !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
}
.crop-chip-remove-btn:hover {
  opacity: 1 !important;
  color: #e5322d !important;
  background: #fee2e2 !important;
}
[data-theme="dark"] .crop-chip-remove-btn:hover,
body.dark .crop-chip-remove-btn:hover {
  background: rgba(229, 50, 45, 0.2) !important;
  color: #fca5a5 !important;
}

.crop-add-file-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 14px !important;
  background: rgba(229, 50, 45, 0.05) !important;
  border: 1.5px dashed rgba(229, 50, 45, 0.45) !important;
  border-radius: 10px !important;
  color: #e5322d !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
  height: 48px !important;
  box-sizing: border-box !important;
}
.crop-add-file-btn:hover {
  background: rgba(229, 50, 45, 0.12) !important;
  border-color: #e5322d !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 10px rgba(229, 50, 45, 0.15) !important;
}

/* ------------------------------------------------------------------------
   Remove Pages Dedicated Full PDF Document Preview & Interactive Stage
   ------------------------------------------------------------------------ */
.remove-pages-studio-container {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  flex: 1 1 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  background: rgba(15, 23, 42, 0.75);
  border: none !important;
  border-radius: var(--radius-xl) !important;
  overflow: hidden;
  box-shadow: none !important;
  position: relative;
}

[data-theme="light"] .remove-pages-studio-container,
body.light-mode .remove-pages-studio-container {
  background: #ffffff;
}

body.in-remove-pages-studio .studio-canvas {
  padding: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  overflow: hidden !important;
}

[data-theme="dark"] body.in-remove-pages-studio .studio-canvas,
body.dark.in-remove-pages-studio .studio-canvas {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.remove-pages-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  box-sizing: border-box;
}

[data-theme="light"] .remove-pages-toolbar,
body.light-mode .remove-pages-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.remove-pages-scroll-stage {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  padding: 24px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 26px !important;
  scroll-behavior: smooth !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

[data-theme="light"] .remove-pages-scroll-stage,
body.light-mode .remove-pages-scroll-stage {
  background: transparent !important;
}

.remove-page-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  border-radius: 8px;
  transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.28s ease, margin-bottom 0.28s ease;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
}

.remove-page-card.is-collapsing {
  opacity: 0 !important;
  transform: scale(0.92) !important;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.28s ease, margin-bottom 0.28s ease !important;
}

.remove-page-card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  padding: 0 2px;
  box-sizing: border-box;
}

.remove-page-number-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.75);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

[data-theme="light"] .remove-page-number-pill,
body.light-mode .remove-page-number-pill {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

/* Floating Red Circular Cross Button inside the top-right corner of each PDF page */
.remove-page-inner-cross-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(239, 68, 68, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  user-select: none;
  text-decoration: none !important;
  color: inherit;
  outline: none;
}

.remove-page-inner-cross-btn:hover {
  background: #dc2626;
  transform: scale(1.12);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remove-page-inner-cross-btn:active {
  transform: scale(0.92);
}

.remove-page-inner-cross-btn svg {
  display: block;
  pointer-events: none;
}

.remove-pages-reset-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

.remove-pages-reset-btn:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-1px) !important;
}

.remove-page-canvas-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background: #ffffff;
  cursor: default !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.remove-page-canvas-wrap:hover {
  transform: none !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

.remove-page-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ------------------------------------------------------------------------
   Remove Pages Workspace Body & Left-Hand Uploaded Files Sidebar
   ------------------------------------------------------------------------ */
.remove-pages-workspace-body {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  background: rgba(15, 23, 42, 0.45);
}

[data-theme="light"] .remove-pages-workspace-body,
body.light-mode .remove-pages-workspace-body {
  background: #e2e8f0;
}

.remove-pages-files-sidebar {
  width: 205px !important;
  min-width: 195px !important;
  max-width: 220px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px 12px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  background: transparent !important;
  gap: 10px !important;
  scrollbar-width: thin;
}

.remove-sidebar-files-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

/* File Card in Left Sidebar */
.remove-file-chip {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 7px 10px 7px 8px !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
}

[data-theme="dark"] .remove-file-chip,
body.dark .remove-file-chip {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.remove-file-chip:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-1px) !important;
}

.remove-file-chip.active {
  background: #ffffff !important;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444, 0 3px 10px rgba(239, 68, 68, 0.16) !important;
}

[data-theme="dark"] .remove-file-chip.active,
body.dark .remove-file-chip.active {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444, 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}

.remove-file-chip .crop-chip-thumb {
  width: 26px !important;
  height: 34px !important;
  flex-shrink: 0 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.remove-file-chip .crop-chip-info {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.remove-file-chip .crop-chip-name {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3 !important;
}

[data-theme="dark"] .remove-file-chip .crop-chip-name,
body.dark .remove-file-chip .crop-chip-name {
  color: #f1f5f9 !important;
}

.remove-file-chip .crop-chip-meta {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.remove-file-chip .crop-chip-status {
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  letter-spacing: 0.2px !important;
  text-transform: uppercase !important;
  background: #f1f5f9;
  color: #64748b;
  line-height: 1.2 !important;
}

.remove-file-chip.active .crop-chip-status {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

.remove-file-chip .crop-chip-size {
  color: #64748b !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
}

[data-theme="dark"] .remove-file-chip .crop-chip-size,
body.dark .remove-file-chip .crop-chip-size {
  color: #94a3b8 !important;
}

.remove-file-chip-remove-btn {
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 3px !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  margin-left: auto !important;
  opacity: 0.6;
  transition: all 0.15s ease !important;
}

.remove-file-chip-remove-btn:hover {
  opacity: 1 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

/* + Add More Files Card Button */
.remove-add-file-card {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 10px 12px !important;
  border: 1.5px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.6) !important;
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  box-sizing: border-box !important;
}

[data-theme="dark"] .remove-add-file-card,
body.dark .remove-add-file-card {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #cbd5e1 !important;
}

.remove-add-file-card:hover {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12) !important;
  transform: translateY(-1px) !important;
}

[data-theme="dark"] .remove-add-file-card:hover,
body.dark .remove-add-file-card:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

.remove-chip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.remove-chip-btn:hover {
  background: rgba(229, 50, 45, 0.1);
  color: #e5322d;
  border-color: rgba(229, 50, 45, 0.3);
}

[data-theme="light"] .remove-chip-btn,
body.light-mode .remove-chip-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* Mobile Filter Pills: Enforce Exactly 2 Lines (4 columns x 2 rows) on all mobile viewports */
@media (max-width: 600px) {
  .hero-section {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .hero-container {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .filter-container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px 3.5px !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 2px !important;
    margin: 0 auto 16px !important;
    box-sizing: border-box !important;
  }

  .filter-container .filter-pill,
  .filter-pill,
  [data-theme="light"] .filter-container .filter-pill,
  [data-theme="light"] .filter-pill,
  body.light-mode .filter-container .filter-pill,
  body.light-mode .filter-pill,
  [data-theme="light"] .filter-container .filter-pill.active,
  [data-theme="light"] .filter-pill.active {
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 5px 2px !important;
    gap: 2.5px !important;
    width: 100% !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    letter-spacing: -0.28px !important;
    border-radius: 9999px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .filter-container .filter-pill .pill-icon,
  .filter-pill .pill-icon {
    width: 9.5px !important;
    height: 9.5px !important;
    min-width: 9.5px !important;
    flex-shrink: 0 !important;
  }

  .filter-container .filter-pill span,
  .filter-pill span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    max-width: 100% !important;
  }
}

@media (max-width: 340px) {
  .filter-container {
    gap: 4px 2px !important;
  }

  .filter-container .filter-pill,
  .filter-pill,
  [data-theme="light"] .filter-container .filter-pill,
  [data-theme="light"] .filter-pill,
  body.light-mode .filter-container .filter-pill,
  body.light-mode .filter-pill,
  [data-theme="light"] .filter-container .filter-pill.active,
  [data-theme="light"] .filter-pill.active {
    font-size: 8px !important;
    letter-spacing: -0.32px !important;
    padding: 4px 1px !important;
    gap: 2px !important;
  }

  .filter-container .filter-pill .pill-icon,
  .filter-pill .pill-icon {
    width: 8.5px !important;
    height: 8.5px !important;
    min-width: 8.5px !important;
  }
}

/* Mobile Compact Search Bar (Reduced size for mobile screens <= 600px) */
@media (max-width: 600px) {
  .search-bar-wrap {
    max-width: 100% !important;
    margin: 8px auto 0 !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
  }

  .search-input,
  [data-theme="light"] .search-input,
  body.light-mode .search-input {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 44px 0 38px !important;
    font-size: 13.5px !important;
    border-radius: 9999px !important;
    box-sizing: border-box !important;
  }

  .search-input::placeholder,
  [data-theme="light"] .search-input::placeholder,
  body.light-mode .search-input::placeholder {
    font-size: 12.5px !important;
  }

  .search-icon {
    left: 14px !important;
    width: 16px !important;
    height: 16px !important;
  }

  .search-action-btn {
    right: 5px !important;
    width: 32px !important;
    height: 32px !important;
  }

  .search-action-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  .search-clear-btn {
    right: 40px !important;
    width: 16px !important;
    height: 16px !important;
  }
}

/* Mobile Trust Strip: 2 Balanced Rows on Mobile so NO words are hidden or cut off */
@media (max-width: 768px) {
  .hero-trust-strip {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 12px !important;
    padding: 8px 6px !important;
    margin: 10px auto 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .hero-trust-strip::-webkit-scrollbar {
    display: none !important;
  }

  .trust-divider {
    display: none !important;
  }

  .trust-item {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
    white-space: normal !important;
  }

  .trust-icon-circle {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    flex-shrink: 0 !important;
  }

  .trust-icon-circle svg {
    width: 13px !important;
    height: 13px !important;
  }

  .trust-text {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  .trust-title,
  [data-theme="light"] .trust-title,
  body.light-mode .trust-title {
    font-size: 11.5px !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
  }

  .trust-desc,
  [data-theme="light"] .trust-desc,
  body.light-mode .trust-desc {
    font-size: 9.5px !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
    color: #94a3b8 !important;
  }
}

/* ==========================================================================
   Footer Legal Buttons & Official Gmail Contact (Zero External URL Navigation)
   ========================================================================== */
.footer-legal-btn {
  cursor: pointer !important;
  user-select: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-legal-btn:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .footer-legal-btn:hover,
body.light-mode .footer-legal-btn:hover {
  color: var(--primary-red) !important;
  text-shadow: none !important;
}

.footer-gmail-link {
  color: #ef4444 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-gmail-link:hover {
  color: #dc2626 !important;
  text-decoration: underline !important;
}

#legalModal .modal-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 6px;
  color: var(--primary-red);
}

#legalModal .modal-body p,
#legalModal .modal-body li {
  font-size: 14px;
  line-height: 1.65;
  color: inherit;
  margin-bottom: 10px;
}



/* ==========================================================================
   High-Performance Rendering & Zero-Lag Enhancements (60fps / 120fps)
   ========================================================================== */
::selection {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}

::-moz-selection {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Hardware accelerated smooth scrolling across modern displays */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* GPU layering for fast scrolling without repaint stutters */
.tools-grid,
.features-grid,
.footer-container {
  contain: content;
}

@media (max-width: 768px) {
  /* Optimize backdrop filter performance on mobile GPUs to guarantee 60fps/120fps */
  .navbar,
  .footer-bottom,
  .mobile-tools-bar {
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
  }
  
  /* Faster touch response with zero tap delay */
  a, button, .tool-card, .filter-pill, .footer-legal-btn {
    touch-action: manipulation;
  }
}
