/* PDFXINET – Premium Design System v3 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --brand-primary: #1B3D6F;
  --brand-secondary: #1E54A8;
  --brand-accent: #E8693A;
  --brand-gradient: linear-gradient(135deg, #1B3D6F 0%, #1E54A8 100%);
  --brand-gradient-r: linear-gradient(315deg, #1B3D6F 0%, #1E54A8 100%);
  --brand-gradient-light: linear-gradient(135deg, #EEF3FF 0%, #EFF4FF 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(27,61,111,0.04) 0%, rgba(30,84,168,0.04) 100%);
  --bg-body: #F5F4F1;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #EDECEA;
  --text-primary: #15130F;
  --text-secondary: #5A5249;
  --text-muted: #9B9490;
  --border: #DDD8D3;
  --border-subtle: #EEEBE7;
  --border-focus: #1B3D6F;
  --success: #047857;
  --success-light: #ECFDF5;
  --warning: #B45309;
  --warning-light: #FFFBEB;
  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --info: #0284C7;
  --info-light: #F0F9FF;
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --shadow-xs: 0 1px 2px rgba(21,19,15,0.05);
  --shadow-sm: 0 2px 4px rgba(21,19,15,0.07), 0 1px 2px rgba(21,19,15,0.04);
  --shadow: 0 4px 16px rgba(21,19,15,0.08), 0 2px 6px rgba(21,19,15,0.04);
  --shadow-md: 0 8px 28px rgba(21,19,15,0.10), 0 3px 10px rgba(21,19,15,0.06);
  --shadow-lg: 0 16px 48px rgba(21,19,15,0.11), 0 6px 18px rgba(21,19,15,0.06);
  --shadow-xl: 0 24px 64px rgba(21,19,15,0.13), 0 8px 24px rgba(21,19,15,0.07);
  --nav-height: 80px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Subtle warm mesh — restrained, professional */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(27,61,111,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 100%, rgba(232,105,58,0.025) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: var(--brand-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand-secondary); }

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(226,232,240,0.8), 0 4px 24px rgba(27,61,111,0.04);
  padding: 0;
  height: var(--nav-height);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
