/* ==========================================================================
   TulBD State-of-the-Art To-PDF Converter Styles
   Pure Vanilla CSS, Responsive, Glassmorphic & Modern Theme
   ========================================================================== */

.topdf-conv-card {
    background: var(--tb-card, #ffffff);
    border: 1px solid var(--tb-border, #e2e8f0);
    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;
    font-family: inherit;
    box-sizing: border-box;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.topdf-conv-card:hover {
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.09), 0 6px 16px -3px rgba(0, 0, 0, 0.04);
}

/* Header */
.topdf-conv-header {
    margin-bottom: 24px;
}

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

.topdf-conv-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 10px rgba(239, 68, 68, 0.2));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.topdf-conv-card:hover .topdf-conv-icon-box {
    transform: scale(1.06) rotate(-2deg);
}

.topdf-conv-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--tb-text, #0f172a);
    margin: 0;
    line-height: 1.3;
}

.topdf-conv-lead {
    font-size: 0.98rem;
    color: var(--tb-muted, #64748b);
    max-width: 760px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

/* Badges */
.topdf-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.topdf-badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease;
}

.topdf-badge:hover {
    transform: translateY(-1px);
}

.topdf-badge-secure {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.topdf-badge-speed {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.topdf-badge-limit {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
}

/* Quick Format Switcher Pills - Matching Image 3 Style */
.topdf-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));
}

.topdf-format-pill {
    display: inline-flex;
    align-items: center;
    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;
    white-space: nowrap;
}

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

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

/* Format Notice */
.topdf-conv-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 22px;
    color: #92400e;
    font-size: 0.88rem;
    line-height: 1.5;
}

.topdf-notice-title {
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

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

.topdf-dropzone:hover, .topdf-dropzone.dragover, .topdf-dropzone:focus-visible {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

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

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

.topdf-dropzone-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.topdf-dropzone-sub {
    font-size: 0.84rem;
    color: #64748b;
    margin-bottom: 16px;
}

.topdf-dropzone-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    transition: all 0.2s ease;
}

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

/* Live Editor Section */
.topdf-editor-section {
    margin-top: 24px;
}

.topdf-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.topdf-editor-toolbar-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
}

.topdf-editor-toolbar-actions {
    display: flex;
    gap: 6px;
}

.topdf-editor-toolbar-actions button {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topdf-editor-toolbar-actions button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.topdf-editor-textarea {
    width: 100%;
    height: 240px;
    padding: 14px;
    border: 1px solid #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #0f172a;
    background: #ffffff;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topdf-editor-textarea:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.topdf-editor-stats-bar {
    display: flex;
    gap: 16px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
}

/* Multi-Image Gallery & Cards */
.topdf-images-wrap {
    margin-top: 24px;
}

.topdf-images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.topdf-images-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.topdf-gallery-actions {
    display: flex;
    gap: 8px;
}

.topdf-gallery-actions button {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topdf-btn-add-more {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.topdf-btn-add-more:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.topdf-btn-clear-all {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.topdf-btn-clear-all:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.topdf-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
    max-height: 420px;
    overflow-y: auto;
    padding: 4px;
}

.topdf-img-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.topdf-img-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.topdf-img-card.dragging {
    opacity: 0.4;
    transform: scale(0.94);
    border: 2px dashed #ef4444;
}

.topdf-img-card-preview-wrap {
    width: 100%;
    height: 120px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.topdf-img-card-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.topdf-img-card-num {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.topdf-img-card-del {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.15s, transform 0.15s;
}

.topdf-img-card-del:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.topdf-img-card-footer {
    padding: 8px 10px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topdf-img-card-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.topdf-img-card-btns {
    display: flex;
    gap: 4px;
}

.topdf-card-mini-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.7rem;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}

.topdf-card-mini-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.topdf-drag-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin: 4px 0 16px;
    text-align: center;
}

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

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

.topdf-setting-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topdf-setting-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 6px;
}

.topdf-controls-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.topdf-control-group {
    flex: 1;
    min-width: 120px;
}

.topdf-control-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.topdf-control-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.85rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.topdf-control-group select:focus {
    border-color: #ef4444;
}

/* Actions Bar */
.topdf-actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--tb-border, #f1f5f9);
}

.topdf-btn-generate {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 13px 32px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.topdf-btn-download {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 13px 32px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
    animation: topdf-pulse 2s infinite;
    transition: all 0.2s ease;
}

.topdf-btn-download:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
    transform: translateY(-2px);
}

@keyframes topdf-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35); }
    50% { box-shadow: 0 6px 24px rgba(5, 150, 105, 0.6); }
}

