/* ==========================================================================
   4KATE Premium Global Dark Mode — Complete Frontend Design System
   Palette:
     - Main background:      #0B1120
     - Secondary background: #111B2E
     - Card background:      #162238
     - Elevated surfaces:    #1B2B43
     - Main text:            #F1F5F9
     - Secondary text:       #A9B7CA
     - Borders:              #2A3B55 (hover: #3B5070)
     - Primary blue:         #1769FF
   ========================================================================== */

/* 1. Base & Typography */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .site-main {
  background-color: #0B1120;
  color: #F1F5F9;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: #F1F5F9;
}

html[data-theme="dark"] p,
html[data-theme="dark"] li {
  color: #CBD5E1;
}

html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .hero-subtitle,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .page-subtitle {
  color: #A9B7CA;
}

/* 2. Header, Theme/Lang Menus, Navigation Dropdowns & Mobile Drawer */
html[data-theme="dark"] .site-header {
  background-color: rgba(11, 17, 32, 0.94);
  border-bottom-color: #2A3B55;
  box-shadow: 0 2px 14px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .nav-dropdown,
html[data-theme="dark"] .lang-menu,
html[data-theme="dark"] .theme-menu {
  background-color: #162238;
  border-color: #2A3B55;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.65);
}

html[data-theme="dark"] .nav-dropdown-heading {
  color: #A9B7CA;
  border-bottom-color: #2A3B55;
}

html[data-theme="dark"] .nav-dropdown-item {
  color: #F1F5F9;
}

html[data-theme="dark"] .nav-dropdown-item:hover {
  background-color: rgba(23, 105, 255, 0.16);
  color: #FFFFFF;
}

html[data-theme="dark"] .nav-dropdown-item-icon {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #60A5FA;
}

html[data-theme="dark"] .nav-dropdown-footer {
  background-color: #111B2E;
  border-top-color: #2A3B55;
}

html[data-theme="dark"] .nav-dropdown-badge--soon {
  background-color: #111B2E;
  color: #A9B7CA;
  border: 1px solid #2A3B55;
}

@media (max-width: 768px) {
  html[data-theme="dark"] .nav-links {
    background-color: #0B1120;
    border-top-color: #2A3B55;
  }
  html[data-theme="dark"] .nav-links .nav-link {
    border-bottom-color: #2A3B55;
    color: #F1F5F9;
  }
}

/* 3. Homepage Hero, Laptop Mockup, Trust Bar & Sections */
html[data-theme="dark"] .hero-section,
html[data-theme="dark"] .hero-section.ps-hero-approved,
html[data-theme="dark"] .home-hero {
  background: radial-gradient(circle at 82% 24%, rgba(23, 105, 255, 0.16) 0%, rgba(11, 17, 32, 0) 58%), #0B1120;
}

html[data-theme="dark"] .ps-hero-approved .hero-desc,
html[data-theme="dark"] .ps-trust-bar-desc,
html[data-theme="dark"] .ps-trust-bar-item span {
  color: #A9B7CA;
}

html[data-theme="dark"] .ps-trust-bar-heading,
html[data-theme="dark"] .ps-trust-bar-item strong {
  color: #F1F5F9;
}

html[data-theme="dark"] .ps-trust-bar-separator {
  background-color: #2A3B55;
}

html[data-theme="dark"] .ps-laptop-screen {
  background-color: #111B2E;
  border-color: #2A3B55;
}

html[data-theme="dark"] .ps-screen-topbar,
html[data-theme="dark"] .ps-screen-queue {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .ps-screen-url {
  background-color: #0B1120;
  color: #A9B7CA;
  border-color: #2A3B55;
}

html[data-theme="dark"] .ps-screen-upload {
  background: linear-gradient(180deg, #162238 0%, #111B2E 100%);
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .ps-screen-icon {
  background: linear-gradient(135deg, rgba(23, 105, 255, 0.25) 0%, rgba(23, 105, 255, 0.1) 100%);
  color: #60A5FA;
}

html[data-theme="dark"] .ps-laptop-base {
  background: linear-gradient(180deg, #2A3B55 0%, #1B2B43 100%);
}

html[data-theme="dark"] .ps-laptop-notch {
  background-color: #111B2E;
}

html[data-theme="dark"] .ps-float-badge {
  background-color: rgba(22, 34, 56, 0.96);
  border-color: #2A3B55;
  color: #F1F5F9;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.5);
}

html[data-theme="dark"] .ps-audiences-section {
  background: linear-gradient(180deg, #111B2E 0%, #0B1120 100%);
}

html[data-theme="dark"] .hero-badge,
html[data-theme="dark"] .privacy-badge,
html[data-theme="dark"] .trust-pill,
html[data-theme="dark"] .tool-badge,
html[data-theme="dark"] .badge {
  background-color: #162238;
  border-color: #2A3B55;
  color: #CBD5E1;
}

html[data-theme="dark"] .hero-search-wrap,
html[data-theme="dark"] .hero-search-box,
html[data-theme="dark"] .hero-search-results {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .hero-search-input {
  background-color: transparent;
  color: #F1F5F9;
}

html[data-theme="dark"] .hero-search-input::placeholder {
  color: #A9B7CA;
}

html[data-theme="dark"] .popular-tools-section,
html[data-theme="dark"] .categories-section,
html[data-theme="dark"] .privacy-section,
html[data-theme="dark"] .knowledge-section,
html[data-theme="dark"] .tools-grid-section {
  background-color: #0B1120;
}

html[data-theme="dark"] .how-it-works-section,
html[data-theme="dark"] .use-cases-section,
html[data-theme="dark"] .faq-section,
html[data-theme="dark"] .related-tools-section {
  background-color: #111B2E;
}

/* 4. Shared Cards, Tabs & Form Controls */
html[data-theme="dark"] .card,
html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .hiw-step-card,
html[data-theme="dark"] .privacy-card,
html[data-theme="dark"] .use-case-card,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .directory-card,
html[data-theme="dark"] .seo-content-card,
html[data-theme="dark"] .tool-seo-section {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.35);
}

html[data-theme="dark"] .tool-card:hover,
html[data-theme="dark"] .category-card:hover,
html[data-theme="dark"] .article-card:hover {
  border-color: #1769FF;
  background-color: #1B2B43;
}

html[data-theme="dark"] .tool-card-title,
html[data-theme="dark"] .article-card-title,
html[data-theme="dark"] .faq-question {
  color: #F1F5F9;
}

html[data-theme="dark"] .tool-card-desc,
html[data-theme="dark"] .article-card-excerpt,
html[data-theme="dark"] .faq-answer {
  color: #A9B7CA;
}

html[data-theme="dark"] .tool-card-icon,
html[data-theme="dark"] .category-icon,
html[data-theme="dark"] .step-number {
  background-color: rgba(23, 105, 255, 0.16);
  color: #60A5FA;
  border-color: rgba(23, 105, 255, 0.3);
}

html[data-theme="dark"] .filter-tab,
html[data-theme="dark"] .category-tab,
html[data-theme="dark"] .category-pill {
  background-color: #162238;
  border-color: #2A3B55;
  color: #CBD5E1;
}

html[data-theme="dark"] .filter-tab:hover,
html[data-theme="dark"] .category-tab:hover,
html[data-theme="dark"] .category-pill:hover {
  border-color: #1769FF;
  color: #F1F5F9;
}

html[data-theme="dark"] .filter-tab.active,
html[data-theme="dark"] .filter-tab.is-active,
html[data-theme="dark"] .category-tab.active,
html[data-theme="dark"] .category-pill.active {
  background-color: #1769FF;
  border-color: #1769FF;
  color: #FFFFFF;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-ghost {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-outline:hover {
  background-color: #1B2B43;
  border-color: #3B5070;
  color: #FFFFFF;
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: #1769FF;
  outline: none;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7E8FA8;
}

/* 5. Tool Workspace Base (Fixes Tool Hero & Heading Rectangular Box) */
html[data-theme="dark"] .tool-workspace,
html[data-theme="dark"] .tool-workspace--clean-minimal {
  background-color: #0B1120;
  color: #F1F5F9;
}

html[data-theme="dark"] .tool-hero {
  background: radial-gradient(circle at 28% 15%, rgba(23, 105, 255, 0.14) 0%, rgba(11, 17, 32, 0) 60%), #111B2E;
  border-bottom-color: #2A3B55;
}

html[data-theme="dark"] .workspace-header {
  background: transparent;
  border: none;
}

html[data-theme="dark"] .workspace-title,
html[data-theme="dark"] .tool-hero-info h1,
html[data-theme="dark"] .breadcrumb-current {
  color: #F1F5F9;
}

html[data-theme="dark"] .workspace-desc {
  color: #A9B7CA;
}

html[data-theme="dark"] .breadcrumb-separator,
html[data-theme="dark"] .breadcrumb-sep {
  color: #64748B;
}

html[data-theme="dark"] .tool-hero-workspace {
  background-color: #162238;
  border-color: #2A3B55;
}

html[data-theme="dark"] .dropzone-container,
html[data-theme="dark"] .upload-zone,
html[data-theme="dark"] .drop-zone {
  background-color: #111B2E;
  border-color: #3B5070;
  color: #F1F5F9;
}

html[data-theme="dark"] .dropzone-container:hover,
html[data-theme="dark"] .dropzone-container.dragover,
html[data-theme="dark"] .upload-zone:hover,
html[data-theme="dark"] .upload-zone.is-dragover,
html[data-theme="dark"] .drop-zone.is-dragover {
  background-color: rgba(23, 105, 255, 0.14);
  border-color: #1769FF;
}

html[data-theme="dark"] .file-list-wrapper,
html[data-theme="dark"] .progress-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .error-card,
html[data-theme="dark"] .workspace-panel,
html[data-theme="dark"] .options-panel,
html[data-theme="dark"] .status-card,
html[data-theme="dark"] .tool-step-card,
html[data-theme="dark"] .tool-info-card,
html[data-theme="dark"] .tool-format-icon {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .tool-step-card:not(:last-child)::after {
  background-color: #2A3B55;
}

html[data-theme="dark"] .file-item,
html[data-theme="dark"] .tool-file-item,
html[data-theme="dark"] .file-card {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .file-item:hover,
html[data-theme="dark"] .tool-file-item:hover {
  background-color: #1B2B43;
  border-color: #3B5070;
}

html[data-theme="dark"] .file-item-name,
html[data-theme="dark"] .file-name,
html[data-theme="dark"] .count-label,
html[data-theme="dark"] .status-heading,
html[data-theme="dark"] .result-title {
  color: #F1F5F9;
}

html[data-theme="dark"] .file-item-size,
html[data-theme="dark"] .file-size,
html[data-theme="dark"] .status-subtext,
html[data-theme="dark"] .result-summary {
  color: #A9B7CA;
}

html[data-theme="dark"] .tool-option-select,
html[data-theme="dark"] .tool-option-input {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .status-pill--processing,
html[data-theme="dark"] .file-order-number {
  background-color: rgba(23, 105, 255, 0.16);
  color: #60A5FA;
}

html[data-theme="dark"] .progress-bar-track,
html[data-theme="dark"] .progress-track {
  background-color: #111B2E;
}

/* 6. Image Conversion Pages */
html[data-theme="dark"] .conversion-page {
  background-color: #0B1120;
  color: #F1F5F9;
}

html[data-theme="dark"] .conversion-breadcrumbs .breadcrumb-list,
html[data-theme="dark"] .conversion-breadcrumbs a,
html[data-theme="dark"] .conversion-hero-subtitle,
html[data-theme="dark"] .conversion-drop-text,
html[data-theme="dark"] .step-card-desc,
html[data-theme="dark"] .editorial-text,
html[data-theme="dark"] .related-card-desc {
  color: #A9B7CA;
}

html[data-theme="dark"] .conversion-breadcrumbs .breadcrumb-item--current,
html[data-theme="dark"] .conversion-hero-title,
html[data-theme="dark"] .section-heading-centered .section-title,
html[data-theme="dark"] .step-card-title,
html[data-theme="dark"] .editorial-title,
html[data-theme="dark"] .related-card-title,
html[data-theme="dark"] .highlight-item {
  color: #F1F5F9;
}

html[data-theme="dark"] .conversion-dropzone-wrapper,
html[data-theme="dark"] .editorial-card {
  background-color: #111B2E;
  border-color: #2A3B55;
}

html[data-theme="dark"] .conversion-dropzone-wrapper:hover,
html[data-theme="dark"] .conversion-dropzone-wrapper:focus-visible,
html[data-theme="dark"] .conversion-dropzone-wrapper:focus {
  background-color: rgba(23, 105, 255, 0.14);
  border-color: #1769FF;
}

html[data-theme="dark"] .conversion-file-list-wrapper,
html[data-theme="dark"] .conversion-status-card,
html[data-theme="dark"] .conversion-step-card,
html[data-theme="dark"] .related-conversion-card {
  background-color: #162238;
  border-color: #2A3B55;
}

html[data-theme="dark"] .step-num,
html[data-theme="dark"] .format-badge--to {
  background-color: rgba(23, 105, 255, 0.18);
  color: #60A5FA;
}

html[data-theme="dark"] .format-badge--from {
  background-color: #111B2E;
  color: #A9B7CA;
}

html[data-theme="dark"] .btn-icon:hover {
  background-color: #1B2B43;
  color: #F1F5F9;
}

/* 7. Blog Archive & Single Blog Article */
html[data-theme="dark"] .blog-archive-page,
html[data-theme="dark"] .blog-article-page {
  background-color: #0B1120;
  color: #CBD5E1;
}

html[data-theme="dark"] .blog-breadcrumbs,
html[data-theme="dark"] .blog-breadcrumbs a,
html[data-theme="dark"] .blog-dates-row,
html[data-theme="dark"] .blog-share-label,
html[data-theme="dark"] .blog-featured-caption,
html[data-theme="dark"] .blog-toc-chevron,
html[data-theme="dark"] .blog-toc-item a,
html[data-theme="dark"] .blog-toc-item--sub a,
html[data-theme="dark"] .blog-intro,
html[data-theme="dark"] .blog-tool-promo-desc,
html[data-theme="dark"] .blog-archive-subtitle {
  color: #A9B7CA;
}

html[data-theme="dark"] .blog-breadcrumbs .blog-bc-current,
html[data-theme="dark"] .blog-title,
html[data-theme="dark"] .blog-author-name,
html[data-theme="dark"] .blog-toc-toggle,
html[data-theme="dark"] .blog-prose h2,
html[data-theme="dark"] .blog-prose h3,
html[data-theme="dark"] .blog-prose strong,
html[data-theme="dark"] .blog-tool-promo-title,
html[data-theme="dark"] .blog-related-heading,
html[data-theme="dark"] .blog-archive-title {
  color: #F1F5F9;
}

html[data-theme="dark"] .blog-prose {
  color: #CBD5E1;
}

html[data-theme="dark"] .blog-category-pill,
html[data-theme="dark"] .blog-author-avatar,
html[data-theme="dark"] .blog-prose code {
  background-color: rgba(23, 105, 255, 0.16);
  color: #60A5FA;
}

html[data-theme="dark"] .blog-category-pill:hover {
  background-color: rgba(23, 105, 255, 0.25);
}

html[data-theme="dark"] .blog-toc-card,
html[data-theme="dark"] .blog-prose blockquote,
html[data-theme="dark"] .blog-prose th,
html[data-theme="dark"] .blog-featured-frame {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .blog-prose td {
  background-color: #162238;
  border-color: #2A3B55;
  color: #CBD5E1;
}

html[data-theme="dark"] .blog-share-btn,
html[data-theme="dark"] .blog-article-card,
html[data-theme="dark"] .blog-cat-chip,
html[data-theme="dark"] .blog-pagination .page-numbers,
html[data-theme="dark"] .blog-tool-promo,
html[data-theme="dark"] .blog-tool-promo--sidebar {
  background: #162238;
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .blog-share-btn:hover,
html[data-theme="dark"] .blog-share-btn:focus-visible,
html[data-theme="dark"] .blog-cat-chip:hover {
  background-color: rgba(23, 105, 255, 0.16);
  border-color: #1769FF;
}

html[data-theme="dark"] .blog-article-card-thumb,
html[data-theme="dark"] .blog-article-card-thumb--empty {
  background: #111B2E;
}

/* 8. About & Contact Pages */
html[data-theme="dark"] .about-page-wrapper,
html[data-theme="dark"] .contact-page-wrapper {
  background-color: #0B1120;
  color: #CBD5E1;
}

html[data-theme="dark"] .about-hero {
  background: radial-gradient(circle at 84% 22%, rgba(23, 105, 255, 0.16) 0%, rgba(11, 17, 32, 0) 60%), #0B1120;
}

html[data-theme="dark"] .about-section--surface {
  background-color: #111B2E;
}

html[data-theme="dark"] .about-section--tinted {
  background: linear-gradient(180deg, #111B2E 0%, #0B1120 100%);
}

html[data-theme="dark"] .about-hero-title,
html[data-theme="dark"] .about-workspace-label,
html[data-theme="dark"] .about-workspace-info strong,
html[data-theme="dark"] .about-workspace-footer strong,
html[data-theme="dark"] .about-section-title,
html[data-theme="dark"] .about-offer-card h3,
html[data-theme="dark"] .about-step-card h3,
html[data-theme="dark"] .about-value-card h3,
html[data-theme="dark"] .contact-hero-title,
html[data-theme="dark"] .contact-card-title,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .contact-info-title,
html[data-theme="dark"] .info-card-title,
html[data-theme="dark"] .contact-faq-title,
html[data-theme="dark"] .contact-faq-list .faq-question {
  color: #F1F5F9;
}

html[data-theme="dark"] .about-hero-desc,
html[data-theme="dark"] .about-workspace-info span,
html[data-theme="dark"] .about-workspace-footer small,
html[data-theme="dark"] .about-section-lead,
html[data-theme="dark"] .about-offer-card p,
html[data-theme="dark"] .about-step-card p,
html[data-theme="dark"] .about-value-card p,
html[data-theme="dark"] .about-audience-desc,
html[data-theme="dark"] .contact-hero-desc,
html[data-theme="dark"] .contact-card-subtitle,
html[data-theme="dark"] .contact-info-subtitle,
html[data-theme="dark"] .info-card-desc,
html[data-theme="dark"] .contact-faq-subtitle,
html[data-theme="dark"] .contact-faq-list .faq-answer,
html[data-theme="dark"] .contact-faq-list .faq-icon {
  color: #A9B7CA;
}

html[data-theme="dark"] .about-workspace-card,
html[data-theme="dark"] .about-workspace-row,
html[data-theme="dark"] .about-offer-card,
html[data-theme="dark"] .about-step-card,
html[data-theme="dark"] .about-value-card,
html[data-theme="dark"] .about-audience-tags span,
html[data-theme="dark"] .about-cta-btn,
html[data-theme="dark"] .contact-form-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .contact-faq-list .faq-item {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .about-workspace-topbar,
html[data-theme="dark"] .about-workspace-footer,
html[data-theme="dark"] .about-offer-tags span,
html[data-theme="dark"] .about-privacy-card {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #CBD5E1;
}

html[data-theme="dark"] .about-eyebrow,
html[data-theme="dark"] .about-workspace-badge,
html[data-theme="dark"] .about-workspace-icon--pdf,
html[data-theme="dark"] .about-offer-badge--pdf,
html[data-theme="dark"] .about-step-num,
html[data-theme="dark"] .about-value-icon,
html[data-theme="dark"] .contact-hero-badge,
html[data-theme="dark"] .info-card-icon {
  background-color: rgba(23, 105, 255, 0.16);
  color: #60A5FA;
}

html[data-theme="dark"] .form-control {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

/* 9. All 19 Tool-Specific Workspaces (PDF Editor, Scanner, Crop, Resize, Compress, Rotate, Watermark, Page Numbers, Add Text, Merge, Split, Organize, Extract, Delete, Flatten) */
html[data-theme="dark"] .atp-editor-shell,
html[data-theme="dark"] .cmp-editor-shell,
html[data-theme="dark"] .crop-editor-shell,
html[data-theme="dark"] .del-editor-shell,
html[data-theme="dark"] .ext-editor-shell,
html[data-theme="dark"] .flt-editor-shell,
html[data-theme="dark"] .iwm-editor-shell,
html[data-theme="dark"] .mg-editor-shell,
html[data-theme="dark"] .org-editor-shell,
html[data-theme="dark"] .pn-editor-shell,
html[data-theme="dark"] .pe-shell,
html[data-theme="dark"] .rs-editor-shell,
html[data-theme="dark"] .rpdf-editor-shell,
html[data-theme="dark"] .rt-editor-shell,
html[data-theme="dark"] .sp-editor-shell {
  background-color: #0B1120;
  color: #F1F5F9;
}

/* Workspace Cards, Sidebars, Control Panels & Modals */
html[data-theme="dark"] .atp-upload-card,
html[data-theme="dark"] .atp-workspace,
html[data-theme="dark"] .atp-controls-col,
html[data-theme="dark"] .atp-advanced,
html[data-theme="dark"] .cmp-settings-col,
html[data-theme="dark"] .cmp-preset-card,
html[data-theme="dark"] .cmp-summary-card,
html[data-theme="dark"] .crop-upload-card,
html[data-theme="dark"] .crop-workspace,
html[data-theme="dark"] .crop-controls-col,
html[data-theme="dark"] .crop-preview-panel,
html[data-theme="dark"] .del-upload-card,
html[data-theme="dark"] .del-workspace,
html[data-theme="dark"] .del-controls-col,
html[data-theme="dark"] .del-stats-card,
html[data-theme="dark"] .del-thumb-card,
html[data-theme="dark"] .ext-upload-card,
html[data-theme="dark"] .ext-workspace,
html[data-theme="dark"] .ext-controls-col,
html[data-theme="dark"] .ext-stats-card,
html[data-theme="dark"] .ext-thumb-card,
html[data-theme="dark"] .flt-upload-card,
html[data-theme="dark"] .flt-workspace,
html[data-theme="dark"] .flt-controls-col,
html[data-theme="dark"] .flt-info-card,
html[data-theme="dark"] .flt-stats-card,
html[data-theme="dark"] .iwm-settings-col,
html[data-theme="dark"] .mg-doc-card,
html[data-theme="dark"] .mg-sidebar-col,
html[data-theme="dark"] .mg-summary-card,
html[data-theme="dark"] .org-page-card,
html[data-theme="dark"] .org-sidebar-col,
html[data-theme="dark"] .org-summary-card,
html[data-theme="dark"] .pn-settings-col,
html[data-theme="dark"] .pe-upload-card,
html[data-theme="dark"] .pe-workspace,
html[data-theme="dark"] .pe-props-col,
html[data-theme="dark"] .pe-modal-card,
html[data-theme="dark"] .rs-settings-col,
html[data-theme="dark"] .rs-output-summary,
html[data-theme="dark"] .rpdf-page-card,
html[data-theme="dark"] .rpdf-sidebar-col,
html[data-theme="dark"] .rpdf-summary-card,
html[data-theme="dark"] .rt-settings-col,
html[data-theme="dark"] .rt-summary-card,
html[data-theme="dark"] .scanner-capture-card,
html[data-theme="dark"] .scanner-card,
html[data-theme="dark"] .scanner-controls-col,
html[data-theme="dark"] .sp-page-card,
html[data-theme="dark"] .sp-sidebar-col,
html[data-theme="dark"] .sp-mode-card,
html[data-theme="dark"] .sp-summary-card,
html[data-theme="dark"] .wm-settings-col {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

/* Toolbars, Rails, Stages & Dropzones */
html[data-theme="dark"] .atp-drop-zone,
html[data-theme="dark"] .atp-toolbar,
html[data-theme="dark"] .atp-preview-bar,
html[data-theme="dark"] .atp-layer-item,
html[data-theme="dark"] .atp-empty-selection,
html[data-theme="dark"] .crop-drop-zone,
html[data-theme="dark"] .crop-toolbar,
html[data-theme="dark"] .crop-preview-bar,
html[data-theme="dark"] .del-drop-zone,
html[data-theme="dark"] .del-toolbar,
html[data-theme="dark"] .ext-drop-zone,
html[data-theme="dark"] .ext-toolbar,
html[data-theme="dark"] .flt-drop-zone,
html[data-theme="dark"] .flt-toolbar,
html[data-theme="dark"] .pe-drop-zone,
html[data-theme="dark"] .pe-toolbar,
html[data-theme="dark"] .pe-thumbs-rail,
html[data-theme="dark"] .pe-preview-bar,
html[data-theme="dark"] .pe-layer-item,
html[data-theme="dark"] .pe-doc-notice,
html[data-theme="dark"] .scanner-drop-zone,
html[data-theme="dark"] .scanner-toolbar,
html[data-theme="dark"] .scanner-pdf-preview-bar {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .atp-drop-zone:hover,
html[data-theme="dark"] .atp-drop-zone.is-dragover,
html[data-theme="dark"] .crop-drop-zone:hover,
html[data-theme="dark"] .crop-drop-zone.is-dragover,
html[data-theme="dark"] .del-drop-zone:hover,
html[data-theme="dark"] .del-drop-zone.is-dragover,
html[data-theme="dark"] .ext-drop-zone:hover,
html[data-theme="dark"] .ext-drop-zone.is-dragover,
html[data-theme="dark"] .flt-drop-zone:hover,
html[data-theme="dark"] .flt-drop-zone.is-dragover,
html[data-theme="dark"] .pe-drop-zone:hover,
html[data-theme="dark"] .pe-drop-zone.is-dragover,
html[data-theme="dark"] .scanner-capture-card.dragover {
  background-color: rgba(23, 105, 255, 0.14);
  border-color: #1769FF;
}

html[data-theme="dark"] .atp-preview-col,
html[data-theme="dark"] .crop-preview-col,
html[data-theme="dark"] .del-preview-col,
html[data-theme="dark"] .ext-preview-col,
html[data-theme="dark"] .flt-preview-col,
html[data-theme="dark"] .mg-queue-grid,
html[data-theme="dark"] .org-pages-grid,
html[data-theme="dark"] .pn-stage-wrap,
html[data-theme="dark"] .pe-stage-col,
html[data-theme="dark"] .rpdf-pages-grid,
html[data-theme="dark"] .scanner-canvas-wrap,
html[data-theme="dark"] .scanner-preview-col,
html[data-theme="dark"] .sp-pages-grid,
html[data-theme="dark"] .wm-stage-wrap {
  background-color: #0B1120;
  border-color: #2A3B55;
}

/* Tool Buttons, Chips, Badges & Inputs */
html[data-theme="dark"] .atp-tb-btn,
html[data-theme="dark"] .atp-nav-btn,
html[data-theme="dark"] .atp-chip,
html[data-theme="dark"] .atp-icon-btn,
html[data-theme="dark"] .cmp-tool-btn,
html[data-theme="dark"] .crop-tb-btn,
html[data-theme="dark"] .crop-sec-btn,
html[data-theme="dark"] .crop-chip,
html[data-theme="dark"] .crop-tool-btn,
html[data-theme="dark"] .del-tb-btn,
html[data-theme="dark"] .ext-tb-btn,
html[data-theme="dark"] .flt-tb-btn,
html[data-theme="dark"] .iwm-tool-btn,
html[data-theme="dark"] .iwm-mode-btn,
html[data-theme="dark"] .iwm-toggle-btn,
html[data-theme="dark"] .iwm-preset-btn,
html[data-theme="dark"] .mg-tool-btn,
html[data-theme="dark"] .mg-icon-btn,
html[data-theme="dark"] .mg-replace-btn,
html[data-theme="dark"] .org-tool-btn,
html[data-theme="dark"] .org-mini-btn,
html[data-theme="dark"] .org-action-btn,
html[data-theme="dark"] .pn-tool-btn,
html[data-theme="dark"] .pn-page-btn,
html[data-theme="dark"] .pn-zoom-btn,
html[data-theme="dark"] .pn-pos-btn,
html[data-theme="dark"] .pe-tool-btn,
html[data-theme="dark"] .pe-nav-btn,
html[data-theme="dark"] .pe-icon-btn,
html[data-theme="dark"] .pe-rail-item,
html[data-theme="dark"] .rs-tool-btn,
html[data-theme="dark"] .rs-lock-btn,
html[data-theme="dark"] .rs-chip,
html[data-theme="dark"] .rpdf-tool-btn,
html[data-theme="dark"] .rpdf-mini-btn,
html[data-theme="dark"] .rpdf-action-btn,
html[data-theme="dark"] .rt-tool-btn,
html[data-theme="dark"] .rt-action-btn,
html[data-theme="dark"] .scanner-chip-btn,
html[data-theme="dark"] .sp-tool-btn,
html[data-theme="dark"] .wm-tool-btn,
html[data-theme="dark"] .wm-mode-btn,
html[data-theme="dark"] .wm-page-btn,
html[data-theme="dark"] .wm-zoom-btn,
html[data-theme="dark"] .wm-mini-chip,
html[data-theme="dark"] .wm-preset-btn,
html[data-theme="dark"] .wm-scope-btn,
html[data-theme="dark"] .wm-thumb-chip {
  background-color: #1B2B43;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .atp-tb-btn:hover:not(:disabled),
html[data-theme="dark"] .atp-nav-btn:hover,
html[data-theme="dark"] .cmp-tool-btn:hover,
html[data-theme="dark"] .crop-tb-btn:hover:not(:disabled),
html[data-theme="dark"] .crop-sec-btn:hover,
html[data-theme="dark"] .crop-chip:hover,
html[data-theme="dark"] .crop-tool-btn:hover,
html[data-theme="dark"] .del-tb-btn:hover,
html[data-theme="dark"] .ext-tb-btn:hover,
html[data-theme="dark"] .flt-tb-btn:hover,
html[data-theme="dark"] .mg-tool-btn:hover,
html[data-theme="dark"] .org-tool-btn:hover:not(:disabled),
html[data-theme="dark"] .rpdf-tool-btn:hover,
html[data-theme="dark"] .rpdf-action-btn:hover:not(:disabled),
html[data-theme="dark"] .rt-tool-btn:hover,
html[data-theme="dark"] .rt-action-btn:hover,
html[data-theme="dark"] .scanner-chip-btn:hover,
html[data-theme="dark"] .sp-tool-btn:hover,
html[data-theme="dark"] .wm-tool-btn:hover:not(:disabled),
html[data-theme="dark"] .wm-mode-btn:hover,
html[data-theme="dark"] .wm-page-btn:hover:not(:disabled),
html[data-theme="dark"] .wm-zoom-btn:hover {
  background-color: #243958;
  border-color: #3B5070;
}

html[data-theme="dark"] .atp-icon-btn.is-active,
html[data-theme="dark"] .cmp-preset-card.is-active,
html[data-theme="dark"] .ext-thumb-card.is-selected,
html[data-theme="dark"] .org-page-card.is-selected,
html[data-theme="dark"] .pe-tool-btn.is-active,
html[data-theme="dark"] .pe-rail-item.is-active,
html[data-theme="dark"] .rs-lock-btn.is-locked,
html[data-theme="dark"] .rpdf-page-card.is-selected,
html[data-theme="dark"] .sp-page-card.is-selected,
html[data-theme="dark"] .sp-mode-card.is-active {
  border-color: #1769FF;
  background-color: rgba(23, 105, 255, 0.18);
  color: #FFFFFF;
}

html[data-theme="dark"] .atp-textarea,
html[data-theme="dark"] .atp-select,
html[data-theme="dark"] .atp-input,
html[data-theme="dark"] .atp-color-input,
html[data-theme="dark"] .crop-select,
html[data-theme="dark"] .crop-input,
html[data-theme="dark"] .del-input,
html[data-theme="dark"] .ext-input,
html[data-theme="dark"] .iwm-input,
html[data-theme="dark"] .mg-input,
html[data-theme="dark"] .pn-input,
html[data-theme="dark"] .pn-select,
html[data-theme="dark"] .pe-textarea,
html[data-theme="dark"] .pe-select,
html[data-theme="dark"] .pe-input,
html[data-theme="dark"] .pe-color-input,
html[data-theme="dark"] .rs-input,
html[data-theme="dark"] .sp-input,
html[data-theme="dark"] .wm-input,
html[data-theme="dark"] .wm-select {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .atp-file-badge,
html[data-theme="dark"] .atp-val-badge,
html[data-theme="dark"] .atp-layer-page,
html[data-theme="dark"] .cmp-meta-pill,
html[data-theme="dark"] .crop-file-badge,
html[data-theme="dark"] .crop-dim-badge,
html[data-theme="dark"] .crop-dims-badge,
html[data-theme="dark"] .del-file-badge,
html[data-theme="dark"] .ext-file-badge,
html[data-theme="dark"] .flt-file-badge,
html[data-theme="dark"] .iwm-meta-pill,
html[data-theme="dark"] .mg-meta-pill,
html[data-theme="dark"] .pn-meta-pill,
html[data-theme="dark"] .pe-file-badge,
html[data-theme="dark"] .pe-layer-page,
html[data-theme="dark"] .rs-meta-pill,
html[data-theme="dark"] .rpdf-meta-pill,
html[data-theme="dark"] .rpdf-deg-badge,
html[data-theme="dark"] .rt-meta-pill,
html[data-theme="dark"] .sp-meta-pill {
  background-color: #1B2B43;
  border-color: #2A3B55;
  color: #CBD5E1;
}

html[data-theme="dark"] .atp-upload-title,
html[data-theme="dark"] .atp-doc-name,
html[data-theme="dark"] .atp-label,
html[data-theme="dark"] .cmp-preset-card strong,
html[data-theme="dark"] .cmp-summary-row strong,
html[data-theme="dark"] .crop-upload-title,
html[data-theme="dark"] .crop-doc-name,
html[data-theme="dark"] .crop-label,
html[data-theme="dark"] .crop-preview-title,
html[data-theme="dark"] .del-upload-title,
html[data-theme="dark"] .del-doc-name,
html[data-theme="dark"] .del-label,
html[data-theme="dark"] .del-stat-row strong,
html[data-theme="dark"] .ext-upload-title,
html[data-theme="dark"] .ext-doc-name,
html[data-theme="dark"] .ext-label,
html[data-theme="dark"] .ext-stat-row strong,
html[data-theme="dark"] .flt-upload-title,
html[data-theme="dark"] .flt-doc-name,
html[data-theme="dark"] .flt-card-title,
html[data-theme="dark"] .flt-stat-row strong,
html[data-theme="dark"] .mg-doc-name,
html[data-theme="dark"] .mg-summary-row strong,
html[data-theme="dark"] .org-summary-row strong,
html[data-theme="dark"] .pe-upload-title,
html[data-theme="dark"] .pe-doc-name,
html[data-theme="dark"] .pe-modal-head h3,
html[data-theme="dark"] .rs-summary-row strong,
html[data-theme="dark"] .rpdf-summary-row strong,
html[data-theme="dark"] .rt-summary-row strong,
html[data-theme="dark"] .sp-mode-card strong,
html[data-theme="dark"] .sp-summary-row strong {
  color: #F1F5F9;
}

html[data-theme="dark"] .atp-upload-sub,
html[data-theme="dark"] .atp-doc-meta,
html[data-theme="dark"] .atp-preview-hint,
html[data-theme="dark"] .cmp-preset-card span,
html[data-theme="dark"] .cmp-hint,
html[data-theme="dark"] .crop-upload-sub,
html[data-theme="dark"] .crop-doc-meta,
html[data-theme="dark"] .crop-note,
html[data-theme="dark"] .del-upload-sub,
html[data-theme="dark"] .del-doc-meta,
html[data-theme="dark"] .del-note,
html[data-theme="dark"] .ext-upload-sub,
html[data-theme="dark"] .ext-doc-meta,
html[data-theme="dark"] .ext-note,
html[data-theme="dark"] .flt-upload-sub,
html[data-theme="dark"] .flt-doc-meta,
html[data-theme="dark"] .flt-card-desc,
html[data-theme="dark"] .mg-doc-meta,
html[data-theme="dark"] .mg-hint,
html[data-theme="dark"] .org-hint,
html[data-theme="dark"] .rs-fit-hint,
html[data-theme="dark"] .rs-output-note,
html[data-theme="dark"] .rt-output-note,
html[data-theme="dark"] .sp-mode-card span {
  color: #A9B7CA;
}

/* 10. Preserve Document & Image Preview Fidelity (NO dark filters on user content) */
html[data-theme="dark"] .pe-page-frame,
html[data-theme="dark"] .pe-sig-canvas,
html[data-theme="dark"] .atp-page-frame,
html[data-theme="dark"] .crop-page-frame,
html[data-theme="dark"] .flt-page-frame,
html[data-theme="dark"] .pn-page-sheet,
html[data-theme="dark"] .wm-page-sheet,
html[data-theme="dark"] .del-thumb-canvas,
html[data-theme="dark"] .ext-thumb-canvas,
html[data-theme="dark"] .org-thumb-box,
html[data-theme="dark"] .rpdf-thumb-box,
html[data-theme="dark"] .sp-page-thumb,
html[data-theme="dark"] .mg-thumb-frame {
  background-color: #FFFFFF;
  border-color: #3B5070;
}

html[data-theme="dark"] canvas,
html[data-theme="dark"] #pe-pdf-canvas,
html[data-theme="dark"] #scanner-canvas,
html[data-theme="dark"] .pdf-page-canvas,
html[data-theme="dark"] .preview-image,
html[data-theme="dark"] .crop-preview-img {
  filter: none;
}

/* 11. Modals, Notifications & Footer */
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .notice-box {
  background-color: #162238;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .site-footer {
  background-color: #080E1A;
  border-top-color: #2A3B55;
  color: #A9B7CA;
}

html[data-theme="dark"] .footer-heading,
html[data-theme="dark"] .footer-brand-name,
html[data-theme="dark"] .footer-brand-title,
html[data-theme="dark"] .footer-col-title {
  color: #F1F5F9;
}

html[data-theme="dark"] .footer-link,
html[data-theme="dark"] .footer-desc,
html[data-theme="dark"] .footer-bottom {
  color: #A9B7CA;
}

html[data-theme="dark"] .footer-link:hover {
  color: #F1F5F9;
}

html[data-theme="dark"] .footer-lang-select {
  background-color: #111B2E;
  border-color: #2A3B55;
  color: #F1F5F9;
}

html[data-theme="dark"] .footer-bottom {
  border-top-color: #2A3B55;
}
