/* ===================================================================
   AAYAM INNOVATION — OFFICIAL STYLESHEET
   Version: 2.0.0 — Premium Office & Productivity Platform UI
   Polished, trustworthy, accessible, responsive design.
   =================================================================== */

/* --- Custom Properties / Enterprise Theme Variables --- */
:root {
  /* Brand Palette: Deep enterprise navy, trustworthy royal blue, restrained cyan */
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-active: #172554;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --navy-dark: #0f172a;
  --navy-surface: #1e293b;
  --navy-muted: #334155;

  --accent-cyan: #0284c7;
  --accent-cyan-light: #f0f9ff;
  --accent-cyan-border: #bae6fd;

  --accent-violet: #6d28d9;
  --accent-violet-light: #f5f3ff;

  --grad-primary: linear-gradient(135deg, #1d4ed8 0%, #4338ca 50%, #0284c7 100%);
  --grad-subtle-glow: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);

  /* Neutrals: Cool slate & crisp office surfaces */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-subtle: #f8fafc;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-light: #94a3b8;

  /* Elevation: Clean paper micro-shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.09), 0 4px 8px -2px rgba(15, 23, 42, 0.04);

  /* Geometry: Refined corporate corners */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Global Reset & Basics --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  color: var(--text-main);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section[id] {
  scroll-margin-top: 4.5rem;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Accessibility: Visible focus outline */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* --- Layout Helpers --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hero-container,
.tools-container,
.apps-container,
.why-container,
.about-container,
.contact-container {
  position: relative;
  z-index: 2;
}

.section-padding {
  padding-top: 4.75rem;
  padding-bottom: 4.75rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem auto;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-top: 0.65rem;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* --- Gradient & Badge Components --- */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-pill-cyan {
  background: var(--accent-cyan-light);
  color: #0369a1;
  border-color: var(--accent-cyan-border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 2.5s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

/* Status indicators */
.status-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot-gray {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #94a3b8;
  display: inline-block;
  flex-shrink: 0;
}

/* --- Buttons System --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  font-size: 0.925rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  text-align: center;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}

.btn-primary:active {
  background-color: var(--primary-active);
  transform: translateY(0);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-primary-sm {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid #1e40af;
  padding: 0.45rem 1rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
}

.btn-primary-sm:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.18);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-body);
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  color: var(--text-main);
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
}

.btn-secondary:active {
  background-color: #f1f5f9;
  transform: translateY(0);
}

.btn-secondary-sm {
  background-color: #ffffff;
  color: var(--text-body);
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
}

.btn-secondary-sm:hover {
  background-color: #f8fafc;
  color: var(--text-main);
  border-color: #94a3b8;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 1.65rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-disabled {
  background-color: #f1f5f9 !important;
  color: var(--text-light) !important;
  border-color: var(--border-light) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Authentic AAYAM Innovation Brand Wordmark */
.brand-wordmark-img {
  height: 38px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover .brand-wordmark-img {
  opacity: 0.85;
}

.footer-wordmark-img {
  height: 34px;
  max-width: 170px;
}

.desktop-nav .nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding: 0.35rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  z-index: 1010;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.mobile-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.mobile-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Drawer Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 4.25rem;
  left: 0;
  width: 100%;
  height: calc(100vh - 4.25rem);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem 1.5rem;
  z-index: 999;
  border-top: 1px solid var(--border-light);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-smooth);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 2rem;
}

.mobile-nav-link {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

/* ===================================================================
   TRANSLUCENT TILTED DOCUMENT-PAPER BACKGROUND DECORATIONS
   Office Productivity Theme: Word documents, PDF pages, spreadsheets.
   Subtle rotations (-8deg, 5deg, -4deg, 4deg, 6deg), opacity 0.10–0.14,
   subtle blue, lavender, and cool-gray outlines, layered micro-shadows,
   folded corners, ruled lines & grid patterns.
   Strictly pointer-events: none, positioned behind content.
   =================================================================== */
.doc-paper-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  user-select: none;
}

.doc-paper {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.94);
  border-radius: 9px;
  border: 1.5px solid rgba(148, 163, 184, 0.40);
  box-shadow: 0 14px 30px -5px rgba(15, 23, 42, 0.08), 0 3px 8px -1px rgba(15, 23, 42, 0.04);
  opacity: 0.12; /* Visible but subtle 0.10 - 0.14 desktop opacity */
  pointer-events: none;
  transition: opacity var(--transition-normal);
  animation: doc-float 14s ease-in-out infinite alternate;
}

@keyframes doc-float {
  0% {
    transform: translateY(0) rotate(var(--paper-rot, 0deg));
  }
  100% {
    transform: translateY(-6px) rotate(var(--paper-rot, 0deg));
  }
}

/* Word Document Motif: Subtle royal blue outline with ruled lines */
.doc-paper-word {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 16px 32px -6px rgba(29, 78, 216, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  background: 
    linear-gradient(to bottom,
      transparent 28px,
      rgba(37, 99, 235, 0.55) 28px,
      rgba(37, 99, 235, 0.55) 30.5px,
      transparent 30.5px,
      transparent 44px,
      rgba(100, 116, 139, 0.45) 44px,
      rgba(100, 116, 139, 0.45) 46px,
      transparent 46px,
      transparent 58px,
      rgba(100, 116, 139, 0.45) 58px,
      rgba(100, 116, 139, 0.45) 60px,
      transparent 60px,
      transparent 72px,
      rgba(100, 116, 139, 0.45) 72px,
      rgba(100, 116, 139, 0.45) 74px,
      transparent 74px,
      transparent 86px,
      rgba(100, 116, 139, 0.45) 86px,
      rgba(100, 116, 139, 0.45) 88px,
      transparent 88px,
      transparent 100px,
      rgba(100, 116, 139, 0.45) 100px,
      rgba(100, 116, 139, 0.45) 102px,
      transparent 102px,
      transparent 114px,
      rgba(100, 116, 139, 0.45) 114px,
      rgba(100, 116, 139, 0.45) 116px,
      transparent 116px,
      transparent 128px,
      rgba(100, 116, 139, 0.45) 128px,
      rgba(100, 116, 139, 0.45) 130px,
      transparent 130px
    ) rgba(255, 255, 255, 0.94);
}

/* Spreadsheet Grid Motif: Subtle cool-gray/teal outline with grid */
.doc-paper-sheet {
  background-color: rgba(255, 255, 255, 0.94);
  background-image: 
    linear-gradient(to right, rgba(13, 148, 136, 0.30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 148, 136, 0.30) 1px, transparent 1px);
  background-size: 26px 18px;
  border-color: rgba(13, 148, 136, 0.40);
  box-shadow: 0 16px 32px -6px rgba(13, 148, 136, 0.10), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
}
.doc-paper-sheet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: rgba(13, 148, 136, 0.22);
  border-bottom: 1.5px solid rgba(13, 148, 136, 0.38);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* PDF / Lavender Document Motif: Subtle lavender outline with accent line */
.doc-paper-pdf {
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow: 0 16px 32px -6px rgba(124, 58, 237, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  background: 
    linear-gradient(to bottom,
      transparent 32px,
      rgba(239, 68, 68, 0.55) 32px,
      rgba(239, 68, 68, 0.55) 35px,
      transparent 35px,
      transparent 48px,
      rgba(100, 116, 139, 0.45) 48px,
      rgba(100, 116, 139, 0.45) 50px,
      transparent 50px,
      transparent 62px,
      rgba(100, 116, 139, 0.45) 62px,
      rgba(100, 116, 139, 0.45) 64px,
      transparent 64px,
      transparent 76px,
      rgba(100, 116, 139, 0.45) 76px,
      rgba(100, 116, 139, 0.45) 78px,
      transparent 78px,
      transparent 90px,
      rgba(100, 116, 139, 0.45) 90px,
      rgba(100, 116, 139, 0.45) 92px,
      transparent 92px,
      transparent 104px,
      rgba(100, 116, 139, 0.45) 104px,
      rgba(100, 116, 139, 0.45) 106px,
      transparent 106px,
      transparent 118px,
      rgba(100, 116, 139, 0.45) 118px,
      rgba(100, 116, 139, 0.45) 120px,
      transparent 120px
    ) rgba(255, 255, 255, 0.94);
}

/* Folded Corner Detail */
.doc-paper-folded::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 28px 28px 0;
  border-color: transparent rgba(148, 163, 184, 0.50) transparent transparent;
  box-shadow: -3px 3px 6px rgba(15, 23, 42, 0.10);
  border-top-right-radius: 8px;
}
.doc-paper-folded::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 27px;
  height: 27px;
  background: linear-gradient(135deg, transparent 50%, rgba(226, 232, 240, 0.9) 50%);
  pointer-events: none;
  border-top-right-radius: 8px;
}

/* Section Specific Paper Placements & Rotations */
/* Larger tilted sheets near left and right edges of Hero */
.paper-hero-left {
  --paper-rot: -8deg;
  width: 260px;
  height: 340px;
  top: 7%;
  left: -45px;
  animation-delay: 0s;
}

.paper-hero-left-back {
  --paper-rot: 4deg;
  width: 230px;
  height: 300px;
  top: 22%;
  left: -20px;
  animation-delay: -4s;
}

.paper-hero-right {
  --paper-rot: 5deg;
  width: 270px;
  height: 350px;
  top: 9%;
  right: -50px;
  animation-delay: -2.5s;
}

.paper-hero-right-back {
  --paper-rot: -4deg;
  width: 240px;
  height: 310px;
  top: 24%;
  right: -25px;
  animation-delay: -6s;
}

.paper-hero-bottom {
  --paper-rot: -4deg;
  width: 210px;
  height: 270px;
  bottom: -35px;
  left: 18%;
  animation-delay: -8s;
}

.paper-tools-left {
  --paper-rot: -6deg;
  width: 230px;
  height: 290px;
  top: 6%;
  left: -50px;
  animation-delay: -2s;
}

.paper-tools-right {
  --paper-rot: 6deg;
  width: 240px;
  height: 300px;
  bottom: 8%;
  right: -45px;
  animation-delay: -5s;
}

.paper-apps-left {
  --paper-rot: 5deg;
  width: 225px;
  height: 285px;
  top: 12%;
  left: -45px;
  animation-delay: -1s;
}

.paper-apps-right {
  --paper-rot: -5deg;
  width: 245px;
  height: 305px;
  bottom: 10%;
  right: -50px;
  animation-delay: -4s;
}

.paper-about-left {
  --paper-rot: -7deg;
  width: 215px;
  height: 275px;
  top: 10%;
  left: -40px;
  animation-delay: -3.5s;
}

.paper-about-right {
  --paper-rot: 4deg;
  width: 235px;
  height: 295px;
  bottom: 8%;
  right: -40px;
  animation-delay: -6.5s;
}

.paper-contact-left {
  --paper-rot: -6deg;
  width: 230px;
  height: 290px;
  top: 16%;
  right: -40px;
  animation-delay: -2.5s;
}

/* --- Hero Section (Soft ice-blue with blue-to-lavender tint & subtle dot grid) --- */
.hero-section {
  position: relative;
  padding: 4.5rem 0 3.75rem 0;
  overflow: hidden;
  background: linear-gradient(175deg, #f0f6ff 0%, #f5f3ff 50%, #eff6ff 100%);
  background-image: radial-gradient(rgba(100, 116, 139, 0.16) 1.25px, transparent 1.25px);
  background-size: 24px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  scroll-margin-top: 4.5rem;
}

.hero-bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -100px;
  filter: blur(90px);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(37, 99, 235, 0.14) 45%, transparent 70%);
  opacity: 0.45;
}

.glow-2 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -90px;
  filter: blur(90px);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, rgba(56, 189, 248, 0.14) 50%, transparent 70%);
  opacity: 0.40;
}

