/* TulBD Client-Side PDF Converter Suite Styling - Compact & Modern */
.pdf-conv-card {
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, rgba(0, 0, 0, 0.08));
  border-radius: var(--tb-radius-lg, 16px);
  padding: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  margin: 0 0 28px;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  font-family: inherit;
  color: var(--tb-text, #1e293b);
  position: relative;
  transition: all 0.25s ease;
}

.pdf-conv-header {
  margin-bottom: 16px;
  text-align: center;
}

.pdf-conv-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pdf-conv-icon-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-conv-real-logo {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
  transition: transform 0.3s ease;
}

.pdf-conv-card:hover .pdf-conv-real-logo {
  transform: translateY(-2px);
}

.pdf-conv-header h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.3;
  color: var(--tb-text, #0f172a);
}

.pdf-conv-lead {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tb-text-secondary, #64748b);
  max-width: 680px;
  margin: 0 auto 10px;
}

/* Quick Format Switcher */
.pdf-format-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--tb-border, rgba(0, 0, 0, 0.08));
}

.pdf-format-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-width: max-content;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  background: var(--tb-surface, #f8fafc);
  color: var(--tb-text-secondary, #475569);
  border: 1px solid var(--tb-border, #e2e8f0);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.pdf-format-pill:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.pdf-format-pill.active {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
}

/* Notice for HEIC / HEIF */
.pdf-conv-notice {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  color: var(--tb-text, #1e293b);
  font-size: 13px;
  line-height: 1.5;
}

.pdf-notice-title {
  display: block;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 4px;
}

/* Dropzone */
.pdf-dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 14px;
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  position: relative;
}

.pdf-dropzone:hover,
.pdf-dropzone:focus,
.pdf-dropzone.dragover {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  transform: translateY(-1px);
}

.pdf-dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #fee2e2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.pdf-dropzone:hover .pdf-dropzone-icon {
  transform: scale(1.08) translateY(-2px);
}

.pdf-dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--tb-text, #0f172a);
  margin-bottom: 4px;
}

.pdf-dropzone-sub {
  font-size: 12.5px;
  color: var(--tb-text-secondary, #64748b);
  margin-bottom: 14px;
}

/* TulBD Theme Button (Matching Picture 3) */
.pdf-dropzone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: none;
  border-radius: 10px; /* Matching Image 2 */
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-dropzone-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

/* File Details Bar */
.pdf-file-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--tb-surface, #f8fafc);
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 16px;
}

.pdf-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13.5px;
  color: #ef4444;
  word-break: break-all;
}

.pdf-meta-pill {
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tb-text-secondary, #64748b);
}

.pdf-change-file-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--tb-border, rgba(0, 0, 0, 0.12));
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tb-text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdf-change-file-btn:hover {
  background: var(--tb-card, #ffffff);
  color: #ef4444;
  border-color: #ef4444;
}

/* Settings Grid */
.pdf-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pdf-setting-box {
  background: var(--tb-surface, #f8fafc);
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 12px;
  padding: 12px 14px;
}

.pdf-setting-box h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--tb-text, #1e293b);
}

.pdf-setting-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, rgba(0, 0, 0, 0.08));
  color: #ef4444;
}

.pdf-page-mode-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.pdf-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.pdf-custom-range-wrap {
  margin-top: 8px;
}