/* Firefox: no backdrop-filter — use opaque background */
@supports not (backdrop-filter: blur(1px)) {
  .navbar { background: rgba(255,255,255,0.97); }
  .navbar.scrolled { background: #fff; }
}
.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 rgba(226,232,240,1), 0 8px 32px rgba(27,61,111,0.08);
}
.navbar-brand {
  font-size: 1.6rem;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* Logo icon */
.logo-icon {
  display: flex;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  filter: drop-shadow(0 2px 6px rgba(27,61,111,0.28));
}
.navbar-brand:hover .logo-icon {
  transform: scale(1.1) rotate(-4deg);
  filter: drop-shadow(0 4px 14px rgba(27,61,111,0.45));
}

/* Wordmark */
.bw {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.bw-pdf  { font-weight: 900; letter-spacing: -0.5px; }
.bw-x    { font-weight: 900; font-size: 1.12em; letter-spacing: -1px; position: relative; top: -0.04em; color: #FB923C; -webkit-text-fill-color: #FB923C; }
.bw-inet { font-weight: 500; letter-spacing: 0; }

/* Footer brand wordmark */
.footer-brand .bw { background: none; -webkit-text-fill-color: unset; background-clip: unset; color: #F9FAFB; }
.footer-brand .bw-pdf  { font-weight: 900; }
.footer-brand .bw-x    { font-weight: 900; font-size: 1.12em; color: #FB923C; -webkit-text-fill-color: #FB923C; }
.footer-brand .bw-inet { font-weight: 400; opacity: 0.75; }

.nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary) !important;
  padding: 0.6rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--brand-primary) !important;
  background: var(--brand-gradient-light);
}

.navbar .dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 220px;
}
.navbar .dropdown-item {
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  padding: 0.55rem 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.navbar .dropdown-item:hover {
  background: var(--brand-gradient-light);
  color: var(--brand-primary);
  transform: translateX(2px);
}
.navbar .dropdown-item .icon { width: 20px; text-align: center; opacity: 0.7; }
.navbar .dropdown-divider { margin: 0.25rem 0; }

/* ── Tools mega-menu ── */
.tools-mega-menu {
  width: 940px;
  max-width: calc(100vw - 24px);
  padding: 20px 10px 16px;
  left: 0 !important;
  top: calc(100% + 4px) !important;
}
.mega-col {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
}
.mega-col + .mega-col { border-left: 1px solid var(--border); }
.mega-col-header {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94A3B8;
  padding: 2px 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mega-col-header i { font-size: .8rem; opacity: .7; }
.tools-mega-menu .dropdown-item { padding: .35rem .75rem; font-size: .85rem; }
.tools-mega-menu .dropdown-item.ai-item {
  background: linear-gradient(90deg, #eef2ff, #f5f3ff);
  color: #6d28d9;
  font-weight: 600;
}
.tools-mega-menu .dropdown-item.ai-item:hover {
  background: linear-gradient(90deg, #e0e7ff, #ede9fe);
  color: #5b21b6;
}
@media (max-width: 991px) {
  .tools-mega-menu {
    width: 100%;
    max-width: 100%;
    left: 0 !important;
  }
  .mega-col + .mega-col { border-left: none; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
  .tools-mega-menu > .d-flex { flex-direction: column !important; }
}

/* ── Navbar right-side action buttons ── */
.btn-nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}
.btn-nav-lang i { font-size: 0.875rem; opacity: 0.7; transition: var(--transition); }
.btn-nav-lang:hover {
  color: var(--brand-primary);
  border-color: rgba(27,61,111,0.4);
  background: var(--brand-gradient-light);
}
.btn-nav-lang:hover i { opacity: 1; }
.btn-nav-lang.dropdown-toggle::after {
  margin-left: 2px;
  opacity: 0.55;
}

.nav-vdivider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.btn-nav-login {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(27,61,111,0.3);
  color: var(--brand-primary);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.btn-nav-login:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27,61,111,0.22);
}

.btn-nav-register {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 20px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.025em;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(27,61,111,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
  line-height: 1;
}
.btn-nav-register::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.14) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.btn-nav-register:hover {
  color: #fff;
  box-shadow: 0 6px 22px rgba(27,61,111,0.36), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
.btn-nav-register:hover::after { opacity: 1; }
.btn-nav-register:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(27,61,111,0.22);
}
.btn-nav-register i { font-size: 0.75rem; position: relative; z-index: 1; }

/* ── Hero ── */
.hero {
  background:
    radial-gradient(ellipse 70% 80% at -5% 10%, rgba(27,61,111,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 105% 90%, rgba(232,105,58,0.05) 0%, transparent 50%),
    linear-gradient(158deg, #FDFCF9 0%, #F8F7F4 40%, #F5F4F1 70%, #F3F2EF 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 80px 0 88px;
  position: relative;
  overflow: hidden;
}

/* Refined dot-grid on warm paper */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(21,19,15,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Distinctive 4-stop brand stripe — navy → royal blue → coral → amber */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    #1B3D6F 0%,
    #1E54A8 35%,
    #E8693A 70%,
    #F59E0B 100%);
  border-radius: 0 0 2px 2px;
}

/* ── Hero Circular Workflow Decoration ──
   Lives in its own col-xl-3 column; scales to fill that column. */
.hero-workflow {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  animation: hw-fade 1.4s ease both;
}
.hero-workflow svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes hw-fade {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

/* Outer ring — slow clockwise rotation */
.hero-workflow .hw-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: hw-spin 50s linear infinite;
}
/* Inner ring — slow counter-clockwise rotation */
.hero-workflow .hw-ring-inner {
  transform-box: fill-box;
  transform-origin: center;
  animation: hw-spin 80s linear infinite reverse;
}
@keyframes hw-spin {
  to { transform: rotate(360deg); }
}

/* Arcs — dashes flow clockwise along the path */
.hero-workflow .hw-arc {
  animation: hw-flow 3s linear infinite;
}
@keyframes hw-flow {
  to { stroke-dashoffset: -24; }
}

/* Node fill circles — staggered scale-pulse */
.hero-workflow .hw-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: hw-node-pulse 3s ease-in-out infinite;
}
@keyframes hw-node-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.92; }
  50%       { transform: scale(1.10); opacity: 1;    }
}

/* Centre badge — gentle breathe */
.hero-workflow .hw-centre {
  transform-box: fill-box;
  transform-origin: center;
  animation: hw-breathe 4s ease-in-out infinite;
}
@keyframes hw-breathe {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.06); }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-workflow .hw-ring,
  .hero-workflow .hw-ring-inner,
  .hero-workflow .hw-arc,
  .hero-workflow .hw-node,
  .hero-workflow .hw-centre { animation: none; }
}
/* col-xl-3 SVG column uses d-none d-xl-flex — no extra CSS needed to hide.
   Restore card to centred block when SVG column is absent. */
@media (max-width: 1199px) {
  .hero-upload-wrapper { max-width: 520px; margin: 0 auto; width: 100%; }
}

.hero-title {
  font-size: clamp(2rem, 2.5vw, 3.25rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -1px;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: 1.1875rem;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 520px;
  line-height: 1.7;
  text-wrap: balance;
}
.hero-cta-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* Highlight span inside hero title — gradient text on key phrase */
.hero-title .hero-highlight {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero Upload (homepage) ── */
/* width:100% fills smaller columns; max-width caps it on wide screens;
   margin:0 auto centres it so neither edge overflows the column */
.hero-upload-wrapper {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  width: 100%;
}
/* Hero-only upload zone overrides — scoped so tool pages are unaffected */
.hero-upload-wrapper .upload-zone {
  padding: 3rem 1.75rem 2.25rem;
}
.hero-upload-wrapper .upload-icon {
  font-size: 3rem;
  margin-bottom: 14px;
}
.hero-upload-wrapper .upload-title {
  font-size: 1.0625rem;
}
.hero-upload-wrapper .upload-hint {
  font-size: 0.8125rem;
}

/* Brand gradient line at top of upload card — navy → coral */
.hero-upload-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1B3D6F 0%, #1E54A8 40%, #E8693A 75%, #F59E0B 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Hero badge / trust pill */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(27,61,111,0.07);
  color: var(--brand-primary);
  border: 1px solid rgba(27,61,111,0.14);
  border-radius: 99px;
  padding: 0.3rem 1rem;
  font-size: .8rem;
  font-weight: 600;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 6px rgba(34,197,94,0.7);
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary {
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  box-shadow: 0 2px 10px rgba(27,61,111,0.3);
}
.btn-primary:hover {
  opacity: 0.92;
  box-shadow: 0 6px 20px rgba(27,61,111,0.4);
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline-primary {
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
}
.btn-outline-primary:hover { background: var(--brand-primary); color: #fff; }
.btn-white {
  background: #fff;
  color: var(--brand-primary);
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.btn-white:hover { background: #f0f4ff; color: var(--brand-secondary); box-shadow: 0 4px 20px rgba(0,0,0,0.16); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.22); color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-lg { padding: 0.75rem 1.875rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.875rem; font-size: 0.8125rem; }
.btn-icon { display: inline-flex; align-items: center; gap: 6px; }
.btn-success {
  background: linear-gradient(135deg, #059669, #10B981);
  border: none; color: #fff;
  box-shadow: 0 2px 10px rgba(5,150,105,0.3);
}
.btn-success:hover { opacity: 0.9; color: #fff; transform: translateY(-1px); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}
.card-body { padding: 1.5rem; }
.card-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
}

/* Floating card variant */
.card-floating {
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.card-floating:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

/* ── Tool Cards ── */
.tool-card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--brand-gradient-soft);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.tool-card:hover, .tool-card:active {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), inset 3px 0 0 var(--brand-accent);
  border-color: rgba(27,61,111,0.15);
  color: inherit;
}
.tool-card:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), inset 3px 0 0 var(--brand-accent);
}
.tool-card:hover::before, .tool-card:active::before { opacity: 1; }
.tool-card-inner { position: relative; z-index: 1; padding: 1.25rem 1.5rem 1.5rem; }
.tool-card-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition-spring);
}
.tool-card:hover .tool-card-icon { transform: scale(1.1) rotate(-3deg); }
.tool-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}
.tool-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.tool-card-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%) translateX(4px);
  opacity: 0;
  color: var(--brand-primary);
  transition: var(--transition);
  font-size: 0.875rem;
}
.tool-card:hover .tool-card-arrow {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── Upload Zone ── */
.upload-zone {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.upload-zone > *:not(input) { position: relative; z-index: 1; }
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--brand-accent);
  background: #FFF7F3;
  box-shadow: 0 0 0 4px rgba(232,105,58,0.10), var(--shadow-sm);
}
.upload-zone.file-selected {
  border-color: var(--success);
  background: var(--success-light);
  box-shadow: 0 0 0 4px rgba(4,120,87,0.10);
}