.glow-3 {
  width: 440px;
  height: 440px;
  bottom: -120px;
  right: 15%;
  filter: blur(90px);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(37, 99, 235, 0.10) 50%, transparent 70%);
  opacity: 0.35;
}

.hero-container {
  position: relative;
  z-index: 2;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  margin-bottom: 1.15rem;
}

.hero-title {
  font-size: 3.15rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1.15rem;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-body);
  max-width: 720px;
  margin: 0 auto 2.25rem auto;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 3.25rem;
}

.hero-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.1rem 2rem;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  margin: 0 auto;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-dim);
}

.metric-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-light);
}

/* --- Quick Access Modules (Transition from ice-blue to light blue-gray) --- */
.quick-access-section {
  position: relative;
  overflow: hidden;
  padding-top: 2.75rem;
  padding-bottom: 2rem;
  background: linear-gradient(180deg, #f0f6ff 0%, #edf3f9 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  transition: all var(--transition-normal);
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

.quick-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
}

.tool-icon-glow {
  background: var(--accent-cyan-light);
  border-color: var(--accent-cyan-border);
  color: var(--accent-cyan);
}

.app-icon-glow {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.quick-details h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.quick-details p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

.quick-arrow {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
  transition: transform var(--transition-fast);
}

.quick-card:hover .quick-arrow {
  transform: translateX(4px);
}

/* --- Filter Bar Common --- */
.filter-controls-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2.25rem;
}

.filter-group {
  display: inline-flex;
  background: #ffffff;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  gap: 0.25rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-alt);
}

.filter-btn.active {
  background: var(--navy-dark);
  color: #ffffff;
}

/* --- Online Productivity Tools Section (Very light blue-gray background #F1F5F9) --- */
.tools-section {
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 8% 25%, rgba(59, 130, 246, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 92% 75%, rgba(139, 92, 246, 0.05) 0%, transparent 45%),
    linear-gradient(180deg, #f1f5f9 0%, #edf2f8 50%, #f1f5f9 100%);
  border-top: 1px solid rgba(203, 213, 225, 0.7);
  border-bottom: 1px solid rgba(203, 213, 225, 0.85);
}

.tools-search-bar {
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input-box input {
  width: 100%;
  padding: 0.85rem 2.85rem 0.85rem 3rem;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  transition: all var(--transition-fast);
}

.search-input-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.search-clear-btn {
  position: absolute;
  right: 1.15rem;
  font-size: 1.35rem;
  color: var(--text-dim);
  line-height: 1;
  padding: 0.2rem;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.tool-tags-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-tag-btn {
  padding: 0.35rem 0.95rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  transition: all var(--transition-fast);
}

.tool-tag-btn:hover {
  border-color: #94a3b8;
  color: var(--text-main);
  background: #f8fafc;
}

.tool-tag-btn.active {
  background: var(--navy-dark);
  color: #ffffff;
  border-color: var(--navy-dark);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.55rem;
}

.tool-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-top: 2.5px solid #2563eb;
  border-radius: 16px;
  padding: 1.55rem 1.45rem 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 12px -2px rgba(15, 23, 42, 0.05), 0 1px 4px -1px rgba(15, 23, 42, 0.03);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 250px;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.09), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
  border-top-color: #1d4ed8;
}

/* Locked Card Pastel Gradients */
.tool-card.card-theme-blue {
  background: linear-gradient(135deg, #ffffff 45%, #eff6ff 100%);
}
.tool-card.card-theme-green {
  background: linear-gradient(135deg, #ffffff 45%, #f0fdf4 100%);
}
.tool-card.card-theme-purple {
  background: linear-gradient(135deg, #ffffff 45%, #faf5ff 100%);
}
.tool-card.card-theme-orange {
  background: linear-gradient(135deg, #ffffff 45%, #fff7ed 100%);
}
.tool-card.card-theme-pink {
  background: linear-gradient(135deg, #ffffff 45%, #fdf2f8 100%);
}
.tool-card.card-theme-teal {
  background: linear-gradient(135deg, #ffffff 45%, #f0fdfa 100%);
}
.tool-card.card-theme-red {
  background: linear-gradient(135deg, #ffffff 45%, #fff1f2 100%);
}

/* Large Tilted Document / Paper Illustration on the Right */
.card-paper-illustration {
  position: absolute;
  right: -8px;
  bottom: 50px;
  width: 135px;
  height: 170px;
  pointer-events: none;
  z-index: 1;
  transform: rotate(-7deg);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-card:hover .card-paper-illustration {
  transform: rotate(-4deg) translateY(-4px) scale(1.03);
  opacity: 1;
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 2;
}

.tool-icon-wrapper {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
  transition: transform 0.2s ease;
  margin: 0;
  padding: 0;
}

.tool-icon-wrapper svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.tool-card:hover .tool-icon-wrapper {
  transform: scale(1.05);
}

.tool-status-pill {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
}

.tool-status-pill.status-live {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.tool-status-pill.status-soon {
  background: #f1f5f9;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
}

.status-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 1.5px rgba(16, 185, 129, 0.2);
}

.tool-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
  line-height: 1.3;
  position: relative;
  z-index: 2;
  max-width: 66%;
}

.tool-desc {
  font-size: 0.865rem;
  color: #475569;
  line-height: 1.48;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  position: relative;
  z-index: 2;
  max-width: 66%;
}

.tool-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  font-weight: 700;
  padding-top: 0.85rem;
  margin-top: auto;
  border-top: 1px solid rgba(241, 245, 249, 0.9);
  position: relative;
  z-index: 2;
}

.tool-cat-pill {
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.tool-action-label {
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.tool-card:hover .tool-action-label {
  color: #1e40af;
  text-decoration: underline;
  transform: translateX(2px);
}

@media (max-width: 1080px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
  }
  .tool-title,
  .tool-desc {
    max-width: 68%;
  }
  .card-paper-illustration {
    right: -6px;
    bottom: 48px;
  }
}

@media (max-width: 640px) {
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .tool-card {
    min-height: 236px;
    padding: 1.4rem 1.25rem 1.25rem 1.25rem;
  }
  .tool-title,
  .tool-desc {
    max-width: 70%;
  }
  .card-paper-illustration {
    right: -8px;
    bottom: 48px;
    opacity: 0.85;
  }
}

/* Workbench Specific Extensions */
.format-disclosure-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #2563eb;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.format-disclosure-box svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.merge-files-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.merge-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
}

.merge-file-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-file-name {
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.merge-file-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.merge-file-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.merge-btn-icon {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
}

.merge-btn-icon:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.merge-btn-icon.remove:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.excel-preview-wrapper {
  max-height: 280px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  background: #ffffff;
}

.excel-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.excel-preview-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #1e293b;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  position: sticky;
  top: 0;
  z-index: 10;
}

.excel-preview-table td {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  color: #334155;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-preview-table tr:nth-child(even) td {
  background: #f8fafc;
}

.docx-preview-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-radius: 4px;
  padding: 1.75rem;
  max-height: 290px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 1.25rem;
}

.docx-preview-sheet h1,
.docx-preview-sheet h2,
.docx-preview-sheet h3 {
  color: #0f172a;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
}

.docx-preview-sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
}

.docx-preview-sheet td,
.docx-preview-sheet th {
  border: 1px solid #cbd5e1;
  padding: 4px 8px;
}

/* Add Signature to PDF Workbench */
.sig-workbench-layout {
  display: grid;
  grid-template-columns: 1fr 355px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 860px) {
  .sig-workbench-layout {
    grid-template-columns: 1fr;
  }
}

.sig-preview-pane {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sig-doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.sig-page-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sig-stage-viewport {
  position: relative;
  background: #475569;
  border-radius: 6px;
  overflow: auto;
  min-height: 380px;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  user-select: none;
}

.sig-canvas-wrapper {
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  background: #ffffff;
  line-height: 0;
  display: inline-block;
}

.sig-canvas-wrapper canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Draggable & Resizable Signature Overlay Box on top of the PDF Canvas */
.sig-placement-box {
  position: absolute;
  border: 2px dashed #2563eb;
  background: rgba(37, 99, 235, 0.08);
  cursor: move;
  box-sizing: border-box;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: box-shadow 0.15s ease;
}

.sig-placement-box:hover,
.sig-placement-box.active {
  border-color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

.sig-placement-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.sig-resize-corner {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 12;
}

.sig-box-tag {
  position: absolute;
  top: -20px;
  left: 0;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
}

/* Sidebar Creator Controls */
.sig-controls-pane {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sig-tabs-bar {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  gap: 0.25rem;
}

.sig-tab-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.sig-tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.sig-pad-box {
  border: 2px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  position: relative;
  touch-action: none;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.05), inset 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.sig-pad-box:focus-within,
.sig-pad-box:hover {
  border-color: #93c5fd;
}

.sig-pad-box.active-drawing {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.sig-pad-box canvas {
  display: block;
  width: 100%;
  height: 215px; /* Desktop height: 200–240 CSS px */
  border-radius: 6px;
  cursor: crosshair;
  background: transparent;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .sig-pad-box canvas {
    height: 195px; /* Mobile height: 180–220 CSS px */
  }
}

/* Heading & Instruction above Signature Canvas */
.sig-pad-header {
  margin-bottom: 0.55rem;
}

.sig-pad-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.sig-pad-instruction {
  font-size: 0.775rem;
  color: #64748b;
  font-style: italic;
  margin: 0;
  line-height: 1.35;
}

/* Subtle SIGN HERE indicator badge */
.sig-pad-sign-here-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sig-pad-sign-here-tag.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Inside Empty-State Placeholder */
.sig-pad-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  pointer-events: none; /* CRITICAL: Never blocks mouse, touch, or stylus input */
  user-select: none;
  z-index: 2;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1rem;
}

.sig-pad-placeholder.hidden {
  opacity: 0;
  visibility: hidden;
}

.sig-placeholder-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sig-placeholder-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
}

.sig-placeholder-guide {
  opacity: 0.6;
  margin-top: 2px;
}

/* Subtle signature baseline guideline */
.sig-pad-baseline {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 40px;
  border-bottom: 1px dashed rgba(147, 197, 253, 0.6);
  pointer-events: none;
  z-index: 0;
}

.sig-btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  color: #475569;
}

.sig-ink-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.sig-colors-group,
.sig-pens-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sig-color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
}

.sig-color-dot.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px #2563eb;
}

.sig-pen-pill {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
}

.sig-pen-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.sig-presets-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.sig-preset-btn {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #334155;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.sig-preset-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.sig-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 0.775rem;
  color: #1e40af;
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

/* Add Signature to PDF: Choice Screen & Workflow Enhancements */
.sig-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1rem 0;
}

@media (max-width: 640px) {
  .sig-choice-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.sig-choice-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  user-select: none;
}

.sig-choice-card:hover,
.sig-choice-card:focus-visible {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.12), 0 4px 6px -2px rgba(37, 99, 235, 0.04);
  outline: none;
}

.sig-choice-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.sig-choice-card:hover .sig-choice-icon-wrap {
  transform: scale(1.08);
}

.sig-choice-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

.sig-choice-desc {
  font-size: 0.825rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.sig-choice-btn {
  pointer-events: none;
}

.sig-top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e2e8f0;
}

.sig-standalone-creator {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sig-standalone-pad-box {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  position: relative;
  touch-action: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.sig-standalone-pad-box canvas {
  display: block;
  width: 100%;
  height: 160px;
  border-radius: 8px;
  cursor: crosshair;
}

.sig-saved-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.85rem;
  font-size: 0.825rem;
  color: #166534;
}

.sig-saved-preview-thumb {
  max-height: 38px;
  max-width: 120px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  padding: 2px 6px;
}

/* --- Saved Signatures & PIN Protection Styles --- */
.sig-saved-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 2px;
}

.sig-saved-empty {
  text-align: center;
  padding: 1.5rem 0.75rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.sig-saved-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.15s ease;
  gap: 0.5rem;
}

.sig-saved-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.06);
}

.sig-saved-card-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.sig-saved-thumb-wrap {
  width: 58px;
  height: 32px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sig-saved-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sig-saved-info {
  min-width: 0;
  flex: 1;
}

.sig-saved-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sig-saved-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2px;
}

.sig-badge-locked {
  font-size: 0.65rem;
  font-weight: 600;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.sig-badge-unlocked {
  font-size: 0.65rem;
  font-weight: 600;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.sig-badge-unprotected {
  font-size: 0.65rem;
  font-weight: 600;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.sig-pin-security-notice {
  font-size: 0.7rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 0.6rem;
  line-height: 1.35;
}

/* PIN Dialog Overlay & Cards */
.sig-pin-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  animation: sigFadeIn 0.15s ease-out;
}

@keyframes sigFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sig-pin-dialog-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: sigSlideUp 0.18s ease-out;
}

@keyframes sigSlideUp {
  from { transform: translateY(14px) scale(0.97); }
  to { transform: translateY(0) scale(1); }
}

.sig-pin-dialog-header {
  padding: 0.95rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sig-pin-dialog-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.sig-pin-dialog-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.sig-pin-dialog-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sig-pin-dialog-body {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sig-pin-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sig-pin-field-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sig-pin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sig-pin-input {
  width: 100%;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  transition: all 0.15s ease;
  letter-spacing: 0.05em;
  background: #ffffff;
}

.sig-pin-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.sig-pin-input.is-invalid {
  border-color: #e11d48;
  background-color: #fff1f2;
}

.sig-pin-eye-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.sig-pin-eye-btn:hover {
  color: #1e293b;
}

.sig-pin-error-box {
  font-size: 0.75rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  display: none;
  line-height: 1.35;
}

.sig-pin-error-box.visible {
  display: block;
}

.sig-pin-throttle-box {
  font-size: 0.75rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  display: none;
  line-height: 1.35;
}

.sig-pin-throttle-box.visible {
  display: block;
}

.sig-pin-dialog-footer {
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.sig-manage-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.sig-manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 0.6rem;
}

.sig-manage-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* --- Protect PDF Workbench Styles --- */
.protect-workbench-root {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.protect-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  font-size: 0.785rem;
  color: #9f1239;
  line-height: 1.45;
}

.protect-file-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.protect-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.protect-file-icon {
  width: 36px;
  height: 36px;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.protect-file-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.protect-file-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2px;
}

.protect-file-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 500;
}

.protect-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.protect-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.protect-field-label {
  font-size: 0.815rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.protect-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.protect-input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
}

.protect-input:focus {
  outline: none;
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.protect-input.is-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

.protect-eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.protect-eye-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.protect-field-hint {
  font-size: 0.735rem;
  color: #64748b;
}

.protect-field-error {
  font-size: 0.735rem;
  color: #ef4444;
  font-weight: 500;
  display: none;
}

.protect-field-error.visible {
  display: block;
}

.protect-advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.protect-advanced-toggle:hover {
  background: #f1f5f9;
}

.protect-advanced-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.protect-permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

@media (max-width: 580px) {
  .protect-permissions-grid {
    grid-template-columns: 1fr;
  }
}

.protect-perm-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.775rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.protect-perm-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #e11d48;
  cursor: pointer;
}

.protect-security-specs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.725rem;
  color: #64748b;
  padding: 0.4rem 0.6rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
}

.protect-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #e11d48;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.protect-btn-submit:hover:not(:disabled) {
  background: #be123c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.protect-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.protect-success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1.5rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
}

/* --- Unlock PDF Workbench Styles --- */
.unlock-workbench-root {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.unlock-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  font-size: 0.785rem;
  color: #115e59;
  line-height: 1.45;
}

.unlock-file-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.unlock-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.unlock-file-icon {
  width: 36px;
  height: 36px;
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.unlock-file-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.unlock-file-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2px;
}

.unlock-file-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 500;
}

.unlock-file-badge.badge-algo {
  background: #ccfbf1;
  color: #0f766e;
  font-weight: 600;
}

.unlock-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.unlock-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.unlock-field-label {
  font-size: 0.815rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.unlock-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.unlock-input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
}

.unlock-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.unlock-input.is-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

.unlock-eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.unlock-eye-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.unlock-field-hint {
  font-size: 0.735rem;
  color: #64748b;
}

.unlock-field-error {
  font-size: 0.735rem;
  color: #ef4444;
  font-weight: 500;
  display: none;
}

.unlock-field-error.visible {
  display: block;
}

.unlock-security-specs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.725rem;
  color: #64748b;
  padding: 0.4rem 0.6rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
}

