/* ========================================================
 * FREEPDFCONVERT - MASTER CSS STYLESHEET
 * ======================================================== */

/* --- 1. Variables & Themes --- */
:root {
    --stability-blue: #1E40AF;
    --stability-blue-light: #3b82f6;
    --trust-teal: #0D9488;
    --trust-teal-dark: #115e59;
    --action-orange: #F97316;
    --action-orange-hover: #ea580c;
    --bg-slate: #0b0f19;
    --panel-bg: rgba(17, 24, 39, 0.7);
    --panel-border: rgba(59, 130, 246, 0.15);
    --panel-border-hover: rgba(13, 148, 136, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-dark: #0f172a;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --organic-radius: 24px;
    --standard-radius: 12px;
    --transition-snappy: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-subtle: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(59, 130, 246, 0.1);
    --shadow-glow: 0 0 25px -5px rgba(13, 148, 136, 0.35);
}

body.theme-light {
    --bg-slate: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --panel-border: rgba(15, 23, 42, 0.08);
    --panel-border-hover: rgba(30, 64, 175, 0.2);
}
body.theme-light .workspace-panel, body.theme-light .tool-card, body.theme-light .info-widget, body.theme-light .metadata-inspector-panel, body.theme-light .system-telemetry-widget, body.theme-light .thumbnail-card, body.theme-light .visual-sorter-container { background: #ffffff; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03); }
body.theme-light .safety-banner { background: #e2e8f0; border-color: rgba(15, 23, 42, 0.05); }
body.theme-light .brand-title { background: linear-gradient(135deg, #1e3a8a 30%, #0d9488 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

body.theme-contrast {
    --bg-slate: #000000;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --panel-bg: #000000;
    --panel-border: #ffffff;
    --panel-border-hover: var(--action-orange);
    --trust-teal: #22d3ee;
    --action-orange: #ff3f00;
}
body.theme-contrast * { text-shadow: none !important; box-shadow: none !important; }
body.theme-contrast .dropzone-area { border-color: #ffffff; }

/* --- 2. Base Normalization --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body.app-background {
    background-color: var(--bg-slate);
    background-image: radial-gradient(circle at 10% 20%, rgba(30, 64, 175, 0.15) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(13, 148, 136, 0.15) 0%, transparent 40%);
    font-family: var(--font-stack); color: var(--text-primary); min-height: 100vh;
    display: flex; flex-direction: column; overflow-x: hidden; position: relative;
}
body.app-background::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; filter: url(#noiseFilter); pointer-events: none; z-index: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
[tabindex="0"]:focus, button:focus, input:focus, select:focus, label:focus-within { outline: 2px solid var(--action-orange); outline-offset: 4px; }

/* --- 3. Header & Safety Banner --- */
.accessibility-menu { background: #090d16; border-bottom: 1px solid rgba(255, 255, 255, 0.03); padding: 0.35rem 1.5rem; display: flex; justify-content: flex-end; position: relative; z-index: 100; }
.select-input-sm { background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: var(--text-secondary); font-size: 0.75rem; padding: 0.2rem 0.5rem; outline: none; cursor: pointer; }
.select-input-sm:focus { border-color: var(--trust-teal); color: var(--text-primary); }
.safety-banner { position: relative; z-index: 10; background: linear-gradient(90deg, #111827, #1e293b); border-bottom: 1px solid var(--panel-border); padding: 0.75rem 1.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.banner-content { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 0.75rem; }
.icon-secure { width: 18px; height: 18px; color: var(--trust-teal); flex-shrink: 0; }
.banner-content strong { color: var(--text-primary); }

/* --- 4. Main Workspace & Hero --- */
.workspace { position: relative; z-index: 2; max-width: 1400px; width: 100%; margin: 0 auto; padding: 3rem 1.5rem; flex: 1; }
.hero-container { text-align: center; margin-bottom: 4rem; }
.brand-title { font-size: 3rem; font-weight: 800; letter-spacing: -0.05em; background: linear-gradient(135deg, var(--text-primary) 30%, var(--trust-teal) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; }
.brand-tagline { font-size: 1.125rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 2.5rem auto; line-height: 1.6; }
.workspace-panel { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--organic-radius); padding: 2rem; backdrop-filter: blur(16px); box-shadow: var(--shadow-elevated); max-width: 800px; margin: 0 auto; transition: var(--transition-slow); }
.workspace-panel:hover { border-color: var(--panel-border-hover); }

/* --- 5. Dropzone UI --- */
.dropzone-area { border: 2px dashed rgba(59, 130, 246, 0.3); border-radius: 16px; padding: 3.5rem 2rem; cursor: pointer; position: relative; overflow: hidden; transition: var(--transition-snappy); outline: none; }
.dropzone-area:hover, .dropzone-area.drag-over { border-color: var(--trust-teal); background: rgba(13, 148, 136, 0.03); }
.hidden-file-input { display: none; }
.dropzone-visual { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; }
.icon-upload { width: 48px; height: 48px; color: var(--trust-teal); margin-bottom: 1.5rem; transition: var(--transition-snappy); }
.dropzone-area:hover .icon-upload { transform: translateY(-4px); color: var(--stability-blue-light); }
.dropzone-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.dropzone-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

/* --- 6. Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-stack); font-weight: 600; font-size: 0.95rem; padding: 0.75rem 1.75rem; border-radius: var(--standard-radius); cursor: pointer; border: none; transition: var(--transition-snappy); text-decoration: none; }
.btn-orange { background: var(--action-orange); color: var(--text-primary); box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4); }
.btn-orange:hover { background: var(--action-orange-hover); transform: translateY(-1px); }
.btn-lg { font-size: 1.05rem; padding: 0.95rem 2.5rem; border-radius: 14px; }
.btn-secondary { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-primary); border-radius: 8px; padding: 0.4rem 0.85rem; font-size: 0.8rem; cursor: pointer; font-weight: 500; transition: var(--transition-snappy); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.btn-sm { font-size: 0.75rem; padding: 0.35rem 0.75rem; }
.btn-text { background: transparent; color: var(--text-secondary); border: none; font-size: 0.875rem; cursor: pointer; transition: var(--transition-snappy); padding: 0.5rem; }
.btn-text:hover { color: var(--text-primary); }

/* --- 7. Config & Form Layouts --- */
.config-container { animation: fadeIn 0.3s ease-out; }
.config-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.config-title { font-size: 1.25rem; font-weight: 700; }
.tool-options-panel { margin-bottom: 2rem; animation: fadeIn 0.3s ease-out; }
.options-fieldset { border: none; }
.options-legend { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 1rem; }
.radio-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.radio-card { display: block; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--standard-radius); padding: 1rem 1.25rem; cursor: pointer; transition: var(--transition-snappy); position: relative; }
.radio-card input[type="radio"] { position: absolute; right: 1.25rem; top: 1.25rem; accent-color: var(--trust-teal); }
.radio-card:hover { border-color: var(--stability-blue-light); background: rgba(59, 130, 246, 0.02); }
.radio-card.active { border-color: var(--trust-teal); background: rgba(13, 148, 136, 0.05); }
.radio-label-title { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; }
.radio-label-desc { display: block; font-size: 0.85rem; color: var(--text-secondary); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }
.select-input, .text-input { background: #111827; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 0.75rem 1rem; color: var(--text-primary); font-family: var(--font-stack); font-size: 0.95rem; width: 100%; }
.select-input:focus, .text-input:focus { border-color: var(--trust-teal); outline: none; }

/* --- 8. File List Previews --- */
.file-list-preview { max-height: 180px; overflow-y: auto; background: rgba(0, 0, 0, 0.2); border-radius: var(--standard-radius); padding: 0.75rem; margin-bottom: 1.5rem; }
.preview-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.75rem; border-radius: 6px; background: rgba(255, 255, 255, 0.02); margin-bottom: 0.5rem; }
.preview-item:last-child { margin-bottom: 0; }
.preview-item-info { font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.preview-item-size { font-size: 0.75rem; color: var(--text-secondary); }

/* --- 9. Processing & Progress State --- */
.processing-container { display: flex; flex-direction: column; align-items: center; padding: 3rem 1rem; text-align: center; }
.spinner-wrapper { margin-bottom: 2rem; }
.svg-spinner { width: 60px; height: 60px; animation: rotate-spinner 2s linear infinite; }
.svg-spinner .path { stroke: var(--action-orange); stroke-linecap: round; animation: dash-spinner 1.5s ease-in-out infinite; }
.progress-track { width: 100%; max-width: 400px; height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; margin: 1.5rem 0 0.5rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--stability-blue) 0%, var(--trust-teal) 100%); width: 0%; transition: width 0.1s linear; }
.progress-label { font-size: 0.875rem; font-weight: 700; color: var(--trust-teal); }

/* --- 10. Success UI --- */
.success-container { text-align: center; padding: 2.5rem 1rem; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.success-illustration { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.checkmark-ring { width: 72px; height: 72px; border-radius: 50%; background: rgba(13, 148, 136, 0.1); border: 3px solid var(--trust-teal); display: flex; align-items: center; justify-content: center; color: var(--trust-teal); animation: pulseGlow 2s infinite; }
.icon-checkmark { width: 36px; height: 36px; }
.success-metrics { font-size: 1.25rem; color: var(--trust-teal); font-weight: 700; margin: 0.5rem 0 1.5rem 0; }
.success-meta-card { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--standard-radius); padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; max-width: 450px; margin: 0 auto 2.5rem auto; font-size: 0.875rem; }
.success-meta-card span:first-child { font-weight: 600; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.success-actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

/* --- 11. Grid System & Tool Cards --- */
.grid-system { display: grid; grid-template-columns: repeat(16, 1fr); gap: 1.5rem; margin-top: 5rem; }
.col-span-primary, .col-span-advanced, .col-span-secondary { grid-column: span 16; }
.section-column-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); margin-bottom: 1.5rem; border-left: 3px solid var(--trust-teal); padding-left: 0.75rem; }

.tool-card { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--organic-radius); padding: 1.5rem; display: flex; gap: 1.25rem; cursor: pointer; transition: var(--transition-slow); user-select: none; outline: none; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.tool-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(13, 148, 136, 0.04) 100%); opacity: 0; transition: var(--transition-snappy); z-index: 1; }
.tool-card:hover::after { opacity: 1; }
.tool-card:hover, .tool-card.active { border-color: var(--panel-border-hover); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.card-icon-wrapper { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-primary); position: relative; z-index: 2; }
.blue-gradient { background: linear-gradient(135deg, var(--stability-blue), var(--stability-blue-light)); }
.teal-gradient { background: linear-gradient(135deg, var(--trust-teal), #06b6d4); }
.dark-gradient { background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid rgba(255, 255, 255, 0.05); }
.card-icon { width: 24px; height: 24px; }
.card-details { position: relative; z-index: 2; }
.card-details h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.35rem; }
.card-details p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
.tool-badge { display: inline-block; background: rgba(249, 115, 22, 0.15); color: var(--action-orange); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 99px; margin-bottom: 0.5rem; }

.info-widget { background: rgba(255, 255, 255, 0.01); border: 1px solid rgba(255, 255, 255, 0.04); border-radius: var(--organic-radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.info-widget h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }
.info-widget p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.info-link { font-size: 0.85rem; color: var(--trust-teal); text-decoration: none; font-weight: 600; transition: var(--transition-snappy); }
.info-link:hover { color: var(--stability-blue-light); }
.resource-list { list-style: none; }
.resource-list li { margin-bottom: 0.75rem; }
.resource-list a { font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; transition: var(--transition-snappy); display: block; }
.resource-list a:hover { color: var(--trust-teal); transform: translateX(2px); }

/* --- 12. Modal Overlays (Errors / Alerts) --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 9999; animation: fadeIn 0.2s ease-out; }
.modal-window { background: #1e293b; border: 1px solid var(--panel-border-hover); border-radius: var(--organic-radius); padding: 2rem; max-width: 450px; width: 90%; box-shadow: var(--shadow-elevated); transform: scale(1); animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.icon-alert { width: 28px; height: 28px; color: #ef4444; }
.dialog-title { font-size: 1.2rem; font-weight: 700; }
.dialog-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; }

/* --- 13. Telemetry Console (Diagnostic Logs) --- */
.telemetry-panel { background: #020617; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 1.25rem; margin-top: 2rem; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8); font-family: 'Courier New', Courier, monospace; }
.telemetry-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 0.75rem; margin-bottom: 0.75rem; }
.telemetry-status-dot-wrapper { display: flex; align-items: center; gap: 0.5rem; }
.status-dot { width: 8px; height: 8px; background-color: var(--trust-teal); border-radius: 50%; }
.status-dot.pulsing { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.7); animation: statusPulse 1.8s infinite; }
.telemetry-title { font-size: 0.78rem; color: var(--text-secondary); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.btn-console-clear { background: transparent; border: none; color: var(--text-secondary); font-size: 0.72rem; font-family: var(--font-stack); cursor: pointer; font-weight: 600; transition: var(--transition-snappy); }
.btn-console-clear:hover { color: #ef4444; }
.telemetry-console { max-height: 140px; overflow-y: auto; font-size: 0.78rem; line-height: 1.6; display: flex; flex-direction: column; gap: 0.35rem; padding-right: 0.5rem; }
.console-line { color: #cbd5e1; word-break: break-all; }
.system-line { color: #3b82f6; }
.process-line { color: var(--trust-teal); }
.warn-line { color: var(--action-orange); }
.error-line { color: #ef4444; }

/* --- 14. Split Pages Custom Range Slider --- */
.split-slider-container { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--standard-radius); padding: 1.5rem; }
.split-numerical-display { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.split-display-box { background: #0f172a; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 0.75rem 1.5rem; text-align: center; min-width: 100px; }
.split-display-box .box-label { display: block; font-size: 0.72rem; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.split-display-box .box-num { font-size: 1.5rem; font-weight: 800; color: var(--trust-teal); }
.split-range-connector { font-size: 0.9rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }
.slider-range-widget { position: relative; height: 10px; width: 100%; margin-bottom: 2rem; }
.slider-track-visual { position: absolute; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 999px; width: 100%; top: 50%; transform: translateY(-50%); z-index: 1; }
.split-range-input { position: absolute; width: 100%; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 6px; top: 50%; transform: translateY(-50%); z-index: 2; outline: none; }
.split-range-input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--action-orange); cursor: pointer; border: 2px solid var(--text-primary); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.1s ease; }
.split-range-input::-webkit-slider-thumb:hover { transform: scale(1.15); background: var(--action-orange-hover); }
.split-range-input::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--action-orange); cursor: pointer; border: 2px solid var(--text-primary); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.slider-helper-info { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; text-align: center; }

/* --- 15. Waterfall Extraction Visualizer --- */
.extraction-visualizer { width: 100%; max-width: 500px; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--standard-radius); padding: 1rem; margin-top: 1.5rem; }
.visualizer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; font-size: 0.8rem; font-weight: 700; }
.visualizer-label { color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.visualizer-count { color: var(--trust-teal); }
.extraction-board-viewport { max-height: 180px; overflow-y: auto; background: rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 0.5rem; }
.extraction-board-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.extraction-asset-card { height: 70px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2) forwards; }
.extraction-asset-card img { max-width: 100%; max-height: 100%; object-fit: cover; }
.extraction-badge { position: absolute; bottom: 2px; right: 2px; background: rgba(0, 0, 0, 0.7); color: var(--text-primary); font-size: 0.55rem; font-weight: 700; padding: 0.05rem 0.25rem; border-radius: 4px; }

/* --- 16. Web Worker Pulse Indicator --- */
.worker-pulse-indicator { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--trust-teal); font-weight: 600; }
.worker-pulse-indicator::before { content: ""; width: 6px; height: 6px; background-color: var(--trust-teal); border-radius: 50%; display: inline-block; animation: pulseWorker 1s infinite alternate; }

/* --- 17. Live Hardware Telemetry Widget --- */
.system-telemetry-widget { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.telemetry-stat-card { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 14px; padding: 0.75rem; text-align: center; transition: var(--transition-snappy); }
.telemetry-stat-card:hover { border-color: rgba(13, 148, 136, 0.2); background: rgba(13, 148, 136, 0.01); }
.telemetry-stat-title { display: block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.telemetry-stat-value { display: block; font-size: 1.15rem; font-weight: 800; color: var(--trust-teal); line-height: 1.2; }
.telemetry-stat-sub { display: block; font-size: 0.6rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* --- 18. Thumbnail Sorter UI & Layout Switcher --- */
.visual-sorter-container { background: rgba(0, 0, 0, 0.15); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--standard-radius); padding: 1.25rem; margin: 1.5rem 0; }
.sorter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.sorter-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.sorter-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.15rem; }

.thumbnail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 1rem; max-height: 280px; overflow-y: auto; padding: 0.5rem; background: rgba(0, 0, 0, 0.25); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.03); outline: none; }
.thumbnail-card { background: #1e293b; border: 2px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 0.5rem; position: relative; display: flex; flex-direction: column; align-items: center; cursor: grab; user-select: none; transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease; }
.thumbnail-card:active { cursor: grabbing; }
.thumbnail-card.dragging { opacity: 0.5; transform: scale(0.9); border-color: var(--stability-blue-light); }
.thumbnail-card.selected-keyboard { border-color: var(--action-orange); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3); }

.thumb-preview-box { width: 100%; height: 90px; background: rgba(0, 0, 0, 0.3); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.thumb-image { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.3s ease; }
.thumb-doc-icon { width: 32px; height: 32px; color: var(--trust-teal); }

.thumb-index { position: absolute; top: 4px; left: 4px; background: rgba(15, 23, 42, 0.85); color: var(--text-primary); font-size: 0.7rem; font-weight: 700; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.1); }
.thumb-delete-btn { position: absolute; top: 4px; right: 4px; background: rgba(239, 68, 68, 0.9); color: var(--text-primary); border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s ease; }
.thumbnail-card:hover .thumb-delete-btn { opacity: 1; }
.thumb-title { font-size: 0.72rem; font-weight: 500; color: var(--text-secondary); margin-top: 0.5rem; width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sorter-controls { display: flex; gap: 0.75rem; margin-top: 0.75rem; justify-content: flex-end; }

/* Grid vs List Toggles */
.view-controls { display: flex; gap: 0.35rem; background: rgba(0, 0, 0, 0.3); padding: 0.2rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); align-self: flex-end; }
.btn-layout-toggle { background: transparent; border: none; padding: 0.35rem; border-radius: 6px; color: var(--text-secondary); cursor: pointer; transition: var(--transition-snappy); display: flex; align-items: center; justify-content: center; }
.btn-layout-toggle:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.03); }
.btn-layout-toggle.active { color: var(--trust-teal); background: rgba(13, 148, 136, 0.15); }
.icon-toggle { width: 16px; height: 16px; }

/* List View Modifier Classes */
.thumbnail-grid.layout-list { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.75rem; }
.thumbnail-grid.layout-list .thumbnail-card { flex-direction: row; height: 48px; padding: 0.25rem 0.75rem; border-radius: 8px; align-items: center; gap: 1rem; justify-content: space-between; }
.thumbnail-grid.layout-list .thumb-preview-box { width: 40px; height: 32px; }
.thumbnail-grid.layout-list .thumb-title { margin-top: 0; text-align: left; font-size: 0.85rem; width: auto; flex: 1; margin-left: 0.5rem; }
.thumbnail-grid.layout-list .thumb-delete-btn { position: static; opacity: 1; order: 3; }
.thumbnail-grid.layout-list .thumb-index { position: static; order: -1; }

/* --- 19. Canvas Workshop Modal --- */
.workshop-window { max-width: 600px; width: 95%; }
.canvas-viewport { width: 100%; height: 260px; background: #020617; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 1.5rem; border: 1px solid rgba(255, 255, 255, 0.05); }
.workshop-canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
.workshop-control-panel { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.control-row { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.control-label { font-size: 0.85rem; color: var(--text-secondary); min-width: 80px; }
.workshop-slider { flex: 1; height: 4px; background: rgba(255, 255, 255, 0.1); border-radius: 99px; outline: none; -webkit-appearance: none; appearance: none; }
.workshop-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--trust-teal); cursor: pointer; }
.control-actions-row { display: flex; gap: 0.5rem; justify-content: flex-start; }

/* --- 20. PDF Metadata Inspector --- */
.metadata-inspector-panel { background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--standard-radius); padding: 1.25rem; margin-bottom: 1.5rem; animation: fadeIn 0.3s ease-out; }
.inspector-header { display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 0.5rem; margin-bottom: 0.75rem; }
.icon-inspector { width: 18px; height: 18px; color: var(--trust-teal); }
.inspector-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-primary); }
.metadata-fields { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.8rem; margin-bottom: 1rem; }
.metadata-fields li { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255, 255, 255, 0.04); padding-bottom: 0.25rem; }
.meta-label { color: var(--text-secondary); font-weight: 500; }
.meta-value { color: var(--text-primary); font-weight: 600; font-family: 'Courier New', Courier, monospace; }
.binary-byte-strip { background: #020617; border-radius: 8px; padding: 0.5rem; font-family: 'Courier New', Courier, monospace; font-size: 0.7rem; color: var(--trust-teal); height: 60px; overflow-y: auto; word-break: break-all; border: 1px solid rgba(255, 255, 255, 0.05); opacity: 0.8; }

/* --- 21. Global Footer --- */
.app-footer { border-top: 1px solid rgba(255, 255, 255, 0.05); background: #060910; padding: 4rem 1.5rem 2rem 1.5rem; position: relative; z-index: 2; }
.footer-wrapper { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
.footer-brand { max-width: 320px; }
.footer-title { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.75rem; display: inline-block; }
.footer-brand p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
.footer-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; }
.footer-links-grid h5 { color: var(--text-primary); font-size: 0.9rem; font-weight: 700; margin-bottom: 1.25rem; }
.footer-links-grid ul { list-style: none; }
.footer-links-grid li { margin-bottom: 0.75rem; }
.footer-links-grid a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; transition: var(--transition-snappy); }
.footer-links-grid a:hover { color: var(--trust-teal); }
.footer-bottom { max-width: 1400px; margin: 3rem auto 0 auto; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.05); text-align: center; font-size: 0.75rem; color: var(--text-secondary); }

/* Utilities */
.hidden { display: none !important; }

/* --- 22. Keyframes & Animations --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
@keyframes rotate-spinner { 100% { transform: rotate(360deg); } }
@keyframes dash-spinner { 0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(13, 148, 136, 0); } 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); } }
@keyframes statusPulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(13, 148, 136, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); } }
@keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulseWorker { 0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4); } 100% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.2); } }

/* --- 23. Media Queries --- */
@media (min-width: 768px) {
    .form-row { grid-template-columns: 1fr 1fr; }
    .radio-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .col-span-primary { grid-column: span 6; }
    .col-span-advanced { grid-column: span 6; }
    .col-span-secondary { grid-column: span 4; }
    .footer-wrapper { flex-direction: row; justify-content: space-between; }
}