/* Upload icon */
.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: var(--brand-primary);
  opacity: 0.5;
  transition: var(--transition-spring);
  display: block;
}
.upload-zone:hover .upload-icon, .upload-zone.drag-over .upload-icon {
  color: var(--brand-accent);
  opacity: 1;
  transform: scale(1.12) translateY(-5px);
}
.upload-icon-pulse {
  display: inline-block;
  position: relative;
}
.upload-icon-pulse::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(27,61,111,0.15);
  animation: uploadPulse 2.5s ease-in-out infinite;
}
.upload-zone:hover .upload-icon-pulse::before,
.upload-zone.drag-over .upload-icon-pulse::before {
  border-color: rgba(232,105,58,0.25);
}
@keyframes uploadPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0; }
}
.upload-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.upload-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.upload-file-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
  margin-top: 8px;
  display: none;
}
.upload-zone.file-selected .upload-file-name { display: block; }
.upload-zone.file-selected .upload-title { display: none; }
.upload-zone.file-selected .upload-icon { color: var(--success); opacity: 0.9; }
.upload-zone.file-selected .upload-icon-pulse::before { display: none; }

/* Format chips inside upload zone */
.upload-format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 14px;
}
.upload-format-chip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}
.upload-zone:hover .upload-format-chip,
.upload-zone.drag-over .upload-format-chip {
  border-color: rgba(232,105,58,0.3);
  color: var(--brand-accent);
  background: #FFF7F3;
}
.upload-zone.file-selected .upload-format-chips { display: none; }

