/* PDFLocal CSS Stylesheet - Premium Colorful Light Theme */

/* --- CSS Variables & Design System --- */
:root {
  --bg-primary: #f6f8fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f7;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.2);
  
  /* Feature Accent Colors (RGB for opacity variables) */
  --color-merge: 99, 102, 241;      /* Indigo */
  --color-split: 236, 72, 153;     /* Pink */
  --color-compress: 6, 182, 212;    /* Cyan */
  --color-edit: 16, 185, 129;      /* Green */
  --color-sign: 14, 165, 233;      /* Sky Blue */
  --color-ocr: 245, 158, 11;       /* Yellow/Amber */
  --color-conv: 249, 115, 22;      /* Orange */
}

/* --- Base Resets & Typography --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Glowing Background Elements --- */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
  mix-blend-mode: normal;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  right: -50px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, transparent 70%);
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  bottom: -200px;
  left: -100px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.5) 0%, transparent 70%);
}

.bg-glow-3 {
  width: 400px;
  height: 400px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 0, 127, 0.3) 0%, transparent 70%);
}

/* --- Header / Navigation --- */
header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #7952e5, #00f2fe);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 15px rgba(121, 82, 229, 0.5);
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.text-gradient {
  background: linear-gradient(135deg, #00f2fe, #7952e5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
  color: white;
  background-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}


/* Navigation Dropdown Menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 6px;
  z-index: 1000;
  margin-top: 4px;
  backdrop-filter: blur(10px);
  animation: fadeInDown 0.2s ease;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
  background: transparent;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: block;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-sizing: border-box;
  margin-bottom: 2px;
}

.dropdown-item:last-child {
  margin-bottom: 0;
}

.dropdown-item:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.04);
}

.dropdown-item.active {
  color: white;
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.client-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.2);
  color: #34c759;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.mobile-menu-toggle {
  display: none;
}

/* --- Hero Section --- */
.hero-section {
  padding: 60px 0 40px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

/* --- Tools Grid --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0 60px;
}

.tool-card {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle 180px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--card-color), 0.15), transparent 80%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

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

.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--card-color), 0.5);
  box-shadow: 0 10px 30px -10px rgba(var(--card-color), 0.3);
}

.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(var(--card-color), 0.1);
  color: rgb(var(--card-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

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

.tool-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Panel Layouts --- */
.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease forwards;
  padding: 40px 0 80px;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 32px;
}

.panel-title {
  font-size: 32px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.header-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.panel-desc {
  color: var(--text-muted);
  font-size: 16px;
}

/* --- Drag & Drop Dropzone --- */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 20px;
  background-color: var(--bg-secondary);
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background-color: rgba(121, 82, 229, 0.02);
  box-shadow: inset 0 0 20px rgba(121, 82, 229, 0.05);
}

.dropzone-content {
  pointer-events: none;
}

.upload-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.dropzone:hover .upload-icon {
  transform: translateY(-5px);
  color: var(--primary);
}

.dropzone-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 14px;
  color: var(--text-muted);
}

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

