:root {
  --primary: #10B981;
  --primary-hover: #059669;
  --primary-light: #34D399;
  --primary-dark: #047857;
  --primary-rgb: 16, 185, 129;
  --bg: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --card-bg: #1E293B;
  --card-bg-hover: #263548;
  --text: #F1F5F9;
  --text-light: #94A3B8;
  --text-lighter: #9a9aa3;
  --text-muted: #64748B;
  --border: #334155;
  --border-light: #475569;
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --error: #EF4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --info: #3B82F6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Courier New", monospace;
  --header-height: 64px;
  --container-max: 1200px;
  --z-dropdown: 100;
  --z-ad: 150;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-tertiary: #E2E8F0;
  --card-bg: #FFFFFF;
  --card-bg-hover: #F8FAFC;
  --text: #0F172A;
  --text-light: #475569;
  --text-lighter: #6B7280;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --border-light: #CBD5E1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --success-bg: rgba(16, 185, 129, 0.08);
  --error-bg: rgba(239, 68, 68, 0.08);
  --warning-bg: rgba(245, 158, 11, 0.08);
  --info-bg: rgba(59, 130, 246, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-light);
}

::selection {
  background-color: rgba(var(--primary-rgb), 0.3);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.main {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background-color var(--transition-slow), border-color var(--transition-slow);
}

[data-theme="light"] .header {
  background-color: rgba(248, 250, 252, 0.85);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.header-logo:hover {
  color: var(--text);
}

.header-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav-link {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.header-nav-link:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  font-size: 1.2rem;
}

.theme-toggle:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-switcher-btn {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-switcher-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
  background-color: var(--bg-tertiary);
}

.lang-switcher-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.lang-switcher.open .lang-switcher-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher-option {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-light);
  transition: all var(--transition-fast);
}

.lang-switcher-option:hover {
  background-color: var(--bg-tertiary);
  color: var(--text);
}

.lang-switcher-option.active {
  color: var(--primary);
  font-weight: 600;
}

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.hamburger:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transition: all var(--transition-base);
  position: relative;
}

.hamburger-line::before,
.hamburger-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transition: all var(--transition-base);
}

.hamburger-line::before {
  top: -6px;
}

.hamburger-line::after {
  top: 6px;
}

.hamburger.active .hamburger-line {
  background-color: transparent;
}

.hamburger.active .hamburger-line::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger.active .hamburger-line::after {
  top: 0;
  transform: rotate(-45deg);
}

.hero {
  position: relative;
  padding: 4rem 0 3rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  background-color: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

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

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero h1 {
    background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-trust-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.hero-trust-badge svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.upload-or-text {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.preview-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-cancel-spacing {
  margin-top: 1.5rem;
}

.upload-section {
  padding: 3rem 0;
}

.upload-zone {
  position: relative;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background-color: var(--card-bg);
  overflow: hidden;
}

.upload-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.02) 0%, rgba(var(--primary-rgb), 0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.upload-zone:hover {
  border-color: var(--primary);
  background-color: var(--card-bg-hover);
}

.upload-zone:hover::before {
  opacity: 1;
}

.upload-zone.active {
  border-color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.05);
  transform: scale(1.01);
}

.upload-zone.dragover {
  border-color: var(--primary-light);
  background-color: rgba(var(--primary-rgb), 0.08);
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.75rem;
  transition: transform var(--transition-base);
}

.upload-zone:hover .upload-icon {
  transform: translateY(-4px);
}

.upload-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.upload-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.upload-btn:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
  transform: translateY(-1px);
}

.upload-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
}

.upload-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.upload-hint kbd {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
}

.upload-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-formats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.upload-format-tag {
  padding: 0.25rem 0.625rem;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.processing-section {
  padding: 2rem 0;
  display: none;
}

.processing-section.visible {
  display: block;
}

.processing-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.processing-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.processing-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.processing-status {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.progress-bar-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light), var(--primary));
  background-size: 300% 100%;
  animation: progressGradient 2s ease infinite;
  transition: width 0.4s ease;
}