.unlock-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #0d9488;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unlock-btn-submit:hover:not(:disabled) {
  background: #0f766e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.unlock-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.unlock-success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1.5rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
}

/* --- OCR PDF & Image OCR Workbench Styles --- */
.ocr-workbench-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.ocr-mode-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.4rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: fit-content;
  margin: 0 auto;
}

.ocr-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ocr-mode-btn svg {
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.ocr-mode-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.ocr-mode-btn.active {
  color: #7e22ce;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ocr-notice-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #7e22ce;
  font-weight: 500;
  text-align: center;
}

.ocr-notice-banner svg {
  flex-shrink: 0;
  stroke: #9333ea;
}

.ocr-protocol-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 14px;
  color: #92400e;
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: left;
}

.ocr-protocol-warning-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}

.ocr-protocol-warning-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 3px;
}

.ocr-protocol-warning-text p {
  margin: 0;
}

.ocr-protocol-warning-text code {
  background: rgba(245, 158, 11, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 600;
}

.ocr-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.ocr-dropzone:hover, .ocr-dropzone.drag-over {
  border-color: #9333ea;
  background: #faf5ff;
  transform: translateY(-1px);
}

.ocr-dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f3e8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9333ea;
  margin-bottom: 0.25rem;
}

.ocr-dropzone-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ocr-dropzone-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.ocr-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.ocr-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
}

.ocr-direct-text-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  animation: fadeIn 0.3s ease;
}

.ocr-direct-text-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ocr-direct-text-icon {
  font-size: 1.4rem;
  color: #16a34a;
}

.ocr-direct-text-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 0.15rem;
}

.ocr-direct-text-desc {
  font-size: 0.78rem;
  color: #166534;
  margin: 0;
}

.ocr-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
}

.ocr-viewer-panel, .ocr-editor-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 480px;
}

.ocr-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.ocr-panel-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ocr-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ocr-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 0.35rem;
}

.ocr-tool-btn:hover:not(:disabled) {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.ocr-tool-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ocr-canvas-container {
  flex: 1;
  min-height: 340px;
  max-height: 520px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

.ocr-preview-canvas {
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  background: #ffffff;
  transition: transform 0.15s ease;
}

.ocr-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.ocr-page-input {
  width: 48px;
  text-align: center;
  padding: 0.25rem 0.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
}

.ocr-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ocr-lang-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ocr-lang-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.ocr-lang-select {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

.ocr-lang-select:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.15);
}

.ocr-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ocr-progress-wrap {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 8px;
}

.ocr-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7e22ce;
}

.ocr-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e9d5ff;
  border-radius: 4px;
  overflow: hidden;
}

.ocr-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9333ea, #a855f7);
  border-radius: 4px;
  transition: width 0.2s ease;
}

.ocr-text-editor-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 280px;
}

.ocr-textarea {
  flex: 1;
  width: 100%;
  min-height: 280px;
  padding: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #0f172a;
  background: #ffffff;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.ocr-textarea:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.12);
}

.ocr-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.ocr-stats-pill {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  background: #f1f5f9;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
}

.ocr-export-btns {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

@media (max-width: 900px) {
  .ocr-workspace-grid {
    grid-template-columns: 1fr;
  }
  .ocr-viewer-panel, .ocr-editor-panel {
    min-height: auto;
  }
  .ocr-direct-text-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .ocr-mode-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
}

.no-results-box {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-medium);
  max-width: 480px;
  margin: 2rem auto;
}

.no-results-icon {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}

.no-results-box h3 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.no-results-box p {
  color: var(--text-body);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* --- Android Apps Section (Milk White #E8F0F0 Theme Preservation) --- */
.apps-section {
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 90% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(14, 165, 233, 0.04) 0%, transparent 45%),
    linear-gradient(180deg, #edf4f5 0%, #e8f0f0 50%, #edf4f5 100%);
  border-top: 1px solid rgba(203, 213, 225, 0.6);
  border-bottom: 1px solid rgba(203, 213, 225, 0.6);
}

/* =================================================================
   AAYAM INNOVATION — ALL APPS PROMOTIONAL BANNER
   ================================================================= */
.all-apps-banner-card {
  position: relative;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  border-radius: 30px;
  background: #ffffff;
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.98) 0%, 
      rgba(240, 253, 250, 0.95) 25%, 
      rgba(245, 243, 255, 0.95) 50%, 
      rgba(255, 241, 242, 0.95) 75%, 
      rgba(255, 255, 255, 0.98) 100%
    );
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 24px 60px -12px rgba(99, 102, 241, 0.16), 
    0 12px 28px -6px rgba(14, 165, 233, 0.14),
    0 2px 6px rgba(0, 0, 0, 0.02),
    inset 0 1px 2px rgba(255, 255, 255, 1);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.all-apps-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 30px 70px -12px rgba(99, 102, 241, 0.2), 
    0 16px 36px -6px rgba(14, 165, 233, 0.18),
    inset 0 1px 2px rgba(255, 255, 255, 1);
}

/* Fluid pastel wave SVG in card background */
.all-apps-wave-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.all-apps-banner-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.5rem 3.75rem;
  min-height: 440px;
  gap: 2rem;
}

/* Left Content Column */
.all-apps-content-col {
  flex: 1 1 50%;
  max-width: 530px;
  z-index: 3;
}

.all-apps-brand-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.all-apps-wordmark-img {
  height: 38px;
  width: auto;
  max-width: 205px;
  object-fit: contain;
  display: block;
}