/* ── Forms ── */
.form-label { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); margin-bottom: 0.4rem; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #fff;
  transition: var(--transition);
  width: 100%;
}
.form-control:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(27,61,111,0.12);
  outline: none;
  background: #fff;
}
.form-control::placeholder { color: var(--text-muted); }
.form-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Password strength indicator */
.password-strength {
  margin-top: 6px;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.password-strength-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0;
}

/* ── Alerts / Flash ── */
.alert {
  border-radius: var(--radius);
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: alertSlideIn 0.3s ease;
}
@keyframes alertSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.alert-success { background: var(--success-light); color: #065F46; border-left: 3px solid var(--success); }
.alert-danger   { background: var(--danger-light);  color: #991B1B; border-left: 3px solid var(--danger); }
.alert-warning  { background: var(--warning-light); color: #92400E; border-left: 3px solid var(--warning); }
.alert-info     { background: var(--info-light);    color: #0C4A6E; border-left: 3px solid var(--info); }
.alert .btn-close { margin-left: auto; }

/* ── Result Box ── */
.result-box {
  background: var(--success-light);
  border: 1.5px solid #A7F3D0;
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  animation: resultReveal 0.4s ease;
}
@keyframes resultReveal { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.result-box .result-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
  animation: resultBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes resultBounce { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.25rem; }
.result-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.25rem 0;
  padding: 1rem;
  background: rgba(5,150,105,0.06);
  border-radius: var(--radius);
}
.result-stat-item { text-align: center; }
.result-stat-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; }
.result-stat-value { font-weight: 800; font-size: 1.2rem; color: var(--text-primary); }

/* ── Section Title ── */
.section-title { font-size: 2.25rem; font-weight: 900; letter-spacing: -0.5px; color: var(--text-primary); }
.section-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; line-height: 1.7; }
.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-accent);
  background: none;
  border: none;
  padding: 0;
  display: block;
  margin-bottom: 0.75rem;
}