.topdf-btn-reset {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topdf-btn-reset:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.topdf-status-msg {
    width: 100%;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: #059669;
    margin: 8px 0 0;
    min-height: 20px;
}

/* Progress Bar */
.topdf-status-box {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.topdf-progress-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.topdf-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    transition: width 0.3s ease;
}

.topdf-status-text {
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
}

/* Live Preview Frame with HTML5 Canvas & Fallback */
.topdf-preview-frame-wrap {
    margin-top: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.topdf-frame-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
    background: #1e293b;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    border-bottom: 1px solid #334155;
}

.topdf-frame-head-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topdf-frame-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topdf-preview-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #475569;
    font-size: 0.8rem;
}

.topdf-nav-btn {
    background: #334155;
    border: none;
    color: #f8fafc;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1.2;
    transition: background 0.15s;
}

.topdf-nav-btn:hover:not(:disabled) {
    background: #475569;
}

.topdf-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.topdf-nav-page-display {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 0 4px;
    min-width: 44px;
    text-align: center;
}

.topdf-open-newtab {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.topdf-open-newtab:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.topdf-preview-body-container {
    width: 100%;
    background: #334155;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.topdf-canvas-scroll-wrap {
    width: 100%;
    max-height: 620px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.topdf-preview-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    background: #ffffff;
    margin: 0 auto;
}

.topdf-preview-iframe {
    width: 100%;
    height: 520px;
    border: none;
    display: block;
    background: #334155;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .topdf-conv-card {
        padding: 20px 14px;
    }
    .topdf-conv-header h2 {
        font-size: 1.3rem;
    }
    .topdf-dropzone {
        padding: 30px 14px;
    }
    .topdf-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    .topdf-preview-frame-wrap {
        border-radius: 10px;
        margin-top: 20px;
    }
    .topdf-frame-head {
        padding: 8px 12px;
        font-size: 0.82rem;
    }
    .topdf-canvas-scroll-wrap {
        max-height: 460px;
        padding: 10px 6px;
    }
    .topdf-preview-canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    .topdf-preview-iframe {
        height: 380px;
    }
}

/* ==========================================================================
   Full Dark Mode / Night Mode Engine for To-PDF Converter
   ========================================================================== */
[data-theme="dark"] .topdf-conv-card,
body.dark-theme .topdf-conv-card,
.dark-theme .topdf-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"] .topdf-conv-header h2,
body.dark-theme .topdf-conv-header h2,
.dark-theme .topdf-conv-header h2 {
    color: #f8fafc !important;
}

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

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

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

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

[data-theme="dark"] .topdf-format-pill.active,
body.dark-theme .topdf-format-pill.active,
.dark-theme .topdf-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"] .topdf-dropzone,
body.dark-theme .topdf-dropzone,
.dark-theme .topdf-dropzone {
    border-color: #ef4444 !important;
    background: rgba(30, 41, 59, 0.5) !important;
}

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

[data-theme="dark"] .topdf-dropzone-icon,
body.dark-theme .topdf-dropzone-icon,
.dark-theme .topdf-dropzone-icon {
    background: #1e293b !important;
    color: #f87171 !important;
}

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

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

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

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

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

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

[data-theme="dark"] .topdf-editor-textarea,
body.dark-theme .topdf-editor-textarea,
.dark-theme .topdf-editor-textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

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

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

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