.all-apps-brand-glow-bar {
  width: 64px;
  height: 3px;
  border-radius: 999px;
  margin-top: 8px;
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 35%, #ec4899 70%, #f97316 100%);
  box-shadow: 0 2px 8px rgba(129, 140, 248, 0.5);
}

.all-apps-headline {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0.85rem 0 0.85rem 0;
}

.all-apps-gradient-title {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 28%, #ec4899 65%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.all-apps-desc {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  color: #475569;
  font-weight: 500;
  line-height: 1.55;
  margin: 0 0 2.25rem 0;
  max-width: 440px;
}

.all-apps-cta-wrap {
  display: flex;
  align-items: center;
}

/* Primary Google Play CTA button */
.all-apps-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, #00b050 0%, #00c675 25%, #00a0dc 70%, #0080ff 100%);
  color: #ffffff !important;
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 
    0 10px 28px -4px rgba(0, 160, 220, 0.45), 
    0 4px 12px rgba(0, 176, 80, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.all-apps-cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 16px 36px -4px rgba(0, 160, 220, 0.6), 
    0 6px 18px rgba(0, 176, 80, 0.45);
}

.all-apps-cta-btn:active {
  transform: translateY(0) scale(0.99);
}

.all-apps-cta-btn:focus-visible {
  outline: 3px solid #00b0ff;
  outline-offset: 3px;
}

.all-apps-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.all-apps-cta-arrow {
  flex-shrink: 0;
  stroke: #ffffff;
  transition: transform 0.2s ease;
}

.all-apps-cta-btn:hover .all-apps-cta-arrow {
  transform: translateX(4px);
}

/* Right Visual Column */
.all-apps-visual-col {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  z-index: 2;
}

.all-apps-ribbon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Tilted Phone 3D Device */
.all-apps-phone-device {
  position: relative;
  z-index: 5;
  transform: rotate(-10deg) perspective(1000px) rotateY(4deg) translateY(-6px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.all-apps-banner-card:hover .all-apps-phone-device {
  transform: rotate(-8deg) perspective(1000px) rotateY(2deg) translateY(-10px);
}

.all-apps-phone-body {
  width: 210px;
  height: 380px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 38px;
  padding: 8px;
  box-shadow: 
    0 30px 65px -12px rgba(15, 23, 42, 0.35), 
    0 14px 28px -6px rgba(15, 23, 42, 0.2), 
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.3), 
    inset 0 0 0 3.5px rgba(30, 41, 59, 0.85);
  position: relative;
}

.all-apps-phone-camera {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #090d16;
  z-index: 10;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

.all-apps-phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.03);
}

.all-apps-screen-glass-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.all-apps-screen-logo-wrap {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.all-apps-screen-play-icon {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.1));
  transition: transform 0.35s ease;
}

.all-apps-banner-card:hover .all-apps-screen-play-icon {
  transform: scale(1.06);
}

/* Floating 3D App Squircles */
.all-apps-float-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #ffffff;
  z-index: 6;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.all-apps-float-icon svg {
  display: block;
}

.all-apps-banner-card:hover .all-apps-float-icon {
  transform: translateY(-4px) scale(1.04);
}

.tile-blue {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.45), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.6);
}

.tile-green {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 12px 24px -4px rgba(5, 150, 105, 0.45), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.6);
}

.tile-orange {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 12px 24px -4px rgba(234, 88, 12, 0.45), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.6);
}

.tile-purple {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #c084fc 0%, #7c3aed 100%);
  box-shadow: 0 12px 24px -4px rgba(124, 58, 237, 0.45), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.6);
}

.tile-pink {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #f472b6 0%, #e11d48 100%);
  box-shadow: 0 12px 24px -4px rgba(225, 29, 72, 0.45), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.6);
}

/* Floating 3D Spheres */
.all-apps-sphere {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
}

.sphere-peach {
  width: 24px;
  height: 24px;
  background: radial-gradient(circle at 35% 35%, #fed7aa 0%, #fb923c 50%, #ea580c 100%);
  box-shadow: 0 6px 14px rgba(234, 88, 12, 0.3);
}

.sphere-purple {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 35% 35%, #e9d5ff 0%, #c084fc 50%, #7c3aed 100%);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.sphere-cyan {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 35%, #cffafe 0%, #22d3ee 50%, #0891b2 100%);
  box-shadow: 0 4px 10px rgba(8, 145, 178, 0.3);
}

.sphere-blue {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle at 35% 35%, #bfdbfe 0%, #60a5fa 50%, #2563eb 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

/* Floating 3D Sparkle Stars */
.all-apps-sparkle {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(251, 191, 36, 0.5));
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .all-apps-banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 3rem 2rem;
    gap: 2.75rem;
  }
  .all-apps-content-col {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .all-apps-brand-wrap {
    align-items: center;
  }
  .all-apps-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .all-apps-visual-col {
    width: 100%;
    max-width: 440px;
    min-height: 380px;
  }
}

@media (max-width: 640px) {
  .all-apps-banner-card {
    border-radius: 22px;
  }
  .all-apps-banner-inner {
    padding: 2.25rem 1.25rem;
  }
  .all-apps-headline {
    font-size: 1.85rem;
  }
  .all-apps-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1.5rem;
  }
  .all-apps-phone-body {
    width: 180px;
    height: 330px;
  }
  .all-apps-visual-col {
    min-height: 330px;
  }
  .all-apps-float-icon {
    transform: scale(0.85);
  }
}

/* --- Why Choose Section (Warm, extremely light blue-gray background) --- */
.why-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f3f5f9 50%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
}

.feature-icon-blue { background: var(--primary-light); color: var(--primary); }
.feature-icon-violet { background: var(--accent-violet-light); color: var(--accent-violet); }
.feature-icon-cyan { background: var(--accent-cyan-light); color: var(--accent-cyan); }
.feature-icon-gradient {
  background: var(--navy-dark);
  color: #ffffff;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.885rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* --- About Section (Milk White #E8F0F0 Theme & Compact Layout) --- */
.about-section {
  position: relative;
  overflow: hidden;
  background-color: #E8F0F0;
  background: linear-gradient(180deg, #edf4f4 0%, #E8F0F0 50%, #e1ebeb 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 4.5rem 0;
}

.about-main-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr; /* ~57% text, ~43% image */
  gap: 3rem;
  align-items: center;
}

.about-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #065f46;
  background: #e2f2ea;
  border: 1px solid #c7e8d7;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.about-main-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 0.5rem 0;
}

.about-brand-highlight {
  color: #0d5f4e; /* Deep emerald/teal matching brand identity */
}

.about-subtitle {
  font-size: 1.22rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.85rem 0;
  line-height: 1.35;
}

.about-desc-text {
  font-size: 0.98rem;
  color: #475569;
  line-height: 1.62;
  margin: 0 0 1.5rem 0;
  max-width: 600px;
}

/* Four Compact Value Cards */
.about-value-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.about-val-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-val-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.about-val-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-mint {
  background: #e6f9f0;
  color: #059669;
}

.icon-yellow {
  background: #fef9c3;
  color: #d97706;
}

.icon-cyan {
  background: #e0f2fe;
  color: #0284c7;
}

.icon-pink {
  background: #fee2e2;
  color: #e11d48;
}

.about-val-info {
  display: flex;
  flex-direction: column;
}

.about-val-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
  line-height: 1.25;
}

.about-val-desc {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
  line-height: 1.3;
}

/* Action Buttons Row */
.about-actions-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.about-btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #064e3b; /* Deep authentic forest teal */
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.25);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.about-btn-play:hover {
  background: #04392a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(6, 78, 59, 0.35);
}