/* --- Workspace Area --- */
.workspace-area {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  margin-top: 32px;
  animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.file-count {
  font-weight: 600;
  color: var(--text-muted);
}

.workspace-actions {
  display: flex;
  gap: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 10px 20px;
}

.btn-primary {
  background: linear-gradient(135deg, #7952e5, #6332eb);
  color: white;
  box-shadow: 0 4px 15px rgba(121, 82, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(121, 82, 229, 0.45);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-danger {
  background-color: #ff3b30;
  color: white;
}

.btn-danger:hover {
  background-color: #d32f2f;
}

.btn-danger-soft {
  background-color: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.btn-danger-soft:hover {
  background-color: rgba(255, 59, 48, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #34c759, #28a745);
  color: white;
  box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 199, 89, 0.45);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}

.btn-full {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* --- Merge Files Sort Grid --- */
.files-sort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.file-sort-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  position: relative;
  cursor: grab;
  user-select: none;
  transition: all 0.25s ease;
}

.file-sort-card:active {
  cursor: grabbing;
}

.file-sort-card.dragging {
  opacity: 0.5;
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(121, 82, 229, 0.2);
}

.doc-icon-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(121, 82, 229, 0.1);
  color: var(--primary);
  border-radius: 8px;
}

.file-sort-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.file-sort-size {
  font-size: 11px;
  color: var(--text-muted);
}

.card-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s ease;
}

.card-remove-btn:hover {
  background-color: rgba(255, 59, 48, 0.8);
  color: white;
}

.action-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

/* --- Split Panel Workspace Layout --- */
.workspace-split-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.split-preview-sidebar {
  border-right: 1px solid var(--border-color);
  padding-right: 24px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.sidebar-header-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.pages-thumbnail-list {
  overflow-y: auto;
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-right: 8px;
}

.pages-thumbnail-list::-webkit-scrollbar {
  width: 6px;
}

.pages-thumbnail-list::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 3px;
}

.page-thumb-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
}

.page-thumb-num {
  position: absolute;
  top: 4px;
  left: 4px;
  background-color: rgba(0,0,0,0.6);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.page-thumb-canvas-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.414; /* A4 Ratio */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.page-thumb-canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.split-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(121, 82, 229, 0.15);
}

textarea.form-input {
  width: 100%;
  box-sizing: border-box;
  resize: both;
}

.input-sm {
  padding: 8px 12px;
  font-size: 13px;
}

.radio-card-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.radio-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.radio-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

.radio-card.active {
  border-color: var(--primary);
  background-color: rgba(121, 82, 229, 0.05);
}

.radio-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
}

.radio-card-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.bg-glass {
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.file-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}

.file-info-row:last-child {
  margin-bottom: 0;
}

.file-info-label {
  color: var(--text-muted);
}

.file-info-value {
  font-weight: 600;
}

.range-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.range-badge {
  background-color: rgba(121, 82, 229, 0.15);
  color: #cbbaff;
  border: 1px solid rgba(121, 82, 229, 0.3);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Compress Settings --- */
.compress-settings-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.compress-file-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.doc-icon-large {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 16px;
}

.compress-file-details h4 {
  font-size: 18px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.size-tag {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
}

.compress-configs {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tabs-subnav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
  gap: 16px;
}

.tab-subnav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.tab-subnav-btn:hover {
  color: var(--text-main);
}

.tab-subnav-btn.active {
  color: var(--text-main);
}

.tab-subnav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

.preset-grids {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.preset-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s ease;
}

.preset-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

.preset-card.active {
  border-color: #00f2fe;
  background-color: rgba(0, 242, 254, 0.05);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.preset-label {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.preset-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.preset-specs {
  font-size: 11px;
  background-color: rgba(0,0,0,0.2);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.input-with-addon {
  display: flex;
  align-items: stretch;
}

.input-with-addon .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex-grow: 1;
}

.input-addon {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-left: none;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 600;
  color: var(--text-muted);
}

.compress-results {
  margin-top: 32px;
  animation: slideUp 0.4s ease forwards;
}

.results-card {
  padding: 24px;
  text-align: center;
}

.results-header {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #34c759;
}

.comparison-visual {
  margin-bottom: 24px;
}

.bar-compare {
  background-color: var(--bg-tertiary);
  height: 48px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.bar-before {
  background-color: rgba(0, 0, 0, 0.03);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 16px;
}

.bar-after {
  background: linear-gradient(90deg, #00f2fe, #007aff);
  color: white;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 16px;
  transition: width 0.8s ease-in-out;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.bar-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.reduction-badge {
  background-color: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 24px;
}

/* --- Edit PDF Pages Grid --- */
.pages-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.page-edit-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.25s ease;
}

.page-edit-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.page-edit-canvas-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.414;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.page-edit-canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.page-actions-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.page-edit-card:hover .page-actions-overlay {
  opacity: 1;
}

.page-action-btn {
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.page-action-btn:hover {
  background-color: var(--primary);
  transform: scale(1.1);
}

.page-action-btn.btn-remove:hover {
  background-color: #ff3b30;
}

.page-info-label {
  margin-top: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
}

/* --- e-Sign Panel Layout --- */
.sign-editor-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.sign-doc-viewer {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sign-viewer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.page-indicator {
  font-weight: 600;
  font-size: 14px;
}

.sign-page-container {
  overflow: auto;
  max-width: 100%;
  max-height: 550px;
  padding: 10px;
  display: flex;
  justify-content: center;
  background-color: #e2e8f0;
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.08);
}

.sign-canvas-wrapper {
  position: relative;
  background-color: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

#sign-pdf-canvas {
  display: block;
  max-width: 100%;
}

.sign-overlays-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Draggable Signature Overlay on PDF */
.sig-draggable-element {
  position: absolute;
  border: 1px dashed #00c6ff;
  background-color: rgba(0, 198, 255, 0.15);
  cursor: move;
  pointer-events: auto;
  box-sizing: border-box;
}

.sig-draggable-element img {
  width: 100%;
  height: 100%;
  display: block;
}

.sig-remove-handle {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: #ff3b30;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sig-resize-handle {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  background-color: #00c6ff;
  border: 1px solid white;
  cursor: se-resize;
  border-radius: 50%;
}

.sign-toolbox {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.signature-stamps-list {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  min-height: 150px;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-stamps-text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 50px;
}

.sig-stamp-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sig-stamp-card:hover {
  border-color: #00c6ff;
  background-color: rgba(0, 198, 255, 0.05);
}

.sig-stamp-preview {
  height: 48px;
  max-width: 180px;
  display: flex;
  align-items: center;
}

.sig-stamp-preview img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.sig-delete-stamp {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.sig-delete-stamp:hover {
  color: #ff3b30;
}

.signing-hints {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- OCR Panel Layout --- */
.ocr-settings-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.ocr-file-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.ocr-details h4 {
  font-size: 18px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.ocr-configs {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Document Converters Layout --- */
.converters-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.converters-subnav {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.converter-nav-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.converter-nav-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 10px var(--primary-glow);
}

.conv-view-group {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.conv-view-group.active {
  display: block;
}

.conv-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.conv-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.conv-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--conv-color), 0.5);
  box-shadow: 0 5px 15px rgba(var(--conv-color), 0.15);
}

.conv-icon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.conv-icon-row i {
  width: 28px;
  height: 28px;
}

.conv-card:hover .conv-icon-row {
  color: rgb(var(--conv-color));
}

.word-icon { color: #2b579a; }
.excel-icon { color: #217346; }
.ppt-icon { color: #d24726; }
.img-icon { color: #00a2ed; }
.pdf-icon { color: #f40f0f; }

.conv-details h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.conv-details p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.conv-workspace-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.conv-settings {
  padding: 20px;
  margin-bottom: 24px;
}

.settings-title {
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.settings-grid-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.conv-file-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.conv-file-preview .btn {
  margin-left: auto;
}

/* --- Modals Framework --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 5, 10, 0.85);
  backdrop-filter: blur(8px);
}

.modal-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  z-index: 1002;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-sm {
  max-width: 500px;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Annotation Editor Canvas Setup */
.modal-body-editor {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 600px;
}

.editor-toolbar {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.tool-group-vertical {
  display: flex;
  gap: 4px;
}

.tool-btn {
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.tool-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.separator-v {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
}

.editor-subtool {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtool-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.color-options {
  display: flex;
  gap: 6px;
  align-items: center;
}

.color-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

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

.color-circle.active {
  border: 2px solid white;
  transform: scale(1.15);
  box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.custom-color-picker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

.width-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-sm {
  width: 80px;
  cursor: pointer;
}

#editor-width-val {
  font-size: 11px;
  min-width: 28px;
}

.editor-canvas-container {
  flex-grow: 1;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 24px;
}

.canvas-positioner {
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#editor-pdf-canvas {
  display: block;
}

#editor-annotation-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* --- e-Signature Pad / modal UI --- */
.drawing-pad-container {
  background-color: white;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.signature-canvas-pad {
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  width: 100%;
  height: 180px;
  display: block;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"/></svg>') 0 16, crosshair;
}

.pad-hints {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-top: 8px;
}

.btn-clear-pad {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: #ff3b30;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cursive-style-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.cursive-style-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cursive-style-card.active {
  border-color: var(--primary);
  background-color: rgba(121, 82, 229, 0.05);
}

.cursive-preview {
  font-size: 28px;
  color: var(--text-main);
}

.signature-upload-box {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.signature-upload-box:hover {
  border-color: var(--primary);
  background-color: rgba(121, 82, 229, 0.02);
}

.upload-icon-sm {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sig-upload-preview-wrap {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#sig-upload-img-preview {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  background-color: white;
  border-radius: 6px;
  padding: 8px;
  border: 1px solid var(--border-color);
}

/* --- Spinner / Loader Overlay --- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 5, 10, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner-wrapper {
  text-align: center;
  max-width: 300px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(121, 82, 229, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(121, 82, 229, 0.25);
}

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

.loading-text {
  font-weight: 600;
  margin-bottom: 16px;
}

.progress-bar-container {
  height: 6px;
  background-color: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7952e5, #00f2fe);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.progress-percent {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

/* --- Toast Notification System --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 280px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.error {
  border-left: 4px solid #ff3b30;
  background-color: rgba(255, 59, 48, 0.05);
}

.toast.success {
  border-left: 4px solid #34c759;
  background-color: rgba(52, 199, 89, 0.05);
}

.toast.info {
  border-left: 4px solid #00f2fe;
  background-color: rgba(0, 242, 254, 0.05);
}

.margin-bottom-md {
  margin-bottom: 16px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .workspace-split-layout, .compress-settings-layout, .sign-editor-layout, .ocr-settings-layout {
    grid-template-columns: 1fr;
  }
  .split-preview-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 24px;
    max-height: 240px;
  }
  .pages-thumbnail-list {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    z-index: 999;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
  nav.active {
    display: flex;
  }
  .nav-link {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    font-size: 16px;
  }
  .nav-dropdown {
    width: 100%;
  }
  .dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(0, 0, 0, 0.02);
    margin-top: 4px;
    width: 100%;
    padding: 4px 12px;
    display: none;
    animation: none;
  }
  .nav-dropdown:hover .dropdown-menu {
    display: none;
  }
  .nav-dropdown.open .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .dropdown-item {
    padding: 10px 16px;
    font-size: 15px;
  }
  header .client-badge {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
  }
  .mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.04);
  }
  .mobile-menu-toggle i, .mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
  }
  .hero-title {
    font-size: 32px;
  }
}

/* Privacy Disclaimer Banner */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 800px;
  margin: 32px auto 0;
  text-align: left;
  border-left: 4px solid #34c759; /* Secure Green */
  background-color: rgba(52, 199, 89, 0.04) !important;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.privacy-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(52, 199, 89, 0.1);
  color: #34c759;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.privacy-banner-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: #34c759;
}

.privacy-banner-text p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .privacy-banner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* Top Disclaimer Announcement Bar */
.top-disclaimer-bar {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  color: white;
  padding: 8px 0;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 101; /* Higher than header sticky index */
}

.top-disclaimer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.top-disclaimer-content i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Help & Guides Section Styling */
.guides-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 0 20px;
}

.guides-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.guide-card {
  padding: 24px;
  border-radius: 16px;
  transition: transform 0.25s ease;
}

.guide-card:hover {
  transform: translateY(-2px);
}

.guide-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.guide-title i {
  width: 18px;
  height: 18px;
}

.guide-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer Section Styling */
footer {
  margin-top: 100px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 400px;
}

.footer-brand-desc {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-group {
  display: flex;
  gap: 60px;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: var(--text-main);
}

.footer-links-col a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.legal-content strong {
  display: block;
  font-size: 16px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    flex-direction: column;
    gap: 40px;
  }
  .footer-links-group {
    gap: 40px;
  }
}

/* --- New Feature Expansion Components --- */

/* Image Workspace Preview Boxes */
#img-compress-preview-box,
#img-resize-preview-box,
#img-convert-preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
}

/* Diff Checker side-by-side split input area */
.diff-checker-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diff-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .diff-inputs {
    grid-template-columns: 1fr;
  }
}

.diff-result-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* QR Code camera container */
#qr-cam-container {
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--primary);
}

#qr-code-canvas img {
  display: block;
  margin: 0 auto;
}

/* Cursive font previews for password generator / sign modal */
.cursive-style-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.cursive-style-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cursive-style-card.active {
  border-color: var(--primary);
  background: var(--bg-secondary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.cursive-preview {
  font-size: 20px;
  color: var(--text-main);
}

/* Legal standalone pages formatting overrides */
.legal-page {
  background-color: var(--bg-primary);
}

.legal-page header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