.progress-text {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

@keyframes progressGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.preview-section {
  padding: 2rem 0;
  display: none;
}

.preview-section.visible {
  display: block;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.preview-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.preview-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.preview-card-body {
  padding: 1.25rem;
}

.image-preview-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.image-preview {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: var(--radius-sm);
}

.image-preview-wrapper:hover .image-overlay {
  opacity: 1;
}

.image-overlay-btn {
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color var(--transition-fast);
}

.image-overlay-btn:hover {
  background-color: var(--primary-hover);
}

.table-preview-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-preview {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.table-preview th,
.table-preview td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.table-preview th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text);
  position: sticky;
  top: 0;
}

.table-preview th:last-child,
.table-preview td:last-child {
  border-right: none;
}

.table-preview tr:last-child td {
  border-bottom: none;
}

.table-preview tr:hover td {
  background-color: rgba(var(--primary-rgb), 0.04);
}

.editor-section {
  padding: 2rem 0;
  display: none;
}

.editor-section.visible {
  display: block;
}

.editor-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background-color: var(--bg-secondary);
}

.editor-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.editor-toolbar-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border);
  margin: 0 0.375rem;
}

.editor-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.editor-toolbar-btn:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

.editor-toolbar-btn.danger:hover {
  color: var(--error);
  background-color: var(--error-bg);
}

.editor-toolbar-btn svg {
  width: 14px;
  height: 14px;
}

.merge-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: auto;
}

.editor-body {
  overflow: auto;
  max-height: 500px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding-bottom: 12px;
}

.editor-body::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: linear-gradient(to top, var(--card-bg), transparent);
  pointer-events: none;
}

.editor-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.editor-table th,
.editor-table td {
  padding: 0;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-width: 80px;
  position: relative;
}

.editor-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-light);
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

.editor-table th:last-child,
.editor-table td:last-child {
  border-right: none;
}

.editor-table tr:last-child td {
  border-bottom: none;
}

.extract-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.extract-table th,
.extract-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  min-width: 60px;
  position: relative;
}
.extract-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  font-size: 0.75rem;
}
.extract-table td[contenteditable] {
  cursor: text;
  outline: none;
  min-height: 36px;
  min-width: 60px;
}
.extract-table td[contenteditable]:focus {
  background-color: rgba(var(--primary-rgb), 0.08);
  box-shadow: inset 0 0 0 2px var(--primary);
}
.row-num-col {
  background-color: var(--bg-tertiary);
  color: var(--text-lighter);
  font-size: 0.7rem;
  text-align: center;
  min-width: 36px;
  width: 36px;
  user-select: none;
}
.col-num-col {
  background-color: var(--bg-tertiary);
  color: var(--text-lighter);
  font-size: 0.7rem;
  text-align: center;
  user-select: none;
}

.editor-cell {
  width: 100%;
  min-height: 36px;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--text);
  font-family: var(--font-sans);
  resize: none;
  overflow: hidden;
}

.editor-cell:focus {
  background-color: rgba(var(--primary-rgb), 0.05);
  box-shadow: inset 0 0 0 2px var(--primary);
  border-radius: 0;
}

.editor-cell.merged {
  background-color: rgba(var(--primary-rgb), 0.03);
}

.editor-cell-header {
  background-color: var(--bg-tertiary);
  font-weight: 600;
}

.editor-row-actions {
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.editor-table tr:hover .editor-row-actions {
  opacity: 1;
}

.editor-row-action-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: all var(--transition-fast);
}

.editor-row-action-btn:hover {
  color: var(--error);
  background-color: var(--error-bg);
}

.editor-col-actions {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.editor-table th:hover .editor-col-actions {
  opacity: 1;
}

.editor-col-action-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: all var(--transition-fast);
}

.editor-col-action-btn:hover {
  color: var(--error);
  background-color: var(--error-bg);
}

.export-section {
  padding: 2rem 0;
  display: none;
}

.export-section.visible {
  display: block;
}

.export-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.export-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.export-formats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.export-format-option {
  position: relative;
}

.export-format-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.export-format-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: var(--bg-secondary);
}

.export-format-label:hover {
  border-color: var(--border-light);
  background-color: var(--bg-tertiary);
}