.pdf-input-custom-range {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--tb-border, #cbd5e1);
  border-radius: 6px;
  font-size: 13px;
  background: var(--tb-card, #ffffff);
  color: var(--tb-text, #0f172a);
  box-sizing: border-box;
}

.pdf-range-hint {
  display: block;
  font-size: 11px;
  color: var(--tb-text-secondary, #64748b);
  margin-top: 3px;
}

/* DPI Presets */
.pdf-dpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.pdf-dpi-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, #cbd5e1);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tb-text, #1e293b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-dpi-btn small {
  font-size: 9px;
  font-weight: 500;
  color: var(--tb-text-secondary, #64748b);
  margin-top: 1px;
}

.pdf-dpi-btn.active {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.pdf-dpi-btn.active small {
  color: rgba(255, 255, 255, 0.9);
}

.pdf-quality-slider-wrap {
  margin-top: 6px;
}

.pdf-slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--tb-text-secondary, #64748b);
}

.pdf-slider {
  width: 100%;
  accent-color: #ef4444;
  cursor: pointer;
}

/* Data / Text Options */
.pdf-data-options-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.pdf-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.pdf-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pdf-select-delimiter {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--tb-border, #cbd5e1);
  background: var(--tb-card, #ffffff);
  color: var(--tb-text, #1e293b);
  font-size: 12.5px;
}

/* Progress Bar */
.pdf-progress-wrap {
  margin-top: 16px;
  background: var(--tb-surface, #f8fafc);
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 16px;
}

.pdf-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.pdf-progress-bar {
  width: 100%;
  height: 7px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  overflow: hidden;
}

.pdf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 9999px;
  transition: width 0.25s ease;
}

/* Preview Section */
.pdf-preview-section {
  margin-top: 18px;
}

.pdf-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: var(--tb-surface, #f8fafc);
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 8px;
}

.pdf-page-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-nav-btn {
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, #cbd5e1);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-nav-btn:hover:not(:disabled) {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.pdf-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.pdf-view-toggle-group {
  display: flex;
  gap: 5px;
}

.pdf-view-btn {
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, #cbd5e1);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-view-btn.active {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.pdf-single-page-wrap {
  background: var(--tb-surface, #f8fafc);
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pdf-canvas-container {
  max-width: 100%;
  max-height: 420px;
  overflow: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.pdf-main-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.pdf-current-page-meta {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tb-text-secondary, #64748b);
  margin-top: 10px;
}

/* Grid View */
.pdf-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding: 10px;
  background: var(--tb-surface, #f8fafc);
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 12px;
}

.pdf-thumb-card {
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, #cbd5e1);
  border-radius: 8px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.pdf-thumb-card:hover {
  transform: translateY(-2px);
  border-color: #ef4444;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15);
}

.pdf-thumb-card.active {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px #ef4444;
}

.pdf-thumb-canvas {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.pdf-thumb-label {
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--tb-text-secondary, #64748b);
}

/* Text / Code Preview */
.pdf-text-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
}

.pdf-text-stats {
  font-weight: 600;
  color: var(--tb-text-secondary, #64748b);
}

.pdf-btn-copy-code {
  background: var(--tb-card, #ffffff);
  border: 1px solid var(--tb-border, #cbd5e1);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdf-btn-copy-code:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #ef4444;
}

.pdf-code-editor-wrap {
  width: 100%;
}

.pdf-code-output {
  width: 100%;
  height: 320px;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 14px;
  resize: vertical;
  outline: none;
}

/* ==========================================================================
   Actions Bar: Centered Alignment as Requested
   ========================================================================== */
.pdf-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center; /* CENTER ALIGNED BUTTONS */
  text-align: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--tb-border, rgba(0, 0, 0, 0.08));
}

/* Primary Convert Button - Theme Red (Picture 3 style) */
.pdf-btn-convert {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: none;
  border-radius: 10px; /* Matching Image 2 */
  padding: 11px 28px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.pdf-btn-convert:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.pdf-btn-convert:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Download Single Page Button */
.pdf-btn-download-single {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.pdf-btn-download-single:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

/* Download All (ZIP) Button */
.pdf-btn-download-zip {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.pdf-btn-download-zip:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}

/* Reset Button */
.pdf-btn-reset {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pdf-btn-reset:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* Status Message - Center Aligned */
.pdf-status-msg {
  flex-basis: 100%;
  text-align: center;
  margin: 10px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tb-text-secondary, #64748b);
}

/* ==========================================================================
   Full Dark Mode / Night Mode Engine for PDF Converter
   ========================================================================== */
[data-theme="dark"] .pdf-conv-card,
body.dark-theme .pdf-conv-card,
.dark-theme .pdf-conv-card {
  background: #151f32 !important;
  border-color: #273549 !important;
  color: #f1f5f9 !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .pdf-conv-header h2,
body.dark-theme .pdf-conv-header h2,
.dark-theme .pdf-conv-header h2 {
  color: #f8fafc !important;
}

[data-theme="dark"] .pdf-conv-lead,
body.dark-theme .pdf-conv-lead,
.dark-theme .pdf-conv-lead {
  color: #94a3b8 !important;
}

[data-theme="dark"] .pdf-format-switcher,
body.dark-theme .pdf-format-switcher,
.dark-theme .pdf-format-switcher {
  border-bottom-color: #273549 !important;
}

[data-theme="dark"] .pdf-format-pill,
body.dark-theme .pdf-format-pill,
.dark-theme .pdf-format-pill {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border: 1px solid #334155 !important;
}

[data-theme="dark"] .pdf-format-pill:hover,
body.dark-theme .pdf-format-pill:hover,
.dark-theme .pdf-format-pill:hover {
  background: #1e293b !important;
  color: #fca5a5 !important;
  border-color: #ef4444 !important;
}

[data-theme="dark"] .pdf-format-pill.active,
body.dark-theme .pdf-format-pill.active,
.dark-theme .pdf-format-pill.active {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5) !important;
}

[data-theme="dark"] .pdf-dropzone,
body.dark-theme .pdf-dropzone,
.dark-theme .pdf-dropzone {
  border-color: #ef4444 !important;
  background: rgba(30, 41, 59, 0.5) !important;
}

[data-theme="dark"] .pdf-dropzone:hover,
body.dark-theme .pdf-dropzone:hover,
.dark-theme .pdf-dropzone:hover {
  background: rgba(239, 68, 68, 0.08) !important;
}

[data-theme="dark"] .pdf-dropzone-icon,
body.dark-theme .pdf-dropzone-icon,
.dark-theme .pdf-dropzone-icon {
  background: #1e293b !important;
  color: #f87171 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .pdf-dropzone-title,
body.dark-theme .pdf-dropzone-title,
.dark-theme .pdf-dropzone-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-dropzone-sub,
body.dark-theme .pdf-dropzone-sub,
.dark-theme .pdf-dropzone-sub {
  color: #94a3b8 !important;
}

[data-theme="dark"] .pdf-file-details,
body.dark-theme .pdf-file-details,
.dark-theme .pdf-file-details {
  background: #0f172a !important;
  border-color: #273549 !important;
}

[data-theme="dark"] .pdf-meta-pill,
body.dark-theme .pdf-meta-pill,
.dark-theme .pdf-meta-pill {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .pdf-change-file-btn,
body.dark-theme .pdf-change-file-btn,
.dark-theme .pdf-change-file-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .pdf-change-file-btn:hover,
body.dark-theme .pdf-change-file-btn:hover,
.dark-theme .pdf-change-file-btn:hover {
  color: #f87171 !important;
  border-color: #ef4444 !important;
  background: #273549 !important;
}

[data-theme="dark"] .pdf-setting-box,
body.dark-theme .pdf-setting-box,
.dark-theme .pdf-setting-box {
  background: #0f172a !important;
  border-color: #273549 !important;
}

[data-theme="dark"] .pdf-setting-box h3,
body.dark-theme .pdf-setting-box h3,
.dark-theme .pdf-setting-box h3 {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-setting-tag,
body.dark-theme .pdf-setting-tag,
.dark-theme .pdf-setting-tag {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #38bdf8 !important;
}

[data-theme="dark"] .pdf-radio-label,
body.dark-theme .pdf-radio-label,
.dark-theme .pdf-radio-label {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .pdf-input-custom-range,
body.dark-theme .pdf-input-custom-range,
.dark-theme .pdf-input-custom-range {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-range-hint,
body.dark-theme .pdf-range-hint,
.dark-theme .pdf-range-hint {
  color: #94a3b8 !important;
}

[data-theme="dark"] .pdf-dpi-btn,
body.dark-theme .pdf-dpi-btn,
.dark-theme .pdf-dpi-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-dpi-btn small,
body.dark-theme .pdf-dpi-btn small,
.dark-theme .pdf-dpi-btn small {
  color: #94a3b8 !important;
}

[data-theme="dark"] .pdf-dpi-btn.active,
body.dark-theme .pdf-dpi-btn.active,
.dark-theme .pdf-dpi-btn.active {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .pdf-dpi-btn.active small,
body.dark-theme .pdf-dpi-btn.active small,
.dark-theme .pdf-dpi-btn.active small {
  color: #ffffff !important;
}

[data-theme="dark"] .pdf-select-delimiter,
body.dark-theme .pdf-select-delimiter,
.dark-theme .pdf-select-delimiter {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-checkbox-label,
body.dark-theme .pdf-checkbox-label,
.dark-theme .pdf-checkbox-label {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .pdf-progress-wrap,
body.dark-theme .pdf-progress-wrap,
.dark-theme .pdf-progress-wrap {
  background: #0f172a !important;
  border-color: #273549 !important;
}

[data-theme="dark"] .pdf-preview-toolbar,
body.dark-theme .pdf-preview-toolbar,
.dark-theme .pdf-preview-toolbar {
  background: #0f172a !important;
  border-color: #273549 !important;
}

[data-theme="dark"] .pdf-nav-btn,
body.dark-theme .pdf-nav-btn,
.dark-theme .pdf-nav-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-page-indicator,
body.dark-theme .pdf-page-indicator,
.dark-theme .pdf-page-indicator {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-view-btn,
body.dark-theme .pdf-view-btn,
.dark-theme .pdf-view-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .pdf-view-btn.active,
body.dark-theme .pdf-view-btn.active,
.dark-theme .pdf-view-btn.active {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .pdf-single-page-wrap,
body.dark-theme .pdf-single-page-wrap,
.dark-theme .pdf-single-page-wrap {
  background: #0f172a !important;
  border-color: #273549 !important;
}

[data-theme="dark"] .pdf-current-page-meta,
body.dark-theme .pdf-current-page-meta,
.dark-theme .pdf-current-page-meta {
  color: #94a3b8 !important;
}

[data-theme="dark"] .pdf-thumbnails-grid,
body.dark-theme .pdf-thumbnails-grid,
.dark-theme .pdf-thumbnails-grid {
  background: #0f172a !important;
  border-color: #273549 !important;
}

[data-theme="dark"] .pdf-thumb-card,
body.dark-theme .pdf-thumb-card,
.dark-theme .pdf-thumb-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .pdf-thumb-label,
body.dark-theme .pdf-thumb-label,
.dark-theme .pdf-thumb-label {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .pdf-btn-copy-code,
body.dark-theme .pdf-btn-copy-code,
.dark-theme .pdf-btn-copy-code {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .pdf-btn-reset,
body.dark-theme .pdf-btn-reset,
.dark-theme .pdf-btn-reset {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .pdf-btn-reset:hover,
body.dark-theme .pdf-btn-reset:hover,
.dark-theme .pdf-btn-reset:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: #ef4444 !important;
}

[data-theme="dark"] .pdf-actions-bar,
body.dark-theme .pdf-actions-bar,
.dark-theme .pdf-actions-bar {
  border-top-color: #273549 !important;
}

[data-theme="dark"] .pdf-status-msg,
body.dark-theme .pdf-status-msg,
.dark-theme .pdf-status-msg {
  color: #94a3b8 !important;
}

@media (max-width: 640px) {
  .pdf-conv-card {
    padding: 18px 14px;
    border-radius: 14px;
  }
  .pdf-conv-header h2 {
    font-size: 18px;
  }
  .pdf-dpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .pdf-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .pdf-btn-convert,
  .pdf-btn-download-single,
  .pdf-btn-download-zip,
  .pdf-btn-reset {
    width: 100%;
  }
}