.about-btn-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-btn-arrow {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.about-btn-play:hover .about-btn-arrow {
  transform: translateX(3px);
}

.about-btn-journey {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #0f172a !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-full);
  border: 1.5px solid #cbd5e1;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.about-btn-journey:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.06);
}

.about-btn-arrow-down {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.about-btn-journey:hover .about-btn-arrow-down {
  transform: translateY(2px);
}

/* Right Column: AAYAM Innovation Banner Image */
.about-image-col {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-founder-frame {
  position: relative;
  width: 100%;
  max-width: 490px;
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 22px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 12px 32px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-founder-img {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1670 / 941;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* --- Our Story Subsection --- */
.our-story-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.our-story-card-wrapper {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.25rem 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.our-story-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2.5rem;
  align-items: center;
}

.our-story-heading {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0.4rem 0 0.85rem 0;
}

.our-story-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.our-story-cards-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.story-pillar-card {
  padding: 1.25rem 1rem;
  border-radius: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.story-pillar-card.card-mission {
  background: #f0f7ff;
  border: 1px solid #dbeafe;
}
.story-pillar-card.card-mission .story-pillar-icon {
  color: #0284c7;
}

.story-pillar-card.card-vision {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
}
.story-pillar-card.card-vision .story-pillar-icon {
  color: #059669;
}

.story-pillar-card.card-values {
  background: #fffbeb;
  border: 1px solid #fef3c7;
}
.story-pillar-card.card-values .story-pillar-icon {
  color: #d97706;
}

.story-pillar-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.story-pillar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem 0;
}

.story-pillar-text {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

/* --- Contact & Support Section (Soft pale blue background) --- */
.contact-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #eff6ff 0%, #f2f7fc 50%, #edf5fc 100%);
  border-bottom: 1px solid var(--border-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: flex-start;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
}

.info-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.info-content p {
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.contact-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  word-break: break-all;
}

.contact-link:hover {
  text-decoration: underline;
}

.faq-container {
  margin-top: 0.75rem;
}

.faq-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
}

.faq-item summary {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
}

.faq-item p {
  margin-top: 0.45rem;
  font-size: 0.835rem;
  color: var(--text-body);
  line-height: 1.5;
}

/* Contact Form */
.form-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
}

.form-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.form-subtitle {
  font-size: 0.875rem;
  color: var(--text-body);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.835rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-group .required {
  color: #dc2626;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background: var(--bg-main);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.form-control.input-error {
  border-color: #dc2626;
  background: #fffbfa;
}

.field-error {
  display: none;
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.3rem;
  font-weight: 500;
}

.field-error.visible {
  display: block;
}

.form-success-alert {
  margin-top: 1.25rem;
  padding: 0.95rem 1.15rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #065f46;
  font-size: 0.875rem;
}

.success-icon {
  width: 24px;
  height: 24px;
  background: #10b981;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.form-error-alert {
  margin-top: 1.25rem;
  padding: 0.95rem 1.15rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #991b1b;
  font-size: 0.875rem;
}

.error-icon {
  width: 24px;
  height: 24px;
  background: #ef4444;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.form-error-alert a {
  color: #b91c1c;
  text-decoration: underline;
  font-weight: 600;
}

.form-error-alert a:hover {
  color: #7f1d1d;
}

.btn-submit.loading {
  opacity: 0.85;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: btnSpin 0.7s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

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

/* --- Interactive Tool Modal / Workbench --- */
.tool-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.tool-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 2010;
  background: #ffffff;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform var(--transition-smooth);
  border: 1px solid var(--border-light);
}

.modal-dialog-readable {
  max-width: 660px;
}

.tool-modal.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.15rem 1.65rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-tool-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
}

.modal-tool-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.modal-status-badge {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.modal-status-badge.badge-soon {
  background: #f1f5f9;
  color: var(--text-dim);
  border-color: var(--border-light);
}

.modal-close-btn {
  font-size: 1.65rem;
  line-height: 1;
  color: var(--text-dim);
  padding: 0.25rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.65rem;
  overflow-y: auto;
  max-height: calc(90vh - 75px);
}

.workbench-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.workbench-lead {
  font-size: 0.875rem;
  color: var(--text-body);
}

.dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone-icon {
  margin: 0 auto 0.75rem auto;
  display: flex;
  justify-content: center;
}

.dropzone-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.dropzone-sub {
  font-size: 0.825rem;
  color: var(--text-dim);
}

.file-hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preview-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.preview-img-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 240px;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: #e2e8f0;
}

.preview-img-container img {
  max-height: 240px;
  object-fit: contain;
}

.tool-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.control-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.control-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.color-picker-input {
  height: 36px;
  width: 72px;
  padding: 2px;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
}

.controls-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.835rem;
  font-weight: 600;
  cursor: pointer;
}

.preset-btn-group {
  display: flex;
  gap: 0.35rem;
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-group input[type="range"] {
  flex: 1;
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  font-size: 0.825rem;
}

.stat-tag {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.stat-tag strong {
  color: var(--text-main);
}

/* Text Case Converter */
.case-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 0.45rem;
}

.case-btn {
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  transition: all var(--transition-fast);
  text-align: center;
}

.case-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.text-workbench-textarea {
  width: 100%;
  height: 170px;
  padding: 0.85rem;
  font-size: 0.925rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  resize: vertical;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.text-workbench-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.text-stats-ribbon {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.stat-bubble {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-surface-alt);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.stat-bubble strong {
  color: var(--text-main);
}

.text-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.action-group {
  display: flex;
  gap: 0.45rem;
}

/* Coming Soon Tool Box */
.coming-soon-box {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.coming-soon-icon-wrap {
  margin-bottom: 1.15rem;
  display: flex;
  justify-content: center;
}

.coming-soon-box h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.coming-soon-box p {
  color: var(--text-body);
  max-width: 480px;
  margin: 0 auto 1.35rem auto;
  line-height: 1.55;
  font-size: 0.9rem;
}

.privacy-pill-container {
  margin-bottom: 1.5rem;
}

.privacy-assurance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: #1e40af;
  font-weight: 600;
}

/* Typography Modal Content */
.typography-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

.typography-content p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.policy-date {
  margin-top: 1.75rem;
  font-size: 0.825rem;
  color: var(--text-dim);
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  background: var(--navy-dark);
  color: #ffffff;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slide-in-toast 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-icon {
  display: flex;
  align-items: center;
}

@keyframes slide-in-toast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.toast-fading {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-normal);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* --- Site Footer --- */
.site-footer {
  background-color: #0b0f19;
  color: #94a3b8;
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #1e293b;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 320px;
}

.deployment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(56, 189, 248, 0.2);
  width: fit-content;
}

.cf-icon {
  display: flex;
  align-items: center;
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.15rem;
  letter-spacing: 0.02em;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav-list a {
  color: #94a3b8;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright-text {
  color: #94a3b8;
}

/* ===================================================================
   RESPONSIVE MEDIA QUERIES
   =================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .about-main-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .our-story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .our-story-card-wrapper {
    padding: 1.85rem 1.75rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
  }
}

@media (max-width: 768px) {
  .our-story-cards-col {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .about-main-title {
    font-size: 2rem;
  }
  .about-subtitle {
    font-size: 1.15rem;
  }
  .about-founder-frame {
    padding: 0.9rem;
    border-radius: 18px;
  }
  .brand-wordmark-img {
    height: 30px;
    max-width: 150px;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .mobile-menu {
    display: block;
  }
  .hero-section {
    padding: 3rem 0 2.5rem 0;
    scroll-margin-top: 4.25rem;
  }
  .hero-title {
    font-size: 2.15rem;
  }
  .hero-lead {
    font-size: 1rem;
  }
  .hero-metrics {
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.15rem 1.35rem;
  }
  .metric-divider {
    width: 60px;
    height: 1px;
  }
  .quick-access-grid {
    grid-template-columns: 1fr;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .modal-dialog {
    max-height: 95vh;
  }
  .modal-body {
    padding: 1.15rem;
  }
  .tool-controls-grid {
    grid-template-columns: 1fr;
  }
  .doc-paper {
    opacity: 0.055;
    transform: scale(0.68) rotate(var(--paper-rot, 0deg)) !important;
  }
}

@media (max-width: 480px) {
  .brand-wordmark-img {
    height: 26px;
    max-width: 130px;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .about-main-title {
    font-size: 1.75rem;
  }
  .about-subtitle {
    font-size: 1.05rem;
  }
  .about-value-cards {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .about-actions-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .about-btn-play,
  .about-btn-journey {
    width: 100%;
    justify-content: center;
  }
  .our-story-card-wrapper {
    padding: 1.5rem 1.15rem;
  }
  .our-story-heading {
    font-size: 1.4rem;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .case-buttons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .doc-paper {
    opacity: 0.045;
    transform: scale(0.55) rotate(var(--paper-rot, 0deg)) !important;
  }
}

/* --- Watermark & Page Numbers Workbench Styles --- */
.wm-workbench-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.wm-notice-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #c2410c;
  font-weight: 500;
  text-align: center;
}

.wm-notice-banner svg {
  flex-shrink: 0;
  stroke: #ea580c;
}

.wm-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.wm-dropzone:hover, .wm-dropzone.drag-over {
  border-color: #ea580c;
  background: #fff7ed;
  transform: translateY(-1px);
}

.wm-dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #ffedd5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
  margin-bottom: 0.25rem;
}

.wm-dropzone-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.wm-dropzone-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.wm-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.wm-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c2410c;
  background: #ffedd5;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.wm-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 1.25rem;
  width: 100%;
  align-items: start;
}

@media (max-width: 880px) {
  .wm-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.wm-preview-panel {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wm-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wm-page-nav, .wm-zoom-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wm-page-input {
  width: 48px;
  height: 28px;
  padding: 2px 4px;
  font-size: 0.8rem;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-weight: 600;
}

.wm-btn-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wm-btn-icon:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.wm-btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wm-btn-pill {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wm-btn-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.wm-btn-change {
  color: #ea580c;
  border-color: #fed7aa;
  background: #fff7ed;
}

.wm-btn-change:hover {
  background: #ffedd5;
  color: #c2410c;
}

.wm-canvas-container {
  min-height: 400px;
  max-height: 540px;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f1f5f9;
  padding: 1.25rem;
}

.wm-preview-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  border-radius: 3px;
  background: #ffffff;
  display: block;
  margin: 0 auto;
}

.wm-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.85rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #64748b;
}

.wm-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 610px;
  overflow-y: auto;
  padding-right: 4px;
}

.wm-section-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
}

.wm-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.wm-section-header-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.wm-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.wm-tab-group {
  display: flex;
  gap: 4px;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.wm-tab-btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #475569;
  text-align: center;
}

.wm-tab-btn:hover {
  color: #0f172a;
}

.wm-tab-btn.active {
  background: #ffffff;
  color: #ea580c;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.wm-field-group {
  margin-bottom: 0.65rem;
}

.wm-field-group:last-child {
  margin-bottom: 0;
}

.wm-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.25rem;
}

.wm-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.wm-val-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ea580c;
  background: #fff7ed;
  padding: 1px 6px;
  border-radius: 4px;
}

.wm-input, .wm-select {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.wm-input:focus, .wm-select:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.wm-slider {
  width: 100%;
  accent-color: #ea580c;
  height: 5px;
  cursor: pointer;
}

.wm-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.wm-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.35rem;
}

.wm-preset-chip {
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wm-preset-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.wm-color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wm-color-picker {
  width: 32px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
  padding: 1px;
}

.wm-color-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wm-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.18);
  transition: transform 0.15s ease;
}

.wm-color-dot:hover {
  transform: scale(1.15);
}

.wm-pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.wm-pos-btn, .wm-img-pos-btn {
  padding: 5px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.wm-pos-btn:hover, .wm-img-pos-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.wm-pos-btn.active, .wm-img-pos-btn.active {
  background: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
}

.wm-img-upload-box {
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wm-img-upload-box:hover {
  border-color: #ea580c;
  background: #fff7ed;
}

#wm-img-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #64748b;
  text-align: center;
}

.wm-img-loaded-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wm-img-preview-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.wm-img-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  overflow: hidden;
}

.wm-img-meta strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.wm-img-meta span {
  color: #64748b;
  font-size: 0.7rem;
}

.wm-btn-remove-img {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.wm-btn-remove-img:hover {
  background: #fee2e2;
}

.wm-range-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.76rem;
  color: #334155;
  margin-top: 0.2rem;
}

.wm-range-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.wm-field-hint {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.wm-action-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.wm-status-pill {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

/* ===================================================================
   OPTION B GLOBAL IMPORT UI SPECIFICATION (Strict Visual Reference)
   Variation B: Two-Column Dropzone + Illustration Panel
   =================================================================== */

.option-b-import-container {
  width: 100%;
  margin: 0;
}

.option-b-privacy-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 0.775rem;
  color: #1e40af;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.option-b-privacy-banner svg {
  flex-shrink: 0;
}

.option-b-privacy-banner strong {
  font-weight: 700;
  color: #1e3a8a;
}

/* Desktop Two-Column Side-by-Side Grid */
.option-b-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 1rem;
  align-items: stretch;
  width: 100%;
}

/* Left Column: Dashed Pale-Blue Dropzone */
.option-b-dropzone {
  min-width: 0;
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  background: #f8fbff;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 250px;
  max-height: 280px;
  position: relative;
  user-select: none;
  box-sizing: border-box;
}

.option-b-dropzone:hover,
.option-b-dropzone:focus-visible,
.option-b-dropzone.drag-active {
  border-color: #2563eb;
  background: #eff6ff;
  outline: none;
}

.option-b-dropzone.drag-active {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.option-b-upload-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.option-b-dropzone-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.option-b-dropzone-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.85rem;
}

.option-b-browse-btn {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1.35rem;
  border-radius: 9999px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.option-b-browse-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.option-b-browse-btn:active {
  transform: translateY(0);
}

.option-b-format-hint {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.65rem;
  max-width: 260px;
  line-height: 1.35;
}

/* Right Column: Pastel Illustration & Checklist Panel */
.option-b-info-col {
  min-width: 0;
  background: linear-gradient(155deg, #f0f7ff 0%, #e0f2fe 100%);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 1rem 1rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 250px;
  max-height: 280px;
  box-sizing: border-box;
}

.option-b-illustration-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  max-height: 135px;
}

.option-b-illustration-svg {
  max-width: 220px;
  max-height: 125px;
  width: 100%;
  height: auto;
  overflow: visible;
}

.option-b-checklist {
  width: 100%;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.option-b-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.785rem;
  color: #1e293b;
  font-weight: 500;
  line-height: 1.25;
}

.option-b-check-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Responsive Breakpoints - Stack only on narrow mobile screens */
@media (max-width: 768px) {
  .option-b-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }
  .option-b-dropzone {
    min-height: auto;
    max-height: none;
    padding: 1.25rem 1rem;
  }
  .option-b-info-col {
    min-height: auto;
    max-height: none;
    padding: 1rem;
  }
  .option-b-dropzone-title {
    font-size: 1rem;
  }
}