/* ── Tool Hero Header ── */
.tool-hero {
  background: linear-gradient(160deg, #FDFCFA 0%, #F5F4F0 50%, #F8F7F3 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 3rem 0 2.5rem;
}
/* Align tool-hero inner container with landing-page banner padding */
.tool-hero .container,
.tool-hero .container-xl,
.tool-hero .container-xxl {
  max-width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 992px) {
  .tool-hero .container,
  .tool-hero .container-xl,
  .tool-hero .container-xxl {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}
.tool-hero-icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-md);
}
.tool-hero-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}
.tool-hero-desc { font-size: 1rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* ── Trust Bar ── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.trust-bar-item { display: flex; align-items: center; gap: 5px; }
.trust-bar-item i { color: var(--success); font-size: 0.875rem; }

/* ── Feature Chips ── */
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand-gradient-light);
  color: var(--brand-primary);
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  border: 1px solid rgba(27,61,111,0.15);
}

/* ── Dashboard ── */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card:hover::after { opacity: 1; }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}
.stat-card .stat-value {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 5px;
}
.stat-card .stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 6px;
}
.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }

/* Quick tool buttons (dashboard) */
.quick-tool-btn {
  display: block;
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.quick-tool-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(27,61,111,0.12);
}
.quick-tool-btn i { font-size: 1.625rem; display: block; margin-bottom: 6px; color: var(--brand-primary); }
.quick-tool-btn span { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); }