.export-format-input:checked + .export-format-label {
  border-color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.export-format-input:focus-visible + .export-format-label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.export-format-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.export-format-icon.csv {
  background-color: rgba(5, 150, 105, 0.15);
  color: #059669;
}

.export-format-icon.excel {
  background-color: rgba(22, 163, 74, 0.15);
  color: #16A34A;
}

.export-format-icon.json {
  background-color: rgba(217, 119, 6, 0.15);
  color: #D97706;
}

.export-format-icon.html {
  background-color: rgba(220, 38, 38, 0.15);
  color: #DC2626;
}

.export-format-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.export-format-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.export-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.btn-download:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background-color: var(--bg-tertiary);
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  color: var(--text);
  background-color: var(--border);
  border-color: var(--border-light);
}

.btn-copy:active {
  transform: scale(0.98);
}

.btn-copy.copied {
  background-color: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

.features-section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
}

.how-it-works-section {
  padding: 4rem 0;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-xl);
  margin: 0 1rem;
}

.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.step-content {
  flex: 1;
  padding-top: 0.25rem;
}

.step-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.step-connector {
  position: absolute;
  left: 24px;
  top: 56px;
  width: 2px;
  height: calc(100% - 32px);
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.step:last-child .step-connector {
  display: none;
}

.faq-section {
  padding: 4rem 0;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-light);
}

.faq-item[open] {
  border-color: rgba(var(--primary-rgb), 0.3);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: color var(--transition-fast);
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  content: "";
}

.faq-question:hover {
  color: var(--primary);
}

.faq-arrow {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-base), color var(--transition-fast);
  flex-shrink: 0;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
}
.legal-page h1 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
}
.legal-page h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.legal-page p {
  margin-bottom: 1rem;
  line-height: 1.7;
}
.legal-page ul,
.legal-page ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-page ol {
  list-style: decimal;
}
.legal-page li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.legal-page a {
  color: var(--primary);
  text-decoration: underline;
}

.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-bottom-link:hover {
  color: var(--primary);
}

.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 1rem + var(--safe-top));
  right: 1rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 2rem);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.toast.removing {
  animation: toastOut 0.25s ease forwards;
}

.toast-success::before {
  background-color: var(--success);
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error::before {
  background-color: var(--error);
}

.toast-error .toast-icon {
  color: var(--error);
}

.toast-info::before {
  background-color: var(--info);
}

.toast-info .toast-icon {
  color: var(--info);
}

.toast-warning::before {
  background-color: var(--warning);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.0625rem;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.125rem;
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
}

.toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background-color: var(--card-bg);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
}

.mobile-nav-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

.mobile-nav-links {
  padding: 1rem 0;
  flex: 1;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

.mobile-nav-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ad-top {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-top ins {
  display: block;
  width: 100%;
  min-height: 90px;
}

.ad-infeed {
  width: 100%;
  margin: 1.5rem 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-infeed ins {
  display: block;
  width: 100%;
  min-height: 250px;
}

.ad-anchor {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-ad);
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: var(--safe-bottom);
}

.ad-anchor ins {
  display: block;
  width: 100%;
  min-height: 50px;
}

.ad-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 0.25rem;
}

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

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

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

.stagger-1 {
  animation-delay: 0.1s;
  opacity: 0;
}

.stagger-2 {
  animation-delay: 0.2s;
  opacity: 0;
}

.stagger-3 {
  animation-delay: 0.3s;
  opacity: 0;
}

.stagger-4 {
  animation-delay: 0.4s;
  opacity: 0;
}

.stagger-5 {
  animation-delay: 0.5s;
  opacity: 0;
}

.stagger-6 {
  animation-delay: 0.6s;
  opacity: 0;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-heading {
  height: 24px;
  width: 60%;
  margin-bottom: 0.75rem;
}

.skeleton-image {
  height: 200px;
  border-radius: var(--radius-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
}

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

.btn-secondary:hover {
  color: var(--text);
  background-color: var(--border);
  border-color: var(--border-light);
}

.btn-ghost {
  color: var(--text-light);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success);
}

.badge-error {
  background-color: var(--error-bg);
  color: var(--error);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.badge-info {
  background-color: var(--info-bg);
  color: var(--info);
}

.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border);
  margin: 2rem 0;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.empty-state-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto;
}

.tooltip-wrapper {
  position: relative;
  display: inline-flex;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 0.625rem;
  background-color: var(--text);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}

.tooltip-wrapper:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: var(--text);
  background-color: var(--bg-tertiary);
}

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

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  overflow: hidden;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: left;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text);
}