/* --- 6.18 Verify PDF Signature Workbench Styles --- */
.verify-sig-workbench-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.verify-sig-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex-wrap: wrap;
}

.verify-sig-file-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.verify-sig-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.verify-sig-file-details {
  min-width: 0;
}

.verify-sig-file-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.verify-sig-file-sub {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.verify-sig-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.15fr);
  gap: 1.25rem;
  align-items: start;
}

/* Left Column: PDF Preview */
.verify-sig-preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.verify-sig-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.verify-sig-preview-nav,
.verify-sig-preview-zoom {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.verify-sig-page-indicator {
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  padding: 0 0.25rem;
}

.verify-sig-viewport {
  background: #334155;
  min-height: 420px;
  max-height: 560px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

.verify-sig-canvas {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: #ffffff;
  max-width: 100%;
  height: auto;
}

/* Right Column: Verification Results Panel */
.verify-sig-results-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Verdict Banners */
.verify-verdict-card {
  padding: 1.15rem 1.25rem;
  border-radius: 10px;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.verify-verdict-valid {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.verify-verdict-untrusted {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.verify-verdict-invalid {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.verify-verdict-none {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.verify-verdict-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-verdict-content {
  flex: 1;
  min-width: 0;
}

.verify-verdict-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.verify-verdict-title {
  font-size: 1rem;
  font-weight: 700;
}

.verify-verdict-pill {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.verify-pill-valid { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.verify-pill-untrusted { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.verify-pill-invalid { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.verify-pill-none { background: #e2e8f0; color: #475569; border: 1px solid #cbd5e1; }

.verify-verdict-desc {
  font-size: 0.835rem;
  line-height: 1.45;
}

/* Tabs for multiple signatures */
.verify-sig-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.25rem;
  overflow-x: auto;
}

.verify-sig-tab {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

.verify-sig-tab.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

/* Section Cards */
.verify-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.verify-section-header {
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.verify-section-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.verify-section-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.verify-kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed #f1f5f9;
}

.verify-kv-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.verify-k {
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
}

.verify-v {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.verify-badge-green {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.725rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.verify-badge-red {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.725rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.verify-badge-amber {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.725rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.verify-hash-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-family: monospace;
  font-size: 0.72rem;
  color: #334155;
  word-break: break-all;
  user-select: all;
}

.verify-notice-box {
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.775rem;
  color: #115e59;
  line-height: 1.45;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.verify-actions-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .verify-sig-grid {
    grid-template-columns: 1fr;
  }
  .verify-sig-viewport {
    min-height: 320px;
    max-height: 420px;
  }
}

/* --- 6.19 Passport Photo & Print Studio Workbench Styles --- */
/* Expanded Desktop Modal for Passport Photo Studio */
.tool-modal.modal-passport-open .modal-dialog,
.tool-modal:has(.passport-workbench-root) .modal-dialog {
  max-width: min(1280px, 95vw);
  width: min(1280px, 95vw);
  max-height: 94vh;
  height: min(94vh, 880px);
}

@media (min-width: 861px) {
  .tool-modal.modal-passport-open .modal-body,
  .tool-modal:has(.passport-workbench-root) .modal-body {
    padding: 0.65rem 1.15rem 0.75rem 1.15rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

.passport-workbench-root {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

.passport-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.passport-file-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.passport-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.passport-file-details {
  min-width: 0;
}

.passport-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.passport-file-sub {
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: nowrap;
}

.passport-active-dim-badge {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  border: 1px solid #c7d2fe;
  white-space: nowrap;
}

.passport-grid {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(350px, 1.15fr);
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

/* Cards */
.passport-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.passport-card-header {
  padding: 0.45rem 0.85rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.passport-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.passport-card-body {
  padding: 0.4rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
}

/* Crop Viewport */
.passport-crop-viewport {
  position: relative;
  background: #1e293b;
  border-radius: 8px;
  flex: 1;
  min-height: 160px;
  max-height: 235px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  overflow: hidden;
  user-select: none;
}

.passport-crop-canvas-wrapper {
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.passport-crop-canvas-wrapper:active {
  cursor: grabbing;
}

.passport-crop-canvas {
  display: block;
  background: #ffffff;
}

.passport-crop-hint {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Toolbar Controls */
.passport-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.passport-btn-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Preset Selector */
.passport-preset-select {
  width: 100%;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.passport-preset-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.passport-dim-display-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.76rem;
  color: #166534;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-shrink: 0;
}

.passport-dim-val {
  font-weight: 700;
  font-size: 0.8rem;
}

/* Background Color Chips */
.passport-color-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.passport-color-chip {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.passport-color-chip:hover {
  transform: scale(1.08);
}

.passport-color-chip.active {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.passport-color-chip.active::after {
  content: '✓';
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f172a;
}

.passport-color-chip.chip-dark.active::after {
  color: #ffffff;
}

.passport-color-chip.chip-original {
  background: #f1f5f9;
  color: #475569;
}

.passport-color-chip.chip-original.active {
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.passport-color-chip.chip-original.active::after {
  display: none;
}

.passport-custom-color-input {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  flex-shrink: 0;
}

/* Copies Selector */
.passport-copies-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.passport-copy-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.passport-copy-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.passport-copy-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4338ca;
}

.passport-stepper {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  flex-shrink: 0;
}

.passport-stepper-btn {
  width: 26px;
  height: 26px;
  background: #f8fafc;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.passport-stepper-btn:hover {
  background: #e2e8f0;
}

.passport-stepper-input {
  width: 38px;
  height: 26px;
  border: none;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
}

/* Sheet stats badge */
#passport-sheet-stats {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
  display: inline-block;
  text-align: right;
  flex-shrink: 0;
}

/* A4 Preview Container */
.passport-a4-viewport {
  background: #475569;
  border-radius: 8px;
  flex: 1;
  min-height: 220px;
  max-height: 380px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.passport-a4-paper {
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
}

.passport-a4-footer-info {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  justify-content: center;
  flex-shrink: 0;
}

.passport-actions-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.25rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .passport-workbench-root {
    flex: none;
  }
  .passport-grid {
    grid-template-columns: 1fr;
    flex: none;
  }
  .passport-card {
    height: auto;
  }
  .passport-card-body {
    height: auto;
  }
  .passport-crop-viewport {
    min-height: 280px;
    max-height: none;
  }
  .passport-a4-viewport {
    min-height: 320px;
    max-height: none;
    overflow: auto;
  }
  .passport-copies-row {
    flex-wrap: wrap;
  }
  .passport-toolbar-row {
    flex-wrap: wrap;
  }
  .passport-actions-bar {
    flex-wrap: wrap;
  }
}

/* --- 6.20 ID Card Print Studio Workbench Styles --- */
/* Expanded Desktop Modal for ID Card Print Studio */
.tool-modal.modal-idcard-open .modal-dialog,
.tool-modal:has(.idcard-workbench-root) .modal-dialog {
  max-width: min(1280px, 95vw);
  width: min(1280px, 95vw);
  max-height: 94vh;
  height: min(94vh, 880px);
}

@media (min-width: 861px) {
  .tool-modal.modal-idcard-open .modal-body,
  .tool-modal:has(.idcard-workbench-root) .modal-body {
    padding: 0.65rem 1.15rem 0.75rem 1.15rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

.idcard-workbench-root {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

/* Side Selection Screen */
.idcard-selection-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1rem 0.5rem;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.idcard-selection-header {
  text-align: center;
}

.idcard-selection-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.idcard-selection-sub {
  font-size: 0.85rem;
  color: #64748b;
  max-width: 460px;
  margin: 0 auto;
}

.idcard-selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.idcard-mode-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

.idcard-mode-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.1);
  transform: translateY(-2px);
}

.idcard-mode-card.selected {
  border-color: #0d9488;
  background: #f0fdfa;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.25);
}

.idcard-mode-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}

.idcard-mode-card.selected .idcard-mode-card-icon {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #0d9488;
}

.idcard-mode-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.idcard-mode-card-desc {
  font-size: 0.785rem;
  color: #64748b;
  line-height: 1.35;
}

.idcard-mode-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  transition: all 0.2s ease;
}

.idcard-mode-card.selected .idcard-mode-radio {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}

.idcard-mode-radio::after {
  content: '✓';
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  display: none;
}

.idcard-mode-card.selected .idcard-mode-radio::after {
  display: block;
}

/* Dual Import Panels for Both Sides Mode */
.idcard-dual-import-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.idcard-import-card {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.idcard-import-card.drag-over {
  border-color: #0d9488;
  background: #f0fdfa;
}

.idcard-import-card.ready {
  border-style: solid;
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.idcard-import-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.idcard-thumb-preview {
  width: 52px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  object-fit: cover;
  background: #f8fafc;
  flex-shrink: 0;
}

.idcard-thumb-placeholder {
  width: 52px;
  height: 34px;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.idcard-import-card-info {
  min-width: 0;
}

.idcard-import-card-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.idcard-import-card-sub {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* File Bar */
.idcard-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.idcard-file-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.idcard-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.idcard-file-details {
  min-width: 0;
}

.idcard-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.idcard-file-sub {
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: nowrap;
}

.idcard-active-dim-badge {
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  border: 1px solid #99f6e4;
  white-space: nowrap;
}

/* Main Grid */
.idcard-grid {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(350px, 1.15fr);
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.idcard-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.idcard-card-header {
  padding: 0.45rem 0.85rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.idcard-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.idcard-card-body {
  padding: 0.4rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
}

/* Card Viewport */
.idcard-crop-viewport {
  position: relative;
  background: #1e293b;
  border-radius: 8px;
  flex: 1;
  min-height: 160px;
  max-height: 235px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  overflow: hidden;
  user-select: none;
}

.idcard-crop-canvas-wrapper {
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.idcard-crop-canvas-wrapper:active {
  cursor: grabbing;
}

.idcard-crop-canvas {
  display: block;
  background: #ffffff;
}

.idcard-crop-hint {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Tabs for Front / Back editing */
.idcard-tabs-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  padding: 0.15rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.idcard-tab-btn {
  flex: 1;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.idcard-tab-btn.active {
  background: #ffffff;
  color: #0d9488;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Toolbar Controls */
.idcard-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.idcard-btn-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.idcard-preset-select {
  width: 100%;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.idcard-preset-select:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.idcard-dim-display-box {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.74rem;
  color: #0f766e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-shrink: 0;
}

.idcard-dim-val {
  font-weight: 700;
  font-size: 0.8rem;
}

/* Single ID Print Banner */
.idcard-single-print-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  flex-shrink: 0;
}

/* Sheet stats badge */
#idcard-sheet-stats {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* A4 Preview Container */
.idcard-a4-viewport {
  background: #475569;
  border-radius: 8px;
  flex: 1;
  min-height: 220px;
  max-height: 380px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.idcard-a4-paper {
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
}

.idcard-a4-footer-info {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  justify-content: center;
  flex-shrink: 0;
}

.idcard-actions-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.25rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .idcard-workbench-root {
    flex: none;
  }
  .idcard-selection-grid {
    grid-template-columns: 1fr;
  }
  .idcard-grid {
    grid-template-columns: 1fr;
    flex: none;
  }
  .idcard-card {
    height: auto;
  }
  .idcard-card-body {
    height: auto;
  }
  .idcard-crop-viewport {
    min-height: 240px;
    max-height: none;
  }
  .idcard-a4-viewport {
    min-height: 320px;
    max-height: none;
    overflow: auto;
  }
  .idcard-single-print-banner {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .idcard-toolbar-row {
    flex-wrap: wrap;
  }
  .idcard-actions-bar {
    flex-wrap: wrap;
  }
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- 6.21 Excel to PDF Studio Workbench & Interactive Spreadsheet Styles --- */
/* Expanded Desktop Modal for Excel to PDF Studio */
.tool-modal.modal-excel-open .modal-dialog,
.tool-modal:has(.excel-workbench-root) .modal-dialog {
  max-width: min(1360px, 96vw);
  width: min(1360px, 96vw);
  max-height: 94vh;
  height: min(94vh, 900px);
}

@media (min-width: 861px) {
  .tool-modal.modal-excel-open .modal-body,
  .tool-modal:has(.excel-workbench-root) .modal-body {
    padding: 0.65rem 1.15rem 0.75rem 1.15rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

.excel-workbench-root {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

/* Excel Import Loading Overlay */
.excel-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  border-radius: 12px;
  padding: 1.5rem;
  box-sizing: border-box;
}

.excel-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  background: #ffffff;
  padding: 2.25rem 2.5rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  max-width: 90%;
  width: 360px;
  text-align: center;
}

.excel-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid #d1fae5;
  border-top-color: #059669;
  border-radius: 50%;
  animation: excel-spin 0.8s linear infinite;
  box-sizing: border-box;
}

@keyframes excel-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.excel-loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0;
}

.excel-workbench-root.is-importing .option-b-dropzone,
.option-b-dropzone.importing-disabled {
  pointer-events: none;
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .excel-loading-card {
    padding: 1.5rem 1.5rem;
    gap: 0.85rem;
    width: 290px;
  }
  .excel-spinner {
    width: 38px;
    height: 38px;
    border-width: 3px;
  }
  .excel-loading-text {
    font-size: 0.875rem;
  }
}

.excel-studio-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

/* Workbench Top Header Bar */
.excel-workbench-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.excel-file-meta-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.excel-file-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  flex-shrink: 0;
}

.excel-file-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.excel-filename-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-file-stats {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

/* View Toggle Pills */
.excel-view-toggle-pills {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.excel-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.excel-toggle-pill:hover {
  color: #0f172a;
}

.excel-toggle-pill.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.excel-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Workspace Body Layout */
.excel-workbench-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.excel-main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.excel-view-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Selection Toolbar */
.excel-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Informational Selection Range Pill */
.excel-range-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #166534;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  user-select: none;
  box-shadow: 0 1px 2px rgba(22, 101, 52, 0.06);
}

.range-pill-icon {
  font-size: 0.85rem;
  color: #15803d;
}

.range-pill-label {
  letter-spacing: 0.5px;
}

.range-pill-dot {
  color: #86efac;
}

.range-pill-dim {
  font-size: 0.72rem;
  font-weight: 600;
  color: #15803d;
}

.excel-selection-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: #64748b;
}

.excel-selection-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Interactive Spreadsheet Grid Container */
.excel-grid-container {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #ffffff;
  position: relative;
  outline: none;
}

.excel-grid-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nirmala UI", "Mangal", Arial, sans-serif;
  user-select: none;
  background: #ffffff;
}

/* Sticky Headers */
.excel-grid-table th {
  background: #f1f5f9;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  font-weight: 600;
  color: #475569;
  font-size: 0.75rem;
  text-align: center;
  position: sticky;
  user-select: none;
  cursor: pointer;
  transition: background 0.1s ease;
}

.excel-grid-table th:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.excel-grid-table th.header-selected {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  font-weight: 700;
}

.excel-grid-corner-th {
  top: 0;
  left: 0;
  z-index: 10 !important;
  width: 44px;
  min-width: 44px;
  height: 24px;
  background: #e2e8f0 !important;
}

.excel-col-th {
  top: 0;
  z-index: 8;
  height: 24px;
  padding: 2px 6px;
  min-width: 64px;
}

.excel-row-th {
  left: 0;
  z-index: 7;
  width: 44px;
  min-width: 44px;
  padding: 2px 4px;
}

/* Cells */
.excel-grid-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 4px 8px;
  color: #1e293b;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: cell;
  height: 22px;
  max-width: 260px;
  background: #ffffff;
}

.excel-grid-table tr:hover td {
  background: #fafaf9;
}

/* Selection Highlight States */
.excel-grid-table td.excel-cell-selected {
  background-color: rgba(14, 165, 233, 0.16) !important;
}

.excel-grid-table td.sel-border-t {
  border-top: 2px solid #0284c7 !important;
}

.excel-grid-table td.sel-border-b {
  border-bottom: 2px solid #0284c7 !important;
}

.excel-grid-table td.sel-border-l {
  border-left: 2px solid #0284c7 !important;
}

.excel-grid-table td.sel-border-r {
  border-right: 2px solid #0284c7 !important;
}

.excel-grid-table td.excel-cell-active {
  background-color: rgba(14, 165, 233, 0.28) !important;
}

/* Sheet Tabs Bar along the bottom */
.excel-sheet-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  border-top: 1px solid #cbd5e1;
  padding: 2px 8px;
  gap: 0.5rem;
  flex-shrink: 0;
}

.excel-sheet-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.excel-sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.excel-sheet-tab:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.excel-sheet-tab.active {
  background: #ffffff;
  color: #0284c7;
  border-color: #cbd5e1;
  border-bottom: 2px solid #0284c7;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.04);
}

.excel-export-scope-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

/* Print Settings Aside Panel */
.excel-print-settings-panel {
  width: 280px;
  min-width: 280px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease, width 0.2s ease;
}

.excel-print-settings-panel.collapsed {
  display: none;
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.settings-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.settings-panel-close-btn {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
}

.settings-panel-close-btn:hover {
  color: #0f172a;
}

.settings-panel-content {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.setting-row label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.setting-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.setting-toggle-btn {
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.setting-toggle-btn:hover {
  background: #e2e8f0;
}

.setting-toggle-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.setting-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.4rem 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.setting-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: #334155;
  cursor: pointer;
}

.excel-setting-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.72rem;
  color: #92400e;
  line-height: 1.35;
}

.setting-action-row {
  margin-top: 0.25rem;
}

/* Genuine PDF Preview View Styles */
.excel-pdf-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.excel-pdf-nav-group,
.excel-pdf-zoom-group,
.excel-pdf-action-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.excel-pdf-page-indicator {
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  min-width: 80px;
  text-align: center;
}

.excel-pdf-zoom-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  min-width: 44px;
  text-align: center;
}

.excel-pdf-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #52525b;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.25rem;
}

.excel-pdf-page-wrapper {
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  line-height: 0;
  transition: transform 0.15s ease;
}

#excel-pdf-render-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Mobile Responsiveness for Excel Workbench */
@media (max-width: 860px) {
  .excel-workbench-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .excel-workbench-body {
    flex-direction: column;
  }
  .excel-print-settings-panel {
    width: 100%;
    min-width: 100%;
    border-left: none;
    border-top: 1px solid #e2e8f0;
    max-height: 250px;
  }
  .excel-range-pill {
    width: 100%;
    justify-content: center;
  }
  .excel-selection-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===================================================================
   BACKGROUND REMOVER WORKBENCH STYLES
   Milk White Theme (#E8F0F0), Material 3 styling, and Responsive Grid
   =================================================================== */

.tool-modal.modal-bgremove-open .modal-dialog,
.tool-modal:has(.bg-remove-workbench-root) .modal-dialog {
  max-width: min(1320px, 96vw);
  width: min(1320px, 96vw);
  max-height: 94vh;
  height: min(94vh, 900px);
}

@media (min-width: 900px) {
  .tool-modal.modal-bgremove-open .modal-body,
  .tool-modal:has(.bg-remove-workbench-root) .modal-body {
    padding: 0.65rem 1.15rem 0.75rem 1.15rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
  }
}

.bg-remove-workbench-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Header bar above workbench */
.bg-remove-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem 0.65rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bg-remove-doc-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: #334155;
}

.bg-remove-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
  color: #475569;
}

/* Two-column layout */
.bg-remove-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  height: 100%;
}

/* Left column: Viewer */
.bg-remove-viewer-box {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  min-height: 0;
  position: relative;
}

.bg-remove-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.65rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.5rem;
  flex-wrap: wrap;
  z-index: 10;
}

.bg-remove-btn-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.bg-remove-tool-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.bg-remove-tool-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.bg-remove-tool-btn.active {
  background: #ffffff;
  color: #059669;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Canvas viewport */
.bg-remove-canvas-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  user-select: none;
}

/* Pure CSS Transparency Checkerboard */
.bg-remove-checker {
  background-color: #ffffff;
  background-image: 
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.bg-remove-canvas-shadow {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
  border-radius: 4px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Eyedropper cursor */
.bg-remove-eyedropper-active {
  cursor: crosshair !important;
}

/* Circular brush cursor */
.bg-remove-brush-cursor {
  position: absolute;
  pointer-events: none;
  border: 2px solid #059669;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.2);
  transform: translate(-50%, -50%);
  display: none;
  z-index: 50;
}

/* Right column: Sidebar */
.bg-remove-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding-right: 0.2rem;
  min-height: 0;
}

.bg-remove-card-group {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bg-remove-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Swatches for background replacement */
.bg-remove-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.bg-remove-swatch-btn {
  height: 34px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.bg-remove-swatch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.bg-remove-swatch-btn.active {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.35);
}

.bg-remove-swatch-btn.swatch-transparent {
  background-color: #ffffff;
  background-image: 
    linear-gradient(45deg, #cbd5e1 25%, transparent 25%), 
    linear-gradient(-45deg, #cbd5e1 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #cbd5e1 75%), 
    linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

/* Preset Sensitivity Buttons */
.bg-remove-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}

.bg-remove-preset-btn {
  padding: 5px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bg-remove-preset-btn:hover {
  background: #e2e8f0;
}

.bg-remove-preset-btn.active {
  background: #ecfdf5;
  color: #065f46;
  border-color: #10b981;
}

/* Split slider handle */
.bg-remove-split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  cursor: ew-resize;
  z-index: 20;
}

.bg-remove-split-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #059669;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Notice Box */
.bg-remove-notice {
  font-size: 0.7rem;
  color: #475569;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 6px 9px;
  line-height: 1.35;
}

/* Mobile Responsive */
@media (max-width: 860px) {
  .bg-remove-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
  .bg-remove-viewer-box {
    min-height: 320px;
    height: 380px;
  }
  .bg-remove-sidebar {
    height: auto;
    overflow: visible;
  }
}

/* ===================================================================
   PDF EDITOR WORKBENCH STYLES
   Professional Desktop-Grade PDF Editor with Milk White theme (#E8F0F0)
   =================================================================== */

.tool-modal.modal-pdfeditor-open .modal-dialog,
.tool-modal:has(.pdf-edit-workbench-root) .modal-dialog {
  max-width: min(1480px, 98vw);
  width: min(1480px, 98vw);
  max-height: 96vh;
  height: min(96vh, 940px);
}

@media (min-width: 900px) {
  .tool-modal.modal-pdfeditor-open .modal-body,
  .tool-modal:has(.pdf-edit-workbench-root) .modal-body {
    padding: 0.5rem 0.85rem 0.65rem 0.85rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
  }
}

.pdf-edit-workbench-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.pdf-edit-workspace-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* --- Top Toolbar --- */
.pdf-edit-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.5rem;
  flex-wrap: wrap;
  user-select: none;
}

.pdf-edit-tools-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pdf-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.775rem;
  font-weight: 500;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-tool-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.pdf-tool-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.pdf-tool-btn.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6 inset;
  font-weight: 600;
}

.pdf-edit-actions-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pdf-btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.pdf-btn-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.pdf-edit-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 0.2rem;
}

.pdf-zoom-dropdown {
  width: 95px !important;
  font-size: 0.75rem !important;
  height: 30px !important;
  padding: 2px 20px 2px 8px !important;
}

.pdf-edit-save-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-unsaved-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.725rem;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 999px;
}

.pdf-unsaved-badge.dirty {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
}

.pdf-unsaved-badge.dirty .status-dot-green {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.pdf-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.pdf-btn-save:hover {
  background: #1d4ed8;
}

/* --- Contextual Properties Bar --- */
.pdf-edit-context-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #334155;
  min-height: 38px;
  flex-wrap: wrap;
}

.pdf-context-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pdf-context-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pdf-context-select {
  font-size: 0.75rem;
  height: 28px;
  padding: 2px 22px 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background-color: #ffffff;
}

.pdf-color-swatch-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pdf-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s;
}

.pdf-color-dot:hover {
  transform: scale(1.15);
}

.pdf-color-dot.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* --- Main Stage & Sidebar --- */
.pdf-edit-main-stage {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Sidebar */
.pdf-edit-sidebar {
  width: 175px;
  min-width: 160px;
  max-width: 200px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
}

.pdf-sidebar-header {
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdf-sidebar-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.pdf-mini-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.pdf-mini-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.pdf-mini-btn-del:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.pdf-thumbnail-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pdf-thumb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.35rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.pdf-thumb-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.pdf-thumb-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb, 0 3px 8px rgba(37, 99, 235, 0.15);
}

.pdf-thumb-card.deleted {
  opacity: 0.5;
  filter: grayscale(1);
  border-style: dashed;
}

.pdf-thumb-canvas {
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  background: #ffffff;
}

.pdf-thumb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 4px;
  padding: 0 2px;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

.pdf-thumb-num {
  font-weight: 600;
}

/* Center Stage */
.pdf-stage-scroll-container {
  flex: 1;
  overflow: auto;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  position: relative;
  min-height: 0;
}

.pdf-scanned-notice {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.08);
  max-width: 720px;
}

.pdf-notice-dismiss {
  background: none;
  border: none;
  font-size: 1rem;
  line-height: 1;
  color: #92400e;
  cursor: pointer;
  padding: 0 4px;
  margin-left: auto;
}

.pdf-page-wrapper {
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  background: #ffffff;
  border-radius: 2px;
  user-select: none;
  margin: 0 auto;
}

.pdf-render-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Interactive Text Layer --- */
.pdf-text-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.pdf-text-item-box {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  border: 1px dashed transparent;
  box-sizing: border-box;
  transition: all 0.12s ease;
}

.pdf-text-item-box:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: #3b82f6;
  border-radius: 2px;
}

.pdf-text-item-box.edited {
  background: #ffffff;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0;
}

.pdf-inline-editor {
  position: absolute;
  z-index: 60;
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 3px;
  padding: 2px 4px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
  outline: none;
  box-sizing: border-box;
  color: #0f172a;
}

/* --- Annotation & Overlay Elements Layer --- */
.pdf-annotation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
}

.pdf-draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.pdf-draw-canvas.drawing-active {
  pointer-events: auto;
  cursor: crosshair;
}

.pdf-elements-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pdf-element-box {
  position: absolute;
  pointer-events: auto;
  cursor: move;
  border: 1.5px dashed transparent;
  box-sizing: border-box;
  user-select: none;
  transition: border-color 0.15s ease;
}

.pdf-element-box:hover:not(.selected) {
  border-color: rgba(59, 130, 246, 0.45);
}

.pdf-element-box.selected {
  border: 1.5px solid #2563eb !important;
  box-shadow: 0 0 0 1px #ffffff, 0 3px 10px rgba(37, 99, 235, 0.25);
  z-index: 30;
}

.pdf-element-box.element-type-redaction:not(.selected) {
  border: 1px dashed rgba(203, 213, 225, 0.4);
}

.pdf-element-box .pdf-element-handle,
.pdf-element-box .pdf-element-del-btn,
.pdf-element-box .pdf-element-confirm-btn {
  display: none !important;
}

.pdf-element-box.selected .pdf-element-handle {
  display: block !important;
}

.pdf-element-box.selected .pdf-element-del-btn {
  display: flex !important;
}

.pdf-element-box.selected .pdf-element-confirm-btn {
  display: flex !important;
}

.pdf-element-handle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 2px;
  box-sizing: border-box;
  z-index: 32;
}

.pdf-handle-se { right: -5px; bottom: -5px; cursor: se-resize; }
.pdf-handle-ne { right: -5px; top: -5px; cursor: ne-resize; }
.pdf-handle-nw { left: -5px; top: -5px; cursor: nw-resize; }
.pdf-handle-sw { left: -5px; bottom: -5px; cursor: sw-resize; }

.pdf-element-del-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 22px;
  height: 22px;
  background: #ef4444;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  line-height: 1;
  z-index: 35;
}

.pdf-element-confirm-btn {
  position: absolute;
  top: -24px;
  left: 0;
  height: 20px;
  padding: 0 8px;
  background: #16a34a;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  line-height: 1;
  white-space: nowrap;
  z-index: 35;
  transition: background 0.15s ease, transform 0.1s ease;
}

.pdf-element-confirm-btn:hover {
  background: #15803d;
  transform: scale(1.04);
}

.pdf-element-text-content {
  width: 100%;
  height: 100%;
  outline: none;
  word-break: break-word;
  white-space: pre-wrap;
  cursor: text;
}

.pdf-element-img-content {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Loading Overlay */
.pdf-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  gap: 0.75rem;
}

.pdf-spinner {
  width: 36px;
  height: 36px;
  border: 3.5px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: pdf-spin 0.8s linear infinite;
}

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

.pdf-loading-text {
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
}

/* Mobile & Tablet adjustments */
@media (max-width: 900px) {
  .pdf-edit-sidebar {
    width: 130px;
    min-width: 110px;
  }
  .pdf-edit-topbar {
    padding: 0.35rem 0.5rem;
  }
  .pdf-tool-btn span {
    display: none;
  }
  .pdf-tool-btn {
    padding: 0.35rem 0.45rem;
  }
}

@media (max-width: 640px) {
  .pdf-edit-main-stage {
    flex-direction: column;
  }
  .pdf-edit-sidebar {
    width: 100%;
    max-width: 100%;
    height: 100px;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .pdf-thumbnail-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .pdf-thumb-card {
    width: 70px;
    flex-shrink: 0;
  }
}

/* ===================================================================
   GROUPED TEXT BOX & MULTI-LINE PARAGRAPH EDITOR STYLES
   =================================================================== */

.pdf-text-group-box {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  border: 1px dashed transparent;
  background: transparent;
  border-radius: 2px;
  box-sizing: border-box;
  transition: all 0.12s ease;
  user-select: none;
}

/* Subtle dashed guide in edit-text mode for selectable text */
.pdf-text-layer[data-tool="edit-text"] .pdf-text-group-box:not(.edited) {
  border: 1.5px dashed rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.02);
}

.pdf-text-group-box:hover {
  background: rgba(37, 99, 235, 0.08);
  border: 1.5px dashed #2563eb !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

/* Confirmed edited text: completely clean with ZERO borders, outlines, or glow */
.pdf-text-group-box.edited {
  background: #ffffff;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.pdf-text-group-box.edited:hover {
  background: #ffffff;
  border: 1px dashed rgba(37, 99, 235, 0.35) !important;
  box-shadow: none !important;
}

.pdf-group-preview-text {
  display: block;
  width: max-content;
  min-width: 100%;
  height: auto;
  min-height: 100%;
  white-space: pre;
  line-height: 1.25;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  overflow: visible;
}

/* Multi-Line Block / Paragraph Editor */
.pdf-block-editor-wrap {
  position: absolute;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
  overflow: visible;
}

.pdf-block-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.pdf-block-fmt-btn {
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s ease;
  line-height: 1.2;
}

.pdf-block-fmt-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.pdf-block-fmt-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 700;
}

.pdf-block-editor-select {
  padding: 2px 4px;
  font-size: 0.72rem;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
}

.pdf-block-editor-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
  line-height: 1.35;
  padding: 5px 7px;
  box-sizing: border-box;
  color: #0f172a;
  background: #ffffff;
}

.pdf-block-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.7rem;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  gap: 6px;
}

.pdf-block-btn-save {
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  background: #2563eb;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.pdf-block-btn-save:hover {
  background: #1d4ed8;
}

.pdf-block-btn-cancel {
  padding: 3px 8px;
  font-size: 0.72rem;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.pdf-block-btn-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.pdf-block-hint {
  font-size: 0.68rem;
  color: #64748b;
}

.pdf-block-hint-warn {
  color: #d97706;
  font-weight: 500;
}

/* ===================================================================
   FULL-PAGE TEXT EDITING MODE STYLES
   =================================================================== */

.pdf-btn-fullpage-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pdf-btn-fullpage-action:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.pdf-fullpage-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.pdf-fullpage-modal-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  border: 1px solid #e2e8f0;
  max-width: 920px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  animation: pdfModalFadeIn 0.15s ease-out;
}

@keyframes pdfModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pdf-fullpage-modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}

.pdf-fullpage-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-fullpage-modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-fullpage-modal-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.pdf-fullpage-modal-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.pdf-fullpage-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.pdf-fullpage-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.pdf-fullpage-scanned-alert {
  margin: 14px 20px 0;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pdf-fullpage-modal-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 10px;
  box-sizing: border-box;
}

.pdf-fullpage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pdf-fullpage-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: #64748b;
}

.pdf-fullpage-hint svg {
  color: #2563eb;
  flex-shrink: 0;
}

.pdf-fullpage-stats {
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.pdf-fullpage-textarea {
  flex: 1;
  width: 100%;
  min-height: 340px;
  max-height: 52vh;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
  resize: vertical;
  outline: none;
  transition: all 0.15s ease;
}

.pdf-fullpage-textarea:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pdf-fullpage-textarea:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.pdf-fullpage-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
  gap: 12px;
}

.pdf-fullpage-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-fullpage-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-fullpage-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 9px;
  border-radius: 9999px;
}

.pdf-fullpage-status-pill.warn {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

@media (max-width: 640px) {
  .pdf-fullpage-modal-card {
    width: 100%;
    max-height: 94vh;
  }
  .pdf-fullpage-textarea {
    min-height: 240px;
  }
  .pdf-fullpage-modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .pdf-fullpage-footer-left,
  .pdf-fullpage-footer-right {
    justify-content: space-between;
  }
}