/* ── Badge ── */
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3em 0.7em;
  border-radius: 99px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.badge-plan-free       { background: #F1F5F9; color: #64748B; }
.badge-plan-basic      { background: #DBEAFE; color: #1D4ED8; }
.badge-plan-pro        { background: #EDE9FE; color: #5B21B6; }
.badge-plan-enterprise { background: #FEF3C7; color: #92400E; }

/* ── Table ── */
.table-modern {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.table-modern thead th {
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--border);
}
.table-modern tbody td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table-modern tbody tr:hover td { background: var(--bg-subtle); }
.table-modern tbody tr:last-child td { border-bottom: none; }

/* ── Sidebar (admin) ── */
.admin-sidebar {
  width: 260px;
  min-height: calc(100vh - var(--nav-height));
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  position: sticky;
  top: var(--nav-height);
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  margin-bottom: 2px;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: var(--brand-gradient-light);
  color: var(--brand-primary);
}
.admin-nav-section {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 0.875rem 0.875rem 0.375rem;
}

/* ── Progress bar ── */
.progress { border-radius: 99px; background: var(--border-subtle); height: 8px; overflow: hidden; }
.progress-bar {
  background: var(--brand-gradient);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ── Plans ── */
.plan-card {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  height: 100%;
}
.plan-card.featured {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, #FDFCFA 0%, #EFF4FF 100%);
}
.plan-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 99px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.plan-name { font-size: 1.125rem; font-weight: 800; color: var(--text-primary); }
.plan-price {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  line-height: 1;
  margin: 0.875rem 0;
}
.plan-price sup { font-size: 1.1rem; letter-spacing: 0; }
.plan-price small { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.plan-features li {
  font-size: 0.875rem;
  padding: 0.3rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.plan-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── Footer ── */
footer {
  background: #0D1E38;
  color: #8A9BB5;
  padding: 4.5rem 0 2.5rem;
  margin-top: auto;
}
footer a { color: #8A9BB5; transition: var(--transition); }
footer a:hover { color: #F0F4FF; }
.footer-brand { font-size: 1.4rem; font-weight: 800; color: #F0F4FF; margin-bottom: 0.5rem; }
.footer-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: #4A5E7A;
  margin-bottom: 1.1rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { font-size: 0.9375rem; }
.footer-bottom {
  border-top: 1px solid #1A2D46;
  margin-top: 3rem;
  padding-top: 1.75rem;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-social { display: flex; gap: 12px; margin-top: 1.25rem; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: #1A2D46;
  color: #8A9BB5;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--brand-accent); color: #fff; }

/* ── Chat FAB ── */
#chat-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 4px 20px rgba(27,61,111,0.4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 999;
  color: #fff; font-size: 1.375rem;
  transition: var(--transition-spring);
  text-decoration: none;
}
#chat-fab:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(27,61,111,0.5); }

/* ── Drag & Drop Reorder ── */
.page-thumb {
  width: 120px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  cursor: grab;
  text-align: center;
  transition: var(--transition);
  user-select: none;
}
.page-thumb:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-md); }
.page-thumb.dragging { opacity: 0.5; border-color: var(--brand-primary); box-shadow: var(--shadow-lg); }
.page-thumb img { width: 100%; border-radius: 4px; margin-bottom: 6px; }
.page-thumb .page-num { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }
.page-thumb .rotate-btns { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.page-thumb .rotate-btns button {
  font-size: 0.7rem; padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  color: var(--text-secondary); transition: var(--transition);
}
.page-thumb .rotate-btns button:hover { background: var(--brand-gradient-light); color: var(--brand-primary); }
#page-grid { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Blog / FAQ ── */
.post-card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.post-card-body { padding: 1.5rem; }
.post-tag {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--brand-primary); background: var(--brand-gradient-light);
  padding: 0.2rem 0.65rem; border-radius: 99px; display: inline-block; margin-bottom: 0.75rem;
}
.post-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); line-height: 1.4; margin-bottom: 0.5rem; }
.post-title:hover { color: var(--brand-primary); }
.post-meta { font-size: 0.8rem; color: var(--text-muted); }

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover { border-color: rgba(27,61,111,0.2); }
.faq-question {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  transition: var(--transition);
}
.faq-question:hover { color: var(--brand-primary); }
.faq-question i { transition: transform 0.2s ease; flex-shrink: 0; }
.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question { color: var(--brand-primary); background: var(--brand-gradient-light); }
.faq-item.open .faq-question i { transform: rotate(180deg); }

/* ── Auth Pages ── */
.auth-page-wrapper {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: stretch;
}
.auth-panel-left {
  flex: 1;
  background: var(--brand-gradient);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-panel-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.auth-panel-right {
  flex: 1;
  background: var(--bg-body);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-title { font-size: 1.625rem; font-weight: 900; color: var(--text-primary); margin-bottom: 0.25rem; }
.auth-subtitle { font-size: 0.9rem; color: var(--text-muted); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 0.8125rem; margin: 1.25rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1.5rem;
}
.auth-feature-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.auth-feature-text h6 { color: #fff; font-weight: 700; margin-bottom: 2px; font-size: 0.9rem; }
.auth-feature-text p { color: rgba(255,255,255,0.75); font-size: 0.8rem; margin: 0; }

/* ── Misc Utilities ── */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-gradient-brand { background: var(--brand-gradient); }
.rounded-pill { border-radius: 99px !important; }
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.icon-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* Category tabs */
.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: fit-content;
}
.category-tab {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
}
.category-tab:hover { color: var(--brand-primary); background: var(--brand-gradient-light); }
.category-tab.active {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* How it works steps */
.step-connector {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border) 50%, transparent 50%);
  background-size: 8px 1px;
  margin: 0 -1rem;
  align-self: center;
  margin-top: -2rem;
  display: none;
}
@media (min-width: 768px) { .step-connector { display: block; } }
.step-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.625rem;
  color: #fff;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: var(--transition-spring);
}
.step-circle:hover { transform: scale(1.08); box-shadow: var(--shadow-xl); }
.step-number-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-primary);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--brand-gradient-light);
  box-shadow: var(--shadow-sm);
}

/* ── Responsive ── */

/* Medium two-column layout (SVG hidden, columns side-by-side) */
@media (min-width: 992px) and (max-width: 1199px) {
  .hero { padding: 64px 0 72px; }
}

@media (max-width: 991px) {
  .hero { padding: 60px 0 68px; }
}

@media (max-width: 768px) {
  .hero { padding: 56px 0 64px; }
  .admin-sidebar { display: none; }
  .auth-card { padding: 1.875rem 1.25rem; }
  .hero-title { font-size: 1.875rem; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 2rem 1rem; }
  .category-tabs { width: 100%; }
  .tool-hero { padding: 2rem 0; }
  .tool-hero-title { font-size: 1.625rem; }
  .hero-upload-wrapper { padding: 20px; }
}

/* Very small screens: tighten upload zone inner padding */
@media (max-width: 480px) {
  .upload-zone { padding: 1.5rem 1rem; }
  /* Override scoped hero padding so it doesn't stay oversized on mobile */
  .hero-upload-wrapper .upload-zone { padding: 1.75rem 1rem 1.5rem; }
  .hero-upload-wrapper .upload-icon { font-size: 2.25rem; }
  .hero-upload-wrapper { padding: 20px; }
}
/* WCAG 2.5.5 – minimum 44×44px touch target for navbar toggler */
.navbar-toggler {
  min-width: 44px;
  min-height: 44px;
}

/* ── Cookie Banner ── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0D1E38;
  color: #8A9BB5;
  padding: 1.125rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 2000;
  flex-wrap: wrap;
  font-size: 0.875rem;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.35);
  border-top: 1px solid #1A2D46;
}
#cookie-banner a { color: #93C5FD; }
#cookie-banner a:hover { color: #BFDBFE; }
#cookie-banner.hidden { display: none; }

/* ── Announcement Banner ── */
.announcement-banner {
  position: relative;
  z-index: 1040;
  border-radius: 0 !important;
  padding-top: .5rem;
  padding-bottom: .5rem;
}

/* ── Spinner / Loading ── */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  animation: overlayFadeIn 0.15s ease;
}
@supports not (backdrop-filter: blur(1px)) {
  .spinner-overlay { background: rgba(255,255,255,0.97); }
}
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
.spinner-overlay.active { display: flex; }
.spinner-content {
  text-align: center;
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}
.spinner-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.spinner-step {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.spinner-step.active { color: var(--brand-primary); font-weight: 600; }
.spinner-step .step-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
}
.spinner-step.active .step-dot { background: var(--brand-primary); animation: dotPulse 1s ease infinite; }
@keyframes dotPulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.5);opacity:0.5} }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--border-subtle); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
/* Firefox scrollbar */
* { scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }

/* Copy feedback */
.copy-success { color: var(--success) !important; }

/* Share link box */
.share-link-box {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  word-break: break-all;
  color: var(--text-secondary);
}

/* Stats banner in index */
.stats-banner-item {
  text-align: center;
  padding: 1.5rem;
}
.stats-banner-number {
  font-size: 2.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1;
  display: block;
}
.stats-banner-label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  margin-top: 6px;
  display: block;
}

/* CTA Card */
.cta-card {
  background: linear-gradient(145deg, #FDFCF9 0%, #F5F4F0 50%, #FFF7F3 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-accent);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: rgba(232,105,58,0.04);
  border-radius: 50%;
}

/* Animations for page sections */
@media (prefers-reduced-motion: no-preference) {
  .animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .animate-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Preset Card (compress + other tools) ── */
.preset-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
  user-select: none;
  position: relative;
}
.preset-card:hover { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(27,61,111,0.08); }
.preset-card.selected {
  border-color: var(--brand-primary);
  background: #FAFAF8;
  box-shadow: 0 0 0 3px rgba(27,61,111,0.12);
}
.preset-card.selected .preset-check { display: flex; }
.preset-check {
  display: none;
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-primary); color: #fff;
  align-items: center; justify-content: center;
  font-size: 11px;
}
.preset-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 10px;
}
.preset-name { font-weight: 700; font-size: .9rem; margin-bottom: 2px; }
.preset-dpi  { font-size: .75rem; color: var(--text-muted); margin-bottom: 6px; }
.preset-desc { font-size: .78rem; color: var(--text-secondary); line-height: 1.4; }
.preset-badge {
  display: inline-block; font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; margin-top: 8px;
}
.compress-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 10px; }
.compress-bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }

/* ── Legacy tool header (pages not yet migrated to .tool-hero) ── */
.tool-page-header {
  text-align: center;
  padding: 2.5rem 0 2rem;
  background: linear-gradient(160deg, #FDFCFA 0%, #F5F4F0 50%, #F8F7F3 100%);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0;
}
/* Make old inline headers look better by targeting common pattern */
.py-5 > .container > .text-center > .tool-card-icon {
  box-shadow: var(--shadow-md) !important;
}

/* Min height fix for new nav height */
[style*="min-height:calc(100vh - 64px)"] {
  min-height: calc(100vh - 68px) !important;
}

/* ── Print ── */
@media print { .navbar, footer, #cookie-banner, #chat-fab { display: none !important; } }