.dropdown-item.active {
  color: var(--primary);
  font-weight: 600;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border);
  margin: 0.25rem 0;
}

.tab-list {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-panel {
  display: none;
  padding: 1.25rem 0;
}

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

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.switch-track {
  width: 40px;
  height: 22px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--transition-fast);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.switch-input:checked + .switch-track {
  background-color: var(--primary);
  border-color: var(--primary);
}

.switch-input:checked + .switch-track::after {
  left: 20px;
  background-color: #fff;
}

.switch-input:focus-visible + .switch-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.switch-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.input-field {
  padding: 0.625rem 0.875rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  transition: all var(--transition-fast);
  width: 100%;
}

.input-field:hover {
  border-color: var(--border-light);
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
  outline: none;
}

.input-field::placeholder {
  color: var(--text-muted);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-error {
  font-size: 0.75rem;
  color: var(--error);
}

.input-field.error {
  border-color: var(--error);
}

.input-field.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-light);
  transition: all var(--transition-fast);
}

.chip:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.chip-remove {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.chip-remove:hover {
  color: var(--error);
  background-color: var(--error-bg);
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset var(--transition-base);
  stroke-linecap: round;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.file-item:hover {
  border-color: var(--border-light);
}

.file-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: rgba(var(--primary-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.file-item-info {
  flex: 1;
  min-width: 0;
}

.file-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-item-remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.file-item-remove:hover {
  color: var(--error);
  background-color: var(--error-bg);
}

.settings-panel {
  padding: 1.5rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.settings-group {
  margin-bottom: 1.5rem;
}

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

.settings-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0;
  gap: 1rem;
}

.settings-row-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.settings-row-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.select-wrapper {
  position: relative;
  display: inline-flex;
}

.select-field {
  appearance: none;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
}

.select-field:hover {
  border-color: var(--border-light);
}

.select-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
  outline: none;
}

.stats-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 480px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .export-formats {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .step-connector {
    display: none;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .toast-container {
    right: 1.5rem;
  }
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .hamburger {
    display: none;
  }

  .header-nav {
    display: flex;
  }

  .hero {
    padding: 5rem 0 3.5rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.375rem;
  }

  .upload-zone {
    padding: 4rem 3rem;
  }

  .preview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  .editor-toolbar {
    flex-wrap: nowrap;
  }

  .stats-bar {
    flex-wrap: nowrap;
  }
}

@media (max-width: 767px) {
  .header-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .main {
    padding-bottom: 5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-trust-badges {
    gap: 0.75rem;
  }

  .upload-zone {
    padding: 2rem 1.25rem;
  }

  .upload-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .export-formats {
    grid-template-columns: 1fr;
  }

  .export-actions {
    flex-direction: column;
  }

  .export-actions .btn-download,
  .export-actions .btn-copy {
    width: 100%;
    justify-content: center;
  }

  .editor-body {
    max-height: 420px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .step-connector {
    display: block;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .how-it-works-section {
    margin: 0 0.5rem;
    border-radius: var(--radius-lg);
  }

  .faq-question {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }

  .faq-answer {
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .processing-card {
    padding: 2rem 1.25rem;
  }

  .modal {
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 479px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-badge {
    font-size: 0.75rem;
  }

  .upload-zone {
    padding: 1.5rem 1rem;
  }

  .upload-title {
    font-size: 1rem;
  }

  .upload-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
  }

  .editor-toolbar {
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
  }

  .editor-toolbar-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }

  .editor-toolbar-btn span {
    display: none;
  }

  .stats-bar {
    gap: 1rem;
  }

  .stat-value {
    font-size: 1rem;
  }
}

@media (max-width: 374px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .header-actions {
    gap: 0.25rem;
  }

  .lang-switcher-btn span {
    display: none;
  }

  .upload-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .upload-title {
    font-size: 0.9rem;
  }

  .upload-subtitle {
    font-size: 0.8rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .step-title {
    font-size: 1rem;
  }

  .step-desc {
    font-size: 0.85rem;
  }

  .export-card {
    padding: 1.25rem;
    margin-bottom: 70px;
  }

  .export-format-label {
    padding: 0.75rem;
  }

  .export-format-icon {
    width: 32px;
    height: 32px;
    font-size: 0.65rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .upload-hint {
    display: none;
  }

  .upload-zone:hover {
    border-color: var(--border-light);
    background-color: var(--card-bg);
    transform: none;
  }

  .upload-zone:hover .upload-icon {
    transform: none;
  }

  .upload-zone:active {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
  }

  .feature-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .feature-card:active {
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: var(--shadow-md);
  }

  .btn-primary:hover {
    transform: none;
  }

  .btn-primary:active {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
  }

  .btn-download:hover {
    transform: none;
  }

  .btn-download:active {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
  }

  .editor-row-actions,
  .editor-col-actions {
    opacity: 1;
  }

  .image-preview-wrapper:hover .image-overlay {
    opacity: 0;
  }

  .image-preview-wrapper:active .image-overlay {
    opacity: 1;
  }

  .faq-question {
    min-height: 48px;
  }

  .header-nav-link {
    padding: 0.625rem 0.75rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .toast {
    padding: 1rem;
  }

  .toast-close {
    width: 32px;
    height: 32px;
  }

  .editor-cell {
    min-height: 44px;
  }

  .export-format-label {
    min-height: 48px;
  }

  .chip {
    min-height: 32px;
  }

  .editor-toolbar-btn {
    min-height: 36px;
    min-width: 36px;
  }

  .select-field {
    min-height: 44px;
    font-size: 1rem;
  }

  .confidence-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }

  .merge-indicator {
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --card-bg: #1E293B;
    --card-bg-hover: #263548;
    --text: #F1F5F9;
    --text-light: #94A3B8;
    --text-lighter: #9a9aa3;
    --text-muted: #64748B;
    --border: #334155;
    --border-light: #475569;
  }
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --bg-tertiary: #E2E8F0;
    --card-bg: #FFFFFF;
    --card-bg-hover: #F8FAFC;
    --text: #0F172A;
    --text-light: #475569;
    --text-lighter: #6B7280;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --border-light: #CBD5E1;
  }
}

@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;
  }

  .progress-bar {
    background-size: 100% 100%;
    animation: none;
  }

  .processing-spinner {
    animation: none;
  }

  .processing-spinner::after {
    content: "Processing...";
    font-size: 1rem;
    color: var(--text-light);
  }

  .hero-badge-dot {
    animation: none;
  }
}

@supports (padding: max(1px)) {
  .header {
    padding-top: var(--safe-top);
  }

  .footer {
    padding-bottom: calc(1.5rem + var(--safe-bottom));
  }

  .ad-anchor {
    padding-bottom: var(--safe-bottom);
  }

  .mobile-nav {
    padding-top: var(--safe-top);
  }

  .toast-container {
    top: calc(var(--header-height) + 1rem + var(--safe-top));
  }

  body {
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
  }
}

@supports (backdrop-filter: blur(12px)) {
  .header {
    background-color: rgba(15, 23, 42, 0.85);
  }

  [data-theme="light"] .header {
    background-color: rgba(248, 250, 252, 0.85);
  }
}

@supports not (backdrop-filter: blur(12px)) {
  .header {
    background-color: var(--bg);
  }

  .mobile-nav-overlay {
    background-color: rgba(0, 0, 0, 0.8);
  }
}

.print-only {
  display: none;
}

@media print {
  .header,
  .footer,
  .ad-top,
  .ad-infeed,
  .ad-anchor,
  .toast-container,
  .mobile-nav-overlay,
  .mobile-nav,
  .hamburger,
  .theme-toggle,
  .lang-switcher,
  .upload-section,
  .processing-section,
  .editor-toolbar,
  .export-section,
  .hero,
  .features-section,
  .how-it-works-section,
  .faq-section {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    padding: 0;
  }

  .preview-section {
    display: block !important;
  }

  .preview-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .editor-table th,
  .editor-table td {
    border: 1px solid #ccc;
  }

  .print-only {
    display: block;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.25rem;
  background-color: var(--primary);
  color: #fff;
  font-weight: 600;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

.no-js .theme-toggle {
  display: none;
}

.no-js .hamburger {
  display: none;
}

.no-js .header-nav {
  display: flex;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

:root:not([data-theme]) .theme-toggle .icon-sun {
  display: block;
}

:root:not([data-theme]) .theme-toggle .icon-moon {
  display: none;
}

.table-cell-selected {
  background-color: rgba(var(--primary-rgb), 0.1) !important;
  box-shadow: inset 0 0 0 2px var(--primary) !important;
}

.table-row-selected td {
  background-color: rgba(var(--primary-rgb), 0.05) !important;
}

.table-col-selected {
  background-color: rgba(var(--primary-rgb), 0.05) !important;
}

.context-menu {
  position: fixed;
  z-index: var(--z-modal);
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 180px;
  padding: 0.375rem 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: all var(--transition-fast);
}

.context-menu.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: left;
  transition: all var(--transition-fast);
}

.context-menu-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text);
}

.context-menu-item.danger {
  color: var(--error);
}

.context-menu-item.danger:hover {
  background-color: var(--error-bg);
}

.context-menu-separator {
  height: 1px;
  background-color: var(--border);
  margin: 0.375rem 0;
}

.context-menu-shortcut {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.notification-dot {
  position: relative;
}

.notification-dot::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: var(--error);
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}

.loading-shimmer {
  position: relative;
  overflow: hidden;
}

.loading-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--primary-rgb), 0.05) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.drag-handle:hover {
  color: var(--text-light);
}

.drag-handle:active {
  cursor: grabbing;
}

.resizable {
  resize: both;
  overflow: auto;
}

.table-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background-color var(--transition-fast);
}

.table-resize-handle:hover,
.table-resize-handle.active {
  background-color: var(--primary);
}

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.confidence-high {
  background-color: var(--success-bg);
  color: var(--success);
}

.confidence-medium {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.confidence-low {
  background-color: var(--error-bg);
  color: var(--error);
}

.ocr-language-selector {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ocr-language-btn {
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.ocr-language-btn:hover {
  color: var(--text-light);
  border-color: var(--border-light);
}

.ocr-language-btn.active {
  color: var(--primary);
  border-color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.table-detection-overlay {
  position: absolute;
  border: 2px solid var(--primary);
  background-color: rgba(var(--primary-rgb), 0.08);
  border-radius: 4px;
  pointer-events: none;
  transition: all var(--transition-base);
}

.table-detection-overlay .detection-label {
  position: absolute;
  top: -24px;
  left: -2px;
  padding: 0.125rem 0.5rem;
  background-color: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px 4px 0 0;
}

.batch-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: all var(--transition-fast);
}

.batch-item:hover {
  border-color: var(--border-light);
}

.batch-item-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.batch-item-status.pending {
  background-color: var(--text-muted);
}

.batch-item-status.processing {
  background-color: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.batch-item-status.done {
  background-color: var(--success);
}

.batch-item-status.error {
  background-color: var(--error);
}

.batch-item-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-item-progress {
  width: 60px;
  height: 4px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
}

.batch-item-progress-bar {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.375rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-light);
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.onboarding-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.onboarding-card h2 {
  margin-bottom: 0.75rem;
}

.onboarding-card p {
  margin-bottom: 1.5rem;
}

.onboarding-steps {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.onboarding-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border);
  transition: all var(--transition-fast);
}

.onboarding-step-dot.active {
  background-color: var(--primary);
  width: 24px;
  border-radius: var(--radius-full);
}

.version-badge {
  position: fixed;
  bottom: calc(1rem + var(--safe-bottom));
  left: 1rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  z-index: var(--z-sticky);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.version-badge:hover {
  opacity: 1;
}

[data-theme="light"] .version-badge {
  background-color: var(--card-bg);
}
