/* ============================================================
   TEKTA · MEDIA OPTIMIZER — HOJA DE ESTILOS PRINCIPAL
   Brand Book TEKTA v2.3 · Sistema dual Dark + Light Tectonics
   ============================================================ */

@import url('tekta-tokens.css');

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

html, body { min-height: 100vh; }
/* Anti-"histéresis" al hacer scroll cerca de la tarjeta de resultado:
   - overflow-anchor:none  → desactiva el scroll-anchoring (el navegador deja de
     reajustar el scroll cuando algo cambia de tamaño cerca del viewport).
   - scrollbar-gutter:stable → reserva siempre el hueco de la barra (7px), así su
     aparición/desaparición no cambia el ancho ni realimenta el reflujo. */
html { scrollbar-gutter: stable; overflow-anchor: none; }
body { overflow-anchor: none; }

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: var(--whc-leading-normal);
    font-weight: var(--whc-fw-regular);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .25s var(--whc-ease), color .25s var(--whc-ease);
}

/* Scrollbars Gold corporativo */
* { scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 0; }
*::-webkit-scrollbar-corner { background: transparent; }
::selection { background: var(--gb); color: var(--text); }

/* Accesibilidad — focus ring (WCAG 2.2) */
button:focus-visible, input:focus-visible, select:focus-visible,
a:focus-visible, label:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: var(--whc-border-base) solid var(--gold) !important;
    outline-offset: 2px;
}

.app-container {
    max-width: var(--whc-container-normal);
    margin: 0 auto;
    padding: var(--whc-space-6) var(--whc-space-4) var(--whc-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--whc-space-6);
}

/* =====================================================================
   TOPBAR · 48px · siempre dark · borde inferior Gold 2.5px (estilo TIME)
   ===================================================================== */
.topbar {
    background: #0D1117;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 48px;
    flex-shrink: 0;
    border-bottom: 2.5px solid var(--gold);
    position: relative;
    z-index: 100;
    border-radius: var(--whc-radius-none);
}

.logo-block {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 34px; flex-shrink: 0; position: relative;
}
.logo-block svg { width: 28px; height: 28px; display: block; }
.logo-block::after { content: none; }

.brand-wm { display: flex; flex-direction: column; line-height: 1; }
.brand-wm .bw1 { font-size: 13px; font-weight: 800; letter-spacing: 2px; color: #fff; }
.brand-wm .bw2 { font-size: 7.5px; font-weight: 600; letter-spacing: 1.5px; color: var(--gold); margin-top: 2px; }

.vd { width: 1px; height: 26px; background: rgba(255,255,255,.15); flex-shrink: 0; }

.topbar-title { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.92); letter-spacing: .3px; white-space: nowrap; }
.topbar-spacer { flex: 1; min-width: 0; }

/* Header buttons (.hb) estilo TIME */
.hb {
    height: 28px; padding: 0 10px; border: none; border-radius: 3px;
    background: rgba(255,255,255,.07); color: rgba(255,255,255,.82);
    font-family: var(--font); font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
    cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
    transition: background .14s, color .14s; flex-shrink: 0;
}
.hb:hover { background: var(--gb); color: var(--gold); }
.hb.ico { width: 28px; padding: 0; justify-content: center; }
.hb.ico svg { width: 15px; height: 15px; }
.hb.gold { background: var(--gold); color: #0D1117; }
.hb.gold:hover { background: var(--gold-deep); color: #0D1117; }
.lang-seg { display: inline-flex; border: 1px solid rgba(255,255,255,.18); border-radius: 3px; overflow: hidden; }
.lang-seg button {
    background: transparent; color: rgba(255,255,255,.6); border: none; cursor: pointer;
    font-family: var(--font); font-size: 9px; font-weight: 800; letter-spacing: .5px; padding: 0 8px; height: 26px;
}
.lang-seg button.on { background: var(--gold); color: #0D1117; }

/* =====================================================================
   FOLDER TABS · carpetas inclinadas con clip-path (estilo TIME)
   ===================================================================== */
.whc-tabs-container {
    display: flex; align-items: flex-end; gap: 4px;
    padding: 0; margin: 0; position: relative; z-index: 30;
}
.whc-tab-btn {
    position: relative;
    padding: 8px 22px;
    background: var(--surface2);
    color: var(--text2);
    font-family: var(--font); font-size: 10px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; cursor: pointer; margin-bottom: -1px; white-space: nowrap;
    border: 1px solid var(--line2);
    border-radius: 6px 6px 0 0;
    transition: background .15s, color .15s;
}
.whc-tab-btn:hover:not(.active) { background: var(--bg-deep); color: var(--text); }
.whc-tab-btn.active {
    background: var(--bg); color: var(--gold-text); z-index: 31;
    border-color: var(--gold); border-bottom-color: var(--bg);
}
.whc-tab-btn.active::before {
    content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: var(--gold); margin-right: 8px; vertical-align: middle;
}
/* Zona pestañas+panel: bloque sin gap para que conecten físicamente */
.tab-zone { display: block; }
/* Contenedor de trabajo al que se conectan las pestañas */
.workspace {
    border: 1px solid var(--line2);
    border-radius: 0 8px 8px 8px;
    padding: var(--whc-space-6);
    position: relative; z-index: 1;
}
.help-btn { margin-left: auto; clip-path: none; padding: 6px 12px; color: var(--gold-text); background: transparent; border: 1px solid var(--line2); border-radius: 3px; top: 0; }
.help-btn:hover { background: var(--ga); border-color: var(--gold); color: var(--gold-text); top: 0; }
.help-btn svg { display: block; }

/* =====================================================================
   PILOTO DE ESTADO DEL NÚCLEO (semáforo en la fila de pestañas)
   ===================================================================== */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.core-status { margin-left:auto; align-self:center; display:flex; align-items:center; margin-bottom:7px; }
.core-status .badge { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; background:var(--surface); border:1px solid var(--line2); border-radius:3px; padding:6px 14px 6px 12px; font-family:var(--mono); font-size:.66rem; letter-spacing:.06em; }
.core-status .badge::before { content:''; width:9px; height:9px; border-radius:50%; background:var(--steel); flex-shrink:0; transition:background .2s; }
.core-status .badge-loading { color:var(--warn); border-color:color-mix(in srgb, var(--warn) 45%, transparent); background:var(--surface); }
.core-status .badge-loading::before { background:var(--warn); animation:csPulse 1.3s ease-in-out infinite; }
.core-status .badge-ready { color:var(--success); border-color:color-mix(in srgb, var(--success) 45%, transparent); background:var(--surface); }
.core-status .badge-ready::before { background:var(--success); box-shadow:0 0 6px color-mix(in srgb, var(--success) 60%, transparent); }
.core-status .badge-error { color:var(--danger); border-color:color-mix(in srgb, var(--danger) 55%, transparent); background:var(--surface); }
.core-status .badge-error::before { background:var(--danger); box-shadow:0 0 6px var(--danger); animation:csPulse 1.1s ease-in-out infinite; }
@keyframes csPulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* =====================================================================
   TABLERO DE ESTADO WASM
   ===================================================================== */
.status-panel {
    background: var(--surface);
    border: var(--whc-border-hairline) solid var(--line);
    border-left: 3px solid var(--gold);
    padding: var(--whc-space-4) var(--whc-space-5);
    display: flex; flex-direction: column; gap: var(--whc-space-3);
    box-shadow: var(--whc-shadow-card);
}
.panel-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--whc-space-2); }
.panel-header h2, .panel-header h3 {
    font-size: var(--whc-text-sm); font-weight: var(--whc-fw-bold);
    letter-spacing: var(--whc-tracking-wide); text-transform: uppercase; color: var(--text);
}
.progress-bar-container {
    background-color: var(--na);
    border: var(--whc-border-hairline) solid var(--line);
    height: 8px; overflow: hidden;
}
.progress-fill { height: 100%; background-color: var(--gold); transition: width var(--whc-duration-fast) var(--whc-ease); box-shadow: 0 0 8px var(--gb); }
.status-msg { font-size: var(--whc-text-xs); color: var(--text2); font-weight: var(--whc-fw-semibold); letter-spacing: var(--whc-tracking-wide); }

.badge { padding: var(--whc-space-1) var(--whc-space-3); font-size: var(--whc-text-xs); font-weight: var(--whc-fw-bold); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); font-family: var(--mono); }
.badge-loading { background-color: var(--ga); border: var(--whc-border-hairline) solid var(--gold); color: var(--gold-text); }
.badge-ready { background-color: var(--success-bg); border: var(--whc-border-hairline) solid var(--success); color: var(--success); }
.badge-error { background-color: var(--danger-bg); border: var(--whc-border-hairline) solid var(--danger); color: var(--danger); }

/* =====================================================================
   GRILLA PRINCIPAL — 3 COLUMNAS
   ===================================================================== */
.main-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--whc-space-6); }

.card {
    background-color: var(--surface);
    border: var(--whc-border-hairline) solid var(--line);
    padding: var(--whc-space-6);
    box-shadow: var(--whc-shadow-card);
    display: flex; flex-direction: column; gap: var(--whc-space-4);
    transition: border-color var(--whc-duration-fast) var(--whc-ease), box-shadow var(--whc-duration-fast) var(--whc-ease);
}
.card:hover { border-color: var(--gb); }
.card h3 { font-size: var(--whc-text-sm); font-weight: var(--whc-fw-bold); color: var(--text); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); }
.card-desc { color: var(--text2); font-size: var(--whc-text-xs); line-height: var(--whc-leading-snug); }
.card-title-gold { color: var(--gold-text) !important; display: flex; align-items: center; gap: var(--whc-space-3); text-transform: uppercase; }
.card-title-gold svg { stroke: var(--gold); }

/* =====================================================================
   ÁREA DE CARGA / DRAG & DROP
   ===================================================================== */
.file-input-wrapper {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    border: var(--whc-border-thin) dashed var(--line2);
    background-color: var(--na);
    transition: all var(--whc-duration-fast) var(--whc-ease);
    min-height: 180px; position: relative; overflow: hidden;
}
.file-input-wrapper:hover { border-color: var(--gold); background-color: var(--ga); }
.file-input-wrapper.has-file { border-style: solid; border-color: var(--line2); background-color: var(--bg-deep); }
.file-input-wrapper.dragover { border-color: var(--gold) !important; background-color: var(--ga) !important; box-shadow: 0 0 15px var(--gb); }

.upload-prompt { display: flex; flex-direction: column; align-items: center; gap: var(--whc-space-4); width: 100%; padding: var(--whc-space-8) var(--whc-space-4); }
.upload-icon { width: 34px; height: 34px; stroke: var(--steel); stroke-width: 1.5px; stroke-linecap: square; stroke-linejoin: miter; fill: none; transition: stroke var(--whc-duration-fast) linear; }
.file-input-wrapper:not(.has-file):hover .upload-icon { stroke: var(--gold); }
input[type="file"] { display: none; }

.thumbnail-container { position: relative; width: 100%; min-height: 200px; z-index: 2; }
.media-preview-box { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-preview-box img, .media-preview-box video, .media-preview-box canvas { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.88; transition: opacity var(--whc-duration-fast) var(--whc-ease); }
.thumbnail-container:hover .media-preview-box img, .media-preview-box video:hover, .thumbnail-container:hover .media-preview-box canvas { opacity: 1; }

.thumbnail-container .btn-clear-file {
    position: absolute; top: var(--whc-space-3); right: var(--whc-space-3); bottom: auto; left: auto;
    background: transparent; color: var(--gold); border: none;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; transition: color var(--whc-duration-fast) var(--whc-ease), transform var(--whc-duration-fast) var(--whc-ease);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.7));
}
.thumbnail-container .btn-clear-file:hover { color: var(--danger); transform: scale(1.1); }

.btn-file-label {
    display: inline-block; padding: var(--whc-space-2) var(--whc-space-4);
    background-color: transparent; border: var(--whc-border-hairline) solid var(--steel);
    color: var(--text); cursor: pointer; font-weight: var(--whc-fw-bold);
    font-size: var(--whc-text-xs); transition: all var(--whc-duration-fast) var(--whc-ease);
    text-transform: uppercase; letter-spacing: var(--whc-tracking-wide);
}
.btn-file-label:hover { border-color: var(--gold); color: var(--gold-text); }

.file-details {
    background-color: var(--na); padding: var(--whc-space-3);
    font-size: var(--whc-text-xs); display: flex; flex-direction: column; gap: var(--whc-space-2);
    border-left: 3px solid var(--gold);
}
.file-details strong { color: var(--gold-text); text-transform: uppercase; }
.file-details span { color: var(--text); font-family: var(--mono); }

/* =====================================================================
   METADATA TÉCNICA
   ===================================================================== */
.source-metadata {
    background-color: var(--na); border: var(--whc-border-hairline) solid var(--line);
    padding: var(--whc-space-4); margin-top: var(--whc-space-4);
    animation: fadeIn var(--whc-duration-fast) var(--whc-ease) both;
}
.metadata-header {
    display: flex; align-items: center; gap: var(--whc-space-2); color: var(--gold-text);
    font-size: var(--whc-text-xs); font-weight: var(--whc-fw-bold); text-transform: uppercase;
    letter-spacing: var(--whc-tracking-wide); margin-bottom: var(--whc-space-3);
    border-bottom: var(--whc-border-hairline) solid var(--line); padding-bottom: var(--whc-space-2);
}
.metadata-header svg { stroke: var(--gold); }
.metadata-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--whc-space-3); }
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 0.62rem; color: var(--text2); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); }
.meta-value { font-size: var(--whc-text-xs); color: var(--text); font-family: var(--mono); }

/* =====================================================================
   ADVERTENCIA DE MEMORIA
   ===================================================================== */
.memory-warning-box {
    background-color: var(--danger-bg); border: var(--whc-border-thin) solid var(--danger);
    padding: var(--whc-space-4); margin-top: var(--whc-space-4);
    display: flex; gap: var(--whc-space-3); align-items: flex-start;
    animation: fadeIn var(--whc-duration-fast) var(--whc-ease) both;
}
.warning-icon { font-size: var(--whc-text-md); line-height: 1; color: var(--danger); }
.warning-content strong { color: var(--danger); font-weight: var(--whc-fw-bold); text-transform: uppercase; font-size: var(--whc-text-xs); display: block; margin-bottom: var(--whc-space-1); letter-spacing: var(--whc-tracking-wide); }
.warning-content p { font-size: var(--whc-text-xs); color: var(--text); line-height: var(--whc-leading-snug); }

/* =====================================================================
   CONTROLES
   ===================================================================== */
.controls-group { display: flex; flex-direction: column; gap: var(--whc-space-4); animation: fadeIn var(--whc-duration-fast) var(--whc-ease) both; }
.controls-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--whc-space-3); padding: var(--whc-space-10) var(--whc-space-4); color: var(--text2); text-align: center; }
.controls-placeholder svg { opacity: 0.4; stroke: var(--steel); }
.controls-placeholder p { font-size: var(--whc-text-xs); letter-spacing: var(--whc-tracking-wide); text-transform: uppercase; max-width: 220px; line-height: var(--whc-leading-snug); }

.control-row { display: flex; flex-direction: column; gap: var(--whc-space-2); }
.control-row label { font-size: var(--whc-text-xs); font-weight: var(--whc-fw-bold); color: var(--text2); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); }
.slider-value { color: var(--gold-text); font-weight: var(--whc-fw-bold); font-family: var(--mono); }
.slider-labels { display: flex; justify-content: space-between; font-size: 0.58rem; color: var(--text2); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); margin-top: -2px; }

.whc-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: var(--na); border: var(--whc-border-hairline) solid var(--line); outline: none; cursor: pointer; }
.whc-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; background: var(--gold); border: none; cursor: pointer; transition: box-shadow var(--whc-duration-fast) var(--whc-ease); }
.whc-slider::-webkit-slider-thumb:hover { box-shadow: 0 0 10px var(--gb); }
.whc-slider::-moz-range-thumb { width: 16px; height: 16px; background: var(--gold); border: none; cursor: pointer; border-radius: 0; }
.whc-slider::-moz-range-progress { background: var(--gold); height: 6px; }
.whc-slider::-moz-range-track { background: rgba(140,151,160,.28); height: 6px; }

.whc-input-number, select {
    background-color: var(--bg); border: var(--whc-border-hairline) solid var(--line2);
    color: var(--text); padding: var(--whc-space-3); font-family: inherit; font-size: var(--whc-text-sm);
    width: 100%; transition: border-color var(--whc-duration-fast) var(--whc-ease);
}
select { cursor: pointer; }
select:disabled { opacity: 0.4; cursor: not-allowed; }
.whc-input-number:focus, select:focus { border-color: var(--gold); outline: none; }

/* =====================================================================
   BOTONES · CTA Hover Lift
   ===================================================================== */
.btn {
    display: inline-block; width: 100%; padding: var(--whc-space-3) var(--whc-space-6);
    font-size: var(--whc-text-xs); font-weight: var(--whc-fw-bold); text-align: center;
    text-transform: uppercase; letter-spacing: var(--whc-tracking-wide);
    cursor: pointer; border: none; font-family: inherit;
    transition: all var(--whc-duration-fast) var(--whc-ease); text-decoration: none;
}
.btn-primary { background-color: var(--gold); color: #0D1117; border: var(--whc-border-hairline) solid var(--gold); }
.btn-primary:hover:not(:disabled) { background-color: var(--gold); color: #0D1117; transform: translateY(-2px); box-shadow: var(--whc-shadow-cta-hover); }
.btn-primary:disabled { background-color: var(--na); border-color: var(--line); color: var(--text2); cursor: not-allowed; transform: none; box-shadow: none; opacity: .7; }
.btn-secondary { background-color: transparent; border: var(--whc-border-hairline) solid var(--steel); color: var(--text); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-text); }
.btn-success { background-color: transparent; border: var(--whc-border-hairline) solid var(--steel); color: var(--text2); }
.btn-success:hover { border-color: var(--gold); color: var(--gold-text); transform: translateY(-1px); }
.btn-text { background: none; border: none; color: var(--text2); font-size: var(--whc-text-xs); text-transform: uppercase; font-weight: var(--whc-fw-semibold); cursor: pointer; transition: all var(--whc-duration-fast) var(--whc-ease); display: inline-flex; }
.btn-text:hover { color: var(--gold-text); }
.btn-text svg { stroke: currentColor; }

/* =====================================================================
   BARRA DE PROGRESO BLUEPRINT
   ===================================================================== */
.process-progress { display: flex; flex-direction: column; gap: var(--whc-space-2); margin-top: var(--whc-space-2); }
.progress-info { display: flex; justify-content: space-between; font-size: var(--whc-text-xs); font-weight: var(--whc-fw-semibold); color: var(--text2); text-transform: uppercase; }
.progress-info #process-percentage { color: var(--gold-text); font-family: var(--mono); }
.blueprint-progress-bg { background-color: var(--na); border: var(--whc-border-thin) solid var(--gb); height: 12px; position: relative; overflow: hidden; }
.blueprint-progress-fill { height: 100%; width: 0%; background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 10px, var(--gold-deep) 10px, var(--gold-deep) 20px); transition: width 0.25s linear; }
.blueprint-progress-fill.complete { background: repeating-linear-gradient(45deg, var(--success), var(--success) 10px, color-mix(in srgb, var(--success) 70%, #000) 10px, color-mix(in srgb, var(--success) 70%, #000) 20px); transition: background 0.4s ease; }

/* =====================================================================
   PROYECCIÓN ESTIMADA
   ===================================================================== */
.side-col { display: flex; flex-direction: column; gap: var(--whc-space-6); min-height: 0; }
.projection-card { border-color: var(--gb); height: fit-content; }
.projection-header { display: flex; align-items: center; gap: var(--whc-space-3); color: var(--gold-text); border-bottom: var(--whc-border-hairline) solid var(--line); padding-bottom: var(--whc-space-3); margin-bottom: var(--whc-space-2); }
.projection-header svg { stroke: var(--gold); }
.projection-header h3 { color: var(--gold-text) !important; }
.projection-body { display: flex; flex-direction: column; gap: var(--whc-space-3); }
.proj-metric { display: flex; justify-content: space-between; align-items: baseline; }
.proj-label { font-size: var(--whc-text-xs); color: var(--gold-text); text-transform: uppercase; }
.proj-value { font-family: var(--mono); font-size: var(--whc-text-sm); color: var(--text); font-weight: var(--whc-fw-bold); }
.proj-highlight { background-color: var(--na); padding: var(--whc-space-2); margin: 0 calc(var(--whc-space-2) * -1); border-left: 2px solid var(--gold); }
.proj-accent { color: var(--gold-text); }
.proj-reduction-bar { display: flex; align-items: center; gap: var(--whc-space-3); margin-top: var(--whc-space-2); }
.proj-bar-bg { flex-grow: 1; height: 4px; background-color: var(--na); position: relative; overflow: hidden; }
.proj-bar-fill { height: 100%; background-color: var(--success); position: absolute; right: 0; transition: width var(--whc-duration-fast) var(--whc-ease); }
.proj-reduction-label { font-size: var(--whc-text-xs); font-weight: var(--whc-fw-bold); color: var(--success); min-width: 40px; text-align: right; font-family: var(--mono); }
.proj-divider { height: 1px; background-color: var(--line); margin: var(--whc-space-2) 0; }
.proj-disclaimer { display: flex; align-items: flex-start; gap: var(--whc-space-2); margin-top: var(--whc-space-4); padding-top: var(--whc-space-4); border-top: var(--whc-border-hairline) dashed var(--line2); color: var(--text2); font-size: 0.66rem; line-height: var(--whc-leading-snug); }
.proj-disclaimer svg { stroke: var(--text2); flex-shrink: 0; }

/* =====================================================================
   TERMINAL DE LOGS — siempre dark (consola técnica)
   ===================================================================== */
.logs-card { background-color: #05070D; border: var(--whc-border-hairline) solid var(--line); transition: all 0.3s ease; flex-grow: 1; min-height: 0; }
.logs-card .panel-header h3 { color: var(--gold-text) !important; }
.logs-actions { display: flex; gap: var(--whc-space-3); align-items: center; }
/* Centrado por top/left (sin transform): translate(-50%,-50%) en position:fixed cae en
   medios píxeles y promueve una capa compositada → texto borroso. top/left lo evita. */
/* Ventana emergente del log: 50% de la pantalla, centrada. Sin transform ni escalado
   (evita el semipíxel y mantiene el texto totalmente nítido en Electron). */
.logs-card.maximized { position: fixed; top: 25vh; left: 25vw; transform: none; width: 50vw; height: 50vh; min-width: 480px; min-height: 320px; z-index: 1000; display: flex; flex-direction: column; border: 1px solid var(--gold); border-radius: 8px; box-shadow: 0 18px 60px rgba(0,0,0,0.7); overflow: hidden; }
.logs-card.maximized .terminal-box { flex: 1 1 auto; height: auto; min-height: 0; overflow: auto; font-size: 13px; line-height: 1.5; }
/* En la ventana emergente, ignorar el estado «collapsed»: el log se muestra completo. */
.logs-card.maximized.collapsed .terminal-box { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; overflow: auto; padding: 12px var(--whc-space-4); }
.logs-card.maximized.collapsed .terminal-line:not(:last-child) { display: block; }
/* X superior y botón Cerrar: solo visibles en la ventana emergente */
.logs-only-max { display: none !important; }
.logs-card.maximized .logs-only-max { display: inline-flex !important; }
.logs-card.maximized #btn-close-logs-modal { color: var(--gold); }
.logs-modal-foot { align-items: center; justify-content: flex-end; gap: var(--whc-space-3); padding: 10px var(--whc-space-4); border-top: var(--whc-border-hairline) solid var(--line); background: #05070D; }
.logs-card.maximized .logs-modal-foot { display: flex; }

/* ====== Modal genérico TEKTA (p. ej. «cambios sin guardar») ====== */
.tk-modal-overlay { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; background: rgba(5,7,13,.78); padding: 24px; }
.tk-modal { position: relative; width: 100%; max-width: 440px; background: var(--surface); color: var(--text); border: 1px solid var(--gold); border-radius: 10px; box-shadow: 0 18px 60px rgba(0,0,0,.7); padding: 22px 22px 18px; }
.tk-modal-title { font-size: var(--whc-text-md); font-weight: var(--whc-fw-bold); color: var(--gold-text); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); margin-bottom: 10px; padding-right: 28px; }
.tk-modal-body { font-size: var(--whc-text-sm); color: var(--text2); line-height: var(--whc-leading-snug); margin-bottom: 18px; }
.tk-modal-actions { display: flex; justify-content: flex-end; gap: var(--whc-space-3); }
.tk-modal-x { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; background: transparent; border: none; color: var(--text2); cursor: pointer; border-radius: 6px; }
.tk-modal-x:hover { color: var(--gold); background: rgba(255,255,255,.06); }
.tk-btn { font-family: inherit; font-size: var(--whc-text-sm); font-weight: var(--whc-fw-bold); padding: 9px 16px; border-radius: 7px; cursor: pointer; border: 1px solid var(--line); background: var(--na); color: var(--text); transition: all var(--whc-duration-fast) var(--whc-ease); }
.tk-btn:hover { border-color: var(--gold); }
.tk-btn-ghost { background: transparent; }
.tk-btn-danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.tk-btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.logs-modal-overlay { position: fixed; inset: 0; background-color: rgba(5,7,13,.32); z-index: 999; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; }
.logs-modal-overlay.open { opacity: 1; visibility: visible; }
.terminal-box {
    min-height: 0; height: 0; flex-basis: 0; flex-grow: 1; overflow-y: auto;
    background-color: #020408; border: var(--whc-border-hairline) solid rgba(255,255,255,.08);
    padding: var(--whc-space-4); font-family: var(--mono); font-size: var(--whc-text-xs);
    color: #A2B6CD; display: flex; flex-direction: column; gap: var(--whc-space-1); scroll-behavior: smooth;
}
.terminal-line { word-break: break-all; line-height: 1.45; }
.system-line { color: var(--gold); font-weight: var(--whc-fw-semibold); }
.error-line { color: #FCA5A5; }

/* =====================================================================
   LIGHT THEME OVERRIDES · topbar + terminal de logs
   La topbar y la consola eran "siempre dark" (colores hardcodeados).
   En modo claro deben ser claras con texto oscuro. Tokens dinámicos.
   ===================================================================== */
:root[data-theme="light"] .topbar {
    background: var(--surface);
    color: var(--text);
    border-bottom-color: var(--gold);
    box-shadow: 0 1px 0 var(--line);
}
:root[data-theme="light"] .brand-wm .bw1 { color: var(--text); }
:root[data-theme="light"] .brand-wm .bw2 { color: var(--gold-text); }
:root[data-theme="light"] .vd { background: var(--line2); }
:root[data-theme="light"] .topbar-title { color: var(--text); }
:root[data-theme="light"] .hb { background: var(--na); color: var(--text2); }
:root[data-theme="light"] .hb:hover { background: var(--gb); color: var(--gold-text); }
:root[data-theme="light"] .hb.gold { background: var(--gold); color: #0D1117; }
:root[data-theme="light"] .hb.gold:hover { background: var(--gold-deep); color: #FFFFFF; }
:root[data-theme="light"] .lang-seg { border-color: var(--line2); }
:root[data-theme="light"] .lang-seg button { color: var(--text2); }
:root[data-theme="light"] .lang-seg button.on { background: var(--gold); color: #0D1117; }

:root[data-theme="light"] .logs-card { background-color: var(--surface); border-color: var(--line2); }
:root[data-theme="light"] .terminal-box {
    background-color: var(--surface2);
    border-color: var(--line);
    color: var(--text);
}
:root[data-theme="light"] .system-line { color: var(--gold-text); }
:root[data-theme="light"] .error-line { color: var(--danger); }

/* =====================================================================
   MODO DEMO · banner en flujo (arriba) + modal informativo
   El banner va EN FLUJO (no fixed) para no robar clicks a la topbar.
   ===================================================================== */
.demo-banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 8px 16px; font-family: var(--font); font-size: 12px; line-height: 1.35;
    background: linear-gradient(90deg, rgba(212,175,55,.18), rgba(212,175,55,.08));
    border-bottom: 1px solid var(--gold);
    color: var(--text);
}
.demo-banner[hidden] { display: none; }
.demo-banner-txt { flex: 1; min-width: 220px; font-weight: 600; }
.demo-banner-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.demo-link {
    background: none; border: none; cursor: pointer; padding: 0;
    color: var(--gold-text); font-family: var(--font); font-size: 12px; font-weight: 700;
    text-decoration: underline; text-underline-offset: 2px; white-space: nowrap;
}
.demo-cta {
    display: inline-block; background: var(--gold); color: #0D1117;
    padding: 6px 14px; border-radius: 4px; font-size: 12px; font-weight: 800;
    text-decoration: none; white-space: nowrap; transition: background .14s;
}
.demo-cta:hover { background: var(--gold-deep); }

.demo-modal-ov {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(5,7,13,.72); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.demo-modal-ov[hidden] { display: none; }
.demo-modal {
    position: relative; width: 94%; max-width: 700px; max-height: 88vh; overflow-y: auto;
    background: var(--surface); border-top: 3px solid var(--gold); border-radius: 10px;
    box-shadow: 0 24px 64px rgba(0,0,0,.5); padding: 24px 26px;
}
.demo-modal-sm { max-width: 440px; }
#soon-modal-ov { z-index: 100001; }
.demo-modal-x {
    position: absolute; top: 12px; right: 14px; background: none; border: none;
    color: var(--text2); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px;
}
.demo-modal-x:hover { color: var(--text); }
.demo-modal-title { margin: 0 24px 6px 0; font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.demo-modal-intro { margin: 0 0 18px; font-size: 13px; color: var(--text2); line-height: 1.55; }
.demo-modal-head { display: flex; align-items: center; gap: 12px; margin: 0 26px 6px 0; }
.demo-logo { width: 34px; height: 34px; background: #0D1117; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.demo-logo svg { width: 22px; height: 22px; display: block; }
.demo-tbl { width: 100%; border-collapse: collapse; margin-top: 8px; }
.demo-tbl th, .demo-tbl td { padding: 8px 8px; text-align: left; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.demo-tbl thead th { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text2); font-weight: 800; border-bottom: 1px solid var(--line2); vertical-align: bottom; }
.demo-tbl td:first-child { color: var(--text); }
.demo-tbl td.demo-c, .demo-tbl th.demo-c { text-align: center; width: 74px; }
.demo-tbl .demo-c-app { background: var(--ga); }
.demo-tbl .demo-th-app { color: var(--gold-text); }
.demo-tbl tbody tr:last-child td { border-bottom: none; }
.demo-tbl tbody tr:last-child .demo-c-app { border-radius: 0 0 6px 6px; }
.demo-tbl thead .demo-c-app { border-radius: 6px 6px 0 0; }
.demo-yes { color: var(--success); vertical-align: middle; }
.demo-no { color: var(--text2); opacity: .45; }
.demo-row-price td { border-top: 1px solid var(--line2); padding-top: 11px; padding-bottom: 11px; }
.demo-row-price td:first-child { font-weight: 700; }
.demo-price { font-size: 11px; font-weight: 800; line-height: 1.2; display: inline-block; }
.demo-price-bad { color: var(--danger); }
.demo-price-good { color: var(--gold-text); }
.demo-cta-big { display: block; text-align: center; margin-top: 20px; padding: 12px 16px; font-size: 13.5px; }
.demo-modal-foot { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.demo-modal-foot .demo-cta-big { margin-top: 0; flex: 1.4 1 200px; }
.demo-cta-ghost {
    flex: 1 1 160px; display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 16px; border-radius: 4px; border: 1px solid var(--line2); background: transparent;
    color: var(--text); font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer;
    transition: background .14s, border-color .14s;
}
.demo-cta-ghost:hover { background: var(--na); border-color: var(--gold); }

/* Botón bloqueado a "solo escritorio" en la demo */
.ed-btn.demo-locked, .demo-locked { opacity: .5; cursor: not-allowed; }

/* =====================================================================
   RESULTADO
   ===================================================================== */
.result-card { grid-column: 1 / -1; border: var(--whc-border-thin) solid var(--success-bg); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.result-card h3 { color: var(--text); }
.result-layout { display: flex; gap: var(--whc-space-8); flex-wrap: wrap; }
.preview-box { position: relative; flex: 1 1 300px; background-color: var(--bg-deep); border: var(--whc-border-hairline) solid var(--line); display: flex; justify-content: center; align-items: center; overflow: hidden; min-height: 200px; max-height: 350px; }
/* Resultado único (hijo directo): media en posición ABSOLUTA → su tamaño/estado de
   render NO influye en el alto de la caja. Rompe el bucle de reflujo "histéresis" al
   hacer scroll. (El modo lote usa contenedores anidados, no le afecta el selector >). */
.preview-box > img, .preview-box > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background-color: transparent; }

/* Reproducción del resultado en ventana superpuesta FIJA (fuera del scroll). El <video> en
   una caja recortada que se desplaza con la página parpadea en Electron; en una capa fija y
   centrada se reproduce limpio y el scroll de la página no le afecta. */
.video-modal-overlay { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.86); padding: 28px; }
.video-modal-box { position: relative; max-width: 90vw; max-height: 88vh; }
.video-modal-box video { display: block; max-width: 90vw; max-height: 88vh; border: 1px solid var(--gold); border-radius: 6px; background: #000; box-shadow: 0 18px 60px rgba(0,0,0,.7); }
.video-modal-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #0d1117; border: none; font-size: 18px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.video-modal-close:hover { filter: brightness(1.1); }
/* Botón ▶ sobre la miniatura de resultado (el <video> se crea solo al pulsarlo). */
.result-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.9); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; padding-left: 4px; transition: background .15s ease, transform .15s ease; }
.result-play-btn:hover { background: rgba(0,0,0,.78); transform: translate(-50%,-50%) scale(1.08); }
.result-details { flex: 1 1 350px; display: flex; flex-direction: column; gap: var(--whc-space-5); justify-content: center; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: var(--whc-text-xs); }
.comparison-table th, .comparison-table td { padding: var(--whc-space-3); text-align: left; border-bottom: var(--whc-border-hairline) solid var(--line); }
.comparison-table th { color: var(--text2); text-transform: uppercase; font-weight: var(--whc-fw-semibold); }
.comparison-table td { color: var(--text); font-family: var(--mono); }
.highlight-val { color: var(--success) !important; font-weight: var(--whc-fw-bold); }

/* =====================================================================
   DUAL MODE PILLS
   ===================================================================== */
.mode-pills-container { display: flex; align-items: center; justify-content: center; width: 100%; margin: var(--whc-space-2) 0 var(--whc-space-4); padding-bottom: var(--whc-space-4); border-bottom: var(--whc-border-hairline) dashed var(--line2); }
.mode-pill { flex: 1; background: transparent; border: 1px solid var(--gold); color: var(--gold-text); font-family: var(--font); font-size: var(--whc-text-xs); font-weight: var(--whc-fw-bold); letter-spacing: var(--whc-tracking-wide); padding: 8px 16px; cursor: pointer; transition: all var(--whc-duration-fast) var(--whc-ease); text-transform: uppercase; }
.mode-pill:first-child { border-right: none; }
.mode-pill.active { background-color: var(--gold); color: #0D1117; }
.mode-pill:hover:not(.active) { background-color: var(--ga); }

/* =====================================================================
   BATCH CAROUSEL
   ===================================================================== */
.batch-preview-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--whc-space-3); padding: var(--whc-space-6) var(--whc-space-4); background: var(--na); border: var(--whc-border-hairline) dashed var(--gold); width: 100%; }
.batch-carousel-wrapper { position: relative; width: 100%; max-width: 280px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.3); margin-bottom: var(--whc-space-2); }
.batch-carousel-track { display: flex; overflow-x: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; width: 100%; -ms-overflow-style: none; scrollbar-width: none; }
.batch-carousel-track::-webkit-scrollbar { display: none; }
.batch-thumb-large { flex: 0 0 100%; width: 100%; aspect-ratio: 16/9; object-fit: cover; background-color: var(--bg-deep); scroll-snap-align: center; transition: transform 0.4s ease; }
.batch-thumb-large:hover { transform: scale(1.03); }
.batch-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.35); border: none; color: var(--gold); font-size: var(--whc-text-xl); font-weight: 900; text-shadow: 0 2px 6px rgba(0,0,0,0.8); width: 34px; height: 46px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease, color 0.3s ease; z-index: 10; }
.batch-nav-btn:hover { color: #fff; transform: translateY(-50%) scale(1.15); }
#batch-prev { left: 6px; } #batch-next { right: 6px; }
.batch-status-row { display: flex; align-items: center; justify-content: center; gap: var(--whc-space-2); margin-top: var(--whc-space-2); }
.batch-count-number, .batch-count-text { font-size: var(--whc-text-lg); font-weight: var(--whc-fw-bold); color: var(--text); }
.batch-label-text { font-size: var(--whc-text-xs); color: var(--gold-text); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); font-weight: var(--whc-fw-bold); }
.batch-icon-stack { display: flex; gap: 6px; } .batch-icon-stack svg { width: 26px; height: 26px; stroke: var(--success); }

/* =====================================================================
   TOOLTIPS
   ===================================================================== */
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: 115%; left: 50%; transform: translateX(-50%) translateY(8px); background-color: #0D1117; color: #fff; padding: var(--whc-space-2) var(--whc-space-3); font-size: 10px; font-family: var(--font); font-weight: var(--whc-fw-semibold); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); border: 1px solid var(--gold); white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; z-index: 1300; transition: opacity 0.2s ease 0.3s, transform 0.2s ease 0.3s, visibility 0s linear 0.5s; box-shadow: var(--whc-shadow-tooltip); }
[data-tooltip]:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition: opacity 0.2s ease 0.3s, transform 0.2s ease 0.3s; }
.mode-pill[data-tooltip]::after, .whc-tab-btn[data-tooltip]::after, .topbar [data-tooltip]::after { bottom: auto; top: 125%; transform: translateX(-50%) translateY(-8px); }
.mode-pill[data-tooltip]:hover::after, .whc-tab-btn[data-tooltip]:hover::after, .topbar [data-tooltip]:hover::after { transform: translateX(-50%) translateY(0); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.app-footer { text-align: center; padding: var(--whc-space-5) 0; color: var(--text2); font-size: var(--whc-text-xs); border-top: var(--whc-border-hairline) solid var(--line); }
.app-footer .gold { color: var(--gold-text); }

/* =====================================================================
   PANEL DE AYUDA / MANUAL — slide-in derecha estilo TIME
   ===================================================================== */
.help-overlay { position: fixed; inset: 0; background-color: rgba(0,0,0,.45); backdrop-filter: blur(3px); z-index: 1200; opacity: 0; visibility: hidden; transition: all 0.25s ease; }
.help-overlay.open { opacity: 1; visibility: visible; }
.help-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 500px; max-width: 96vw; height: 100vh;
    background: var(--bg); border-left: 1px solid var(--line2); z-index: 1201;
    transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.22,0.61,0.36,1);
    display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(0,0,0,0.28);
}
.help-panel.open { transform: translateX(0); }
.help-panel-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.help-panel-header .hp-badge { width: 30px; height: 30px; background: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-panel-header .hp-badge svg { stroke: var(--bg); width: 16px; height: 16px; }
.help-panel-header .hp-htxt { flex: 1; min-width: 0; }
.help-panel-header h3 { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text); margin: 0; }
.help-panel-header .hp-sub { font-size: 10px; color: var(--text2); margin-top: 2px; }
.btn-close-help { background: transparent; border: none; color: var(--text2); font-size: 22px; cursor: pointer; line-height: 1; padding: 2px 6px; transition: color .2s; }
.btn-close-help:hover { color: var(--gold-text); }

.help-subbar { display: flex; gap: 8px; align-items: center; padding: 10px 18px; background: var(--surface2); border-bottom: 1px solid var(--line); }
.help-search-wrap { flex: 1; position: relative; display: flex; align-items: center; }
.help-search-wrap svg { position: absolute; left: 8px; stroke: var(--steel); width: 13px; height: 13px; pointer-events: none; }
.help-search { width: 100%; padding: 6px 8px 6px 28px; height: 30px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font-family: var(--font); font-size: 11px; outline: none; }
.help-search:focus { border-color: var(--gold); }
.help-sub-btn { padding: 0 9px; height: 30px; background: transparent; border: 1px solid var(--line2); color: var(--text); cursor: pointer; font-family: var(--font); font-size: 9px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
.help-sub-btn:hover { border-color: var(--gold); color: var(--gold-text); }

.help-sections { flex: 1; overflow-y: auto; background: var(--bg); }
.help-sec { border-bottom: 1px solid var(--line); }
.help-sec-btn { width: 100%; padding: 12px 18px; background: transparent; border: none; display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; }
.help-sec-btn .hsec-ico { color: var(--steel); display: inline-flex; }
.help-sec-btn .hsec-ico svg { width: 16px; height: 16px; stroke: currentColor; }
.help-sec-btn .hsec-tt { flex: 1; min-width: 0; }
.help-sec-btn .hsec-title { font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text); }
.help-sec-btn .hsec-sub { font-size: 9px; color: var(--text2); margin-top: 2px; }
.help-sec-btn .hsec-chev { color: var(--steel); transition: transform .2s; }
.help-sec.open .hsec-ico, .help-sec.open .hsec-title { color: var(--gold-text); }
.help-sec.open .hsec-chev { transform: rotate(90deg); color: var(--gold-text); }
.help-sec-body { display: none; padding: 2px 18px 18px; background: var(--bg); }
.help-sec.open .help-sec-body { display: block; animation: fadeIn .2s var(--whc-ease) both; }

/* Manual estilo COST: índice numerado clicable (izq) + panel de contenido (der) */
.help-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.help-toc { width: 172px; flex-shrink: 0; border-right: 1px solid var(--line); overflow-y: auto; background: var(--surface2); padding: 8px 0; }
.help-toc-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 14px; background: transparent; border: none; border-left: 2px solid transparent; cursor: pointer; text-align: left; font-family: var(--font); transition: background .12s, border-color .12s; }
.help-toc-item:hover { background: var(--bg-deep); }
.help-toc-num { min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--text2); background: var(--surface); border: 1px solid var(--line2); flex-shrink: 0; }
.help-toc-label { font-size: 10.5px; font-weight: 600; color: var(--text2); line-height: 1.25; }
.help-toc-item.active { background: var(--bg); border-left-color: var(--gold); }
.help-toc-item.active .help-toc-num { color: #0D1117; background: var(--gold); border-color: var(--gold); }
.help-toc-item.active .help-toc-label { color: var(--gold-text); }
.help-content { flex: 1; overflow-y: auto; padding: 18px 22px; background: var(--bg); }
.help-content .help-h2 { font-size: 18px; font-weight: 800; color: var(--gold-text); margin: 0 0 2px; letter-spacing: .2px; }
.help-content .help-h2sub { font-size: 11px; color: var(--text2); margin: 0 0 16px; }
.help-results { display: flex; flex-direction: column; gap: 4px; }
.help-result { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line2); cursor: pointer; text-align: left; font-family: var(--font); font-size: 11px; color: var(--text); transition: border-color .12s, background .12s; }
.help-result:hover { border-color: var(--gold); background: var(--bg-deep); }
.help-empty { padding: 24px 8px; text-align: center; color: var(--text2); font-size: 11px; }

/* Tipografía interna del manual */
.hp-para { font-family: var(--font); font-size: 11.5px; color: var(--text); line-height: 1.65; margin: 6px 0; }
.hp-small { font-family: var(--font); font-size: 10.5px; color: var(--text2); line-height: 1.6; }
.hp-h3 { font-family: var(--font); font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gold-text); margin: 14px 0 6px; }
.hp-card { padding: 12px; background: var(--surface); border: 1px solid var(--line); margin: 8px 0; }
.hp-card.gold { background: var(--ga); border-color: var(--gold); }
.hp-card ol, .hp-card ul { padding-left: 18px; margin: 4px 0 0; }
.hp-card li { font-size: 10.5px; color: var(--text2); line-height: 1.6; margin-bottom: 4px; }
.hp-card li strong, .hp-para strong, .hp-small strong { color: var(--text); font-weight: 600; }
.hp-tut { margin-top: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); }
.hp-tut-title { font-size: 11px; font-weight: 700; color: var(--gold-text); margin-bottom: 4px; }
.hp-tut-intro { font-size: 10.5px; color: var(--text2); margin-bottom: 8px; line-height: 1.5; }
.hp-step { display: flex; gap: 8px; margin-bottom: 7px; align-items: flex-start; }
.hp-step-num { flex-shrink: 0; width: 18px; height: 18px; background: var(--ga); border: 1px solid var(--gold); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; font-weight: 800; color: var(--gold-text); }
.hp-step-txt { flex: 1; font-size: 10.5px; color: var(--text); line-height: 1.5; }
.hp-step-tip { margin-top: 3px; font-size: 9.5px; color: var(--text2); font-style: italic; }
.hp-gloss { display: flex; flex-direction: column; gap: 8px; }
.hp-gloss-item { padding: 10px; background: var(--surface); border: 1px solid var(--line); }
.hp-gloss-term { font-size: 11px; font-weight: 700; color: var(--gold-text); margin-bottom: 3px; }
.hp-gloss-short { font-size: 10.5px; color: var(--text); font-style: italic; margin-bottom: 5px; }
.hp-gloss-long { font-size: 10.5px; color: var(--text2); line-height: 1.55; }
.hp-faq { margin-top: 6px; padding: 10px; background: var(--surface); border: 1px solid var(--line); }
.hp-faq summary { cursor: pointer; font-family: var(--font); font-size: 11px; font-weight: 700; color: var(--text); list-style: none; }
.hp-faq summary::-webkit-details-marker { display: none; }
.hp-faq summary::before { content: '›'; color: var(--gold-text); margin-right: 6px; font-weight: 800; }
.hp-faq[open] summary::before { content: '⌄'; }
.hp-faq-ans { font-size: 10.5px; color: var(--text2); margin-top: 8px; line-height: 1.6; }
.hp-kbd-grid { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; background: var(--surface); border: 1px solid var(--line); padding: 10px; align-items: center; }
.hp-kbd { padding: 3px 8px; text-align: center; background: var(--surface2); border: 1px solid var(--line2); font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--text); white-space: nowrap; }
.hp-kbd-act { font-size: 10.5px; color: var(--text2); }
.hp-empty { font-size: 10.5px; color: var(--text2); padding: 4px 0; }

/* Visuales SVG del manual */
.hv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hv-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.hv-cell { padding: 10px; background: var(--surface2); border: 1px solid var(--line); }
.hv-cell .hv-tag { font-family: var(--mono); font-size: 10px; font-weight: 800; color: var(--gold-text); padding: 2px 6px; background: var(--ga); border: 1px solid var(--gold); display: inline-block; }
.hv-cell .hv-name { font-family: var(--font); font-size: 10px; font-weight: 700; color: var(--text); }
.hv-cell .hv-svg { background: var(--bg); padding: 4px; margin: 6px 0; }
.hv-cell .hv-svg svg { display: block; width: 100%; }
.hv-cell .hv-desc { font-size: 9px; color: var(--text2); line-height: 1.4; }

.help-footer { padding: 8px 18px; border-top: 1px solid var(--line); background: var(--surface); font-family: var(--mono); font-size: 9px; color: var(--text2); display: flex; justify-content: space-between; }

/* =====================================================================
   ANIMACIONES
   ===================================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.watermark-group { background-color: var(--na); border: var(--whc-border-hairline) solid var(--line); padding: var(--whc-space-4); display: flex; flex-direction: column; gap: var(--whc-space-4); }
.watermark-toggle-wrapper { display: flex; align-items: center; }
.checkbox-label { display: flex; align-items: center; gap: var(--whc-space-3); cursor: pointer; user-select: none; }
.checkbox-label input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: var(--whc-border-base) solid var(--steel); background-color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--whc-duration-fast) var(--whc-ease); }
.checkbox-label input[type="checkbox"]:hover { border-color: var(--gold); }
.checkbox-label input[type="checkbox"]:checked { background-color: var(--gold); border-color: var(--gold); }
.checkbox-label input[type="checkbox"]:checked::after { content: ""; width: 4px; height: 8px; border: solid #0D1117; border-width: 0 2px 2px 0; transform: rotate(45deg); display: block; margin-bottom: 2px; }
.checkbox-text { font-size: var(--whc-text-xs); font-weight: var(--whc-fw-semibold); color: var(--text); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); transition: color var(--whc-duration-fast) var(--whc-ease); }
.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text { color: var(--gold-text); }
.checkbox-label input[type="checkbox"]:disabled { opacity: 0.3; cursor: not-allowed; }
.watermark-select-wrapper { display: flex; flex-direction: column; gap: var(--whc-space-2); animation: slideDown var(--whc-duration-fast) var(--whc-ease) both; }
.watermark-select-wrapper label { font-size: var(--whc-text-xs); font-weight: var(--whc-fw-bold); color: var(--text2); text-transform: uppercase; letter-spacing: var(--whc-tracking-wide); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) { .main-content { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .app-container { padding: var(--whc-space-3) var(--whc-space-2); gap: var(--whc-space-4); }
    .topbar { gap: 6px; padding: 0 8px; }
    .topbar-title { display: none; }
    .hb span.hb-lbl { display: none; }
    .card { padding: var(--whc-space-4); }
    .help-panel { width: 100vw; }
    .whc-tabs-container { overflow-x: auto; }
}

/* =====================================================================
   GALERÍA DE RESULTADOS DE LOTE (F1-2 · preview por archivo)
   ===================================================================== */
.batch-results-wrap { width: 100%; display: flex; flex-direction: column; gap: var(--whc-space-4); }
.bres-summary { display: flex; align-items: center; gap: var(--whc-space-3); flex-wrap: wrap; padding: 4px 2px var(--whc-space-3); border-bottom: 1px solid var(--line); }
.bres-summary .bres-ico { width: 24px; height: 24px; border-radius: 50%; background: var(--success-bg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bres-summary .bres-ico svg { width: 14px; height: 14px; stroke: var(--success); }
.bres-summary .bres-sum-lbl { font-size: var(--whc-text-sm); font-weight: var(--whc-fw-bold); color: var(--text); }
.bres-summary .bres-sum-red { margin-left: auto; font-family: var(--mono); font-size: var(--whc-text-xs); color: var(--text2); background: var(--na); border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; white-space: nowrap; }
.bres-summary .bres-sum-red b { color: var(--success); }
.batch-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--whc-space-4); max-height: 380px; overflow-y: auto; padding: 2px 6px 2px 2px; }
.bres-item { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--whc-radius-sm); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.bres-item:hover { border-color: var(--gb); }
.bres-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #000; display: block; }
.bres-noimg { display: flex; align-items: center; justify-content: center; color: var(--steel); background: var(--surface2); }
.bres-meta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.bres-name { font-size: 0.7rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); }
.bres-sizes { font-size: 0.66rem; color: var(--text2); font-family: var(--mono); }
.bres-sizes b { color: var(--text); }
.bres-red { color: var(--success); font-weight: 700; margin-left: 2px; }
.bres-more { font-size: var(--whc-text-xs); color: var(--text2); text-align: center; font-style: italic; padding-top: var(--whc-space-2); }
/* Output result · más aire + lote a ancho completo */
.result-card { padding: var(--whc-space-6) var(--whc-space-8); }
.result-card h3 { margin-bottom: var(--whc-space-2); }
.result-layout { gap: var(--whc-space-8); }
.result-card.batch-mode .result-details { display: none; }
.result-card.batch-mode .preview-box { flex: 1 1 100%; max-height: none; background: transparent; border: none; overflow: visible; align-items: stretch; }
.result-card.batch-mode .batch-results-wrap { padding: var(--whc-space-2); }
.result-card.batch-mode .batch-results { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--whc-space-5); padding: var(--whc-space-2); max-height: 460px; }

/* =====================================================================
   LISTA DE LOTE PRE-CONVERSIÓN (item 2) + MODAL PROGRESO (item 3) + LOGS MIN (item 4)
   ===================================================================== */
.batch-list-wrap { width: 100%; padding: var(--whc-space-4); }
.batch-list-head { display:flex; align-items:center; gap:8px; font-size:var(--whc-text-xs); color:var(--gold-text); text-transform:uppercase; letter-spacing:var(--whc-tracking-wide); font-weight:var(--whc-fw-bold); margin-bottom:var(--whc-space-3); }
.batch-list-head .bl-total { margin-left:auto; font-family:var(--mono); color:var(--text2); text-transform:none; letter-spacing:0; }
.batch-list { display:flex; flex-direction:column; gap:8px; max-height:300px; overflow-y:auto; padding-right:6px; }
.bl-row { display:flex; align-items:center; gap:13px; padding:11px 13px; background:var(--bg-deep); border:1px solid var(--line); border-radius:var(--whc-radius-sm); }
.bl-ico { width:32px; height:32px; border-radius:5px; background:var(--surface2); color:var(--steel); display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.bl-ico svg { width:16px; height:16px; }
.bl-ico svg { width:15px; height:15px; }
.bl-main { flex:1; min-width:0; }
.bl-name { font-family:var(--mono); font-size:0.74rem; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:default; }
.bl-sizes { font-family:var(--mono); font-size:0.67rem; color:var(--text2); margin-top:4px; }
.bl-sizes b { color:var(--text); }
.bl-red { font-family:var(--mono); font-size:0.72rem; font-weight:700; color:var(--gold-text); flex-shrink:0; white-space:nowrap; }
.bl-trash { background:transparent; border:none; color:var(--steel); cursor:pointer; flex-shrink:0; padding:5px; display:inline-flex; border-radius:4px; transition:color .15s, background .15s; }
.bl-trash:hover { color:var(--danger); background:var(--na); }

.bpm-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(3px); z-index:1250; opacity:0; visibility:hidden; transition:all .2s; }
.bpm-overlay.open { opacity:1; visibility:visible; }
.bpm-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%) scale(.97); width:560px; max-width:94vw; max-height:84vh; background:var(--surface); border:1px solid var(--line2); border-radius:8px; z-index:1251; display:flex; flex-direction:column; box-shadow:0 18px 50px rgba(0,0,0,.4); opacity:0; visibility:hidden; transition:all .2s; }
.bpm-modal.open { opacity:1; visibility:visible; transform:translate(-50%,-50%) scale(1); }
.bpm-head { display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--line); }
.bpm-badge { width:30px; height:30px; background:var(--gold); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.bpm-badge svg { width:16px; height:16px; stroke:var(--bg); }
.bpm-htxt { flex:1; min-width:0; }
.bpm-head h3 { font-size:12px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--text); margin:0; }
.bpm-sub { font-size:10px; color:var(--text2); margin-top:2px; }
.bpm-overall { font-family:var(--mono); font-size:12px; color:var(--gold-text); font-weight:700; white-space:nowrap; }
.bpm-close { background:transparent; border:none; color:var(--text2); font-size:22px; line-height:1; cursor:pointer; padding:2px 6px; }
.bpm-close:hover { color:var(--gold-text); }
.bpm-list { flex:1; overflow-y:auto; padding:12px 18px; display:flex; flex-direction:column; gap:9px; }
.bpm-row { display:flex; align-items:center; gap:10px; }
.bpm-state { width:18px; height:18px; border-radius:50%; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; background:var(--surface2); border:1px solid var(--line2); color:var(--steel); }
.bpm-state svg { width:11px; height:11px; }
.bpm-row.processing .bpm-state { background:var(--ga); border-color:var(--gold); color:var(--gold-text); }
.bpm-row.done .bpm-state { background:var(--success-bg); border-color:var(--success); color:var(--success); }
.bpm-main { flex:1; min-width:0; }
.bpm-name { font-family:var(--mono); font-size:.66rem; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bpm-bar { height:5px; background:var(--na); border-radius:3px; overflow:hidden; margin-top:4px; }
.bpm-bar > i { display:block; height:100%; width:0; background:var(--steel); transition:width .2s, background .2s; border-radius:3px; }
.bpm-row.processing .bpm-bar > i { background:var(--gold); }
.bpm-row.done .bpm-bar > i { background:var(--success); width:100% !important; }
.bpm-pct { font-family:var(--mono); font-size:.62rem; width:40px; text-align:right; flex-shrink:0; color:var(--text2); }
.bpm-row.processing .bpm-pct { color:var(--gold-text); }
.bpm-row.done .bpm-pct { color:var(--success); }
.bpm-foot { padding:10px 18px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:8px; }

.logs-card.collapsed { flex-grow:0; min-height:0; }
.logs-card.collapsed .terminal-box { flex-grow:0; flex-basis:auto; height:auto; min-height:0; max-height:2.6em; padding:8px var(--whc-space-4); overflow:hidden; }
.logs-card.collapsed .terminal-line:not(:last-child) { display:none; }
.logs-toggle svg { transition: transform .2s; }
.logs-card:not(.collapsed) .logs-toggle svg { transform: rotate(180deg); }

.cfm-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(3px); z-index:1260; opacity:0; visibility:hidden; transition:all .2s; }
.cfm-overlay.open { opacity:1; visibility:visible; }
.cfm-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%) scale(.97); width:420px; max-width:92vw; background:var(--surface); border:1px solid var(--line2); border-radius:8px; z-index:1261; box-shadow:0 18px 50px rgba(0,0,0,.4); opacity:0; visibility:hidden; transition:all .2s; }
.cfm-modal.open { opacity:1; visibility:visible; transform:translate(-50%,-50%) scale(1); }
.cfm-body { padding:18px 20px; }
.cfm-title { font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--gold-text); margin-bottom:8px; }
.cfm-msg { font-size:13px; color:var(--text); line-height:1.6; }
.cfm-foot { display:flex; justify-content:flex-end; gap:10px; padding:0 20px 18px; }
.bl-clear-row { display:flex; justify-content:center; padding: var(--whc-space-4) 0 var(--whc-space-1); }
.bl-clear-btn { width:auto; padding: var(--whc-space-2) var(--whc-space-10); font-family:var(--font); font-size:var(--whc-text-xs); font-weight:var(--whc-fw-bold); text-transform:uppercase; letter-spacing:var(--whc-tracking-wide); background:transparent; border:1px solid var(--gold); color:var(--gold-text); border-radius:var(--whc-radius-sm); cursor:pointer; transition:all var(--whc-duration-fast) var(--whc-ease); }
.bl-clear-btn:hover { background:var(--ga); color:var(--gold-text); }

/* === PANEL DE PROGRESO INTEGRADO (single + lote) === */
.progress-panel .panel-header h3 { color: var(--gold-text) !important; }
.pp-overall { font-family:var(--mono); font-size:var(--whc-text-sm); font-weight:700; color:var(--gold-text); }
.bpm-row .bpm-state { transition: background .2s, border-color .2s, color .2s; }
.bpm-row.done-clean .bpm-bar { display:none; }
.bpm-row.done-clean .bpm-pct { display:none; }
.bpm-row.done-clean .bpm-state { width:20px; height:20px; }
.bpm-row.done-clean .bpm-name { font-size:.72rem; }
.pp-body { position:relative; display:flex; flex-direction:column; gap:10px; max-height:300px; overflow-y:auto; margin-top:var(--whc-space-2); padding-right:6px; scroll-behavior:smooth; }

/* === VISTAS (tabs) + IMAGE CONVERTER === */
.view[hidden] { display: none; }
.img-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--whc-space-6); align-items: start; }
.ic-right { display: flex; flex-direction: column; gap: var(--whc-space-6); min-width: 0; }
@media (max-width: 1024px) { .img-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   VIDEO PLAYER NATIVO (minimal)
   ===================================================================== */
video::-webkit-media-controls-enclosure { border-radius: 0 !important; overflow: hidden !important; background-color: rgba(13,17,23,.9) !important; border-top: var(--whc-border-hairline) solid var(--line) !important; }
video::-webkit-media-controls-panel { background-color: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
video::-webkit-media-controls-current-time-display, video::-webkit-media-controls-time-remaining-display { color: #fff !important; font-family: var(--font) !important; font-size: var(--whc-text-xs) !important; opacity: 0.85 !important; }
video::-webkit-media-controls-timeline, video::-webkit-media-controls-volume-slider { border-radius: 0 !important; }

/* === IMAGE CONVERTER · ajustes carrusel/papelera/output (06-06-2026) === */
#ic-clear { display: none; }
#ic-clear-row { width: 100%; }

.svg-output-card { grid-column: 1 / -1; }
.file-input-wrapper.has-file { overflow: visible; }
.thumbnail-container .btn-clear-file[data-tooltip]::after { left: auto; right: 0; transform: translateX(0) translateY(8px); }
.thumbnail-container .btn-clear-file[data-tooltip]:hover::after { transform: translateX(0) translateY(0); }
.ic-carousel { display: flex; gap: var(--whc-space-3); overflow-x: auto; width: 100%; padding: var(--whc-space-2) 2px var(--whc-space-3); align-items: flex-start; }
.ic-carousel .ic-cthumb { flex: 0 0 auto; width: 128px; }
.media-preview-box .ic-carousel img { width: 128px; height: 96px; object-fit: cover; display: block; border: var(--whc-border-hairline) solid var(--line); background: var(--bg-deep); opacity: .85; transition: opacity var(--whc-duration-fast) var(--whc-ease); }
.media-preview-box .ic-carousel img:hover { opacity: 1; }
.ic-carousel .ic-cname { font-size: 9px; color: var(--text2); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; max-width: 128px; }

.bres-red.good, .bres-sum-red.good { color: var(--success); }
.bres-red.grew, .bres-sum-red.grew { color: var(--danger); }

/* ====== G1/G2: presets · comparador · HEIC · hints (Brand v2.3) ====== */
.ic-presets-row { flex-wrap: wrap; }
.ic-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ic-preset { font: 600 11px/1 var(--font, Inter, sans-serif); letter-spacing: .04em; text-transform: uppercase; padding: 7px 11px; border-radius: 7px; cursor: pointer; color: var(--text2); background: var(--surface2); border: 1px solid var(--line); transition: all .15s ease; }
.ic-preset:hover { color: var(--text); border-color: var(--gold); }
.ic-preset.active { color: var(--c-carbon, #0D1117); background: var(--gold); border-color: var(--gold); }
.ic-hint { font-size: 11px; color: var(--text2); opacity: .85; }

.ic-compare { width: 100%; margin: 0 0 14px; }
.ic-cmp-stage { position: relative; width: 100%; max-height: 460px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: repeating-conic-gradient(rgba(140,151,160,.10) 0% 25%, transparent 0% 50%) 50% / 22px 22px; user-select: none; }
.ic-cmp-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.ic-cmp-after { position: relative; z-index: 1; }
.ic-cmp-before { position: absolute; top: 0; left: 0; height: 100%; width: 50%; overflow: hidden; z-index: 2; border-right: 2px solid var(--gold); }
.ic-cmp-before img { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; }
.ic-cmp-divider { position: absolute; top: 0; left: 50%; height: 100%; width: 2px; background: var(--gold); transform: translateX(-1px); z-index: 3; pointer-events: none; }
.ic-cmp-divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.25); }
.ic-cmp-tag { position: absolute; bottom: 8px; z-index: 4; font: 700 10px/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 5px; background: rgba(13,17,23,.72); color: #fff; }
.ic-cmp-tag-l { left: 8px; } .ic-cmp-tag-r { right: 8px; }
.ic-cmp-range { width: 100%; margin-top: 8px; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 50%, rgba(140,151,160,.28) 50%); cursor: ew-resize; }
.ic-cmp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface); cursor: ew-resize; }

.ic-heic-ph, .ic-cthumb-heic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; color: var(--text2); }
.ic-heic-badge { font: 800 12px/1 var(--mono, monospace); letter-spacing: .12em; color: var(--c-carbon, #0D1117); background: var(--gold); padding: 5px 9px; border-radius: 6px; }
.ic-heic-ph span, .ic-cthumb-heic .ic-cname { font-size: 11px; color: var(--text2); word-break: break-all; text-align: center; }

/* ============================================================
   IMAGE EDITOR (pestaña 3) — Brand TEKTA v2.3
   ============================================================ */
#view-editor { height: 100%; }
.ed-shell { height: 100%; min-height: 540px; display: flex; flex-direction: column; }

/* Estado vacío / carga */
.ed-empty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.ed-drop {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  width: min(560px, 92%); padding: 48px 36px; cursor: pointer;
  border: 2px dashed var(--line2); border-radius: 14px; background: var(--surface);
  color: var(--text2); transition: border-color .15s, background .15s, color .15s;
}
.ed-drop:hover, .ed-drop.drag { border-color: var(--gold); color: var(--gold-text); background: var(--surface2); }
.ed-drop svg { color: var(--gold); opacity: .9; }
.ed-drop-title { font-weight: 700; color: var(--text); font-size: 1rem; margin: 4px 0 0; }
.ed-drop-sub { font-size: .82rem; color: var(--text2); margin: 0; }

/* Layout del editor: toolbar | stage | panel */
.ed-work { flex: 1; display: flex; gap: 14px; min-height: 0; padding: 14px; }
.ed-toolbar {
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; align-self: flex-start;
}
.ed-tool, .ed-act {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text2); border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.ed-tool:hover, .ed-act:hover { background: var(--surface2); color: var(--text); }
.ed-tool.active { background: var(--surface2); color: var(--gold-text); border-color: var(--gold); }
.ed-act:disabled { cursor: default; }
.ed-tool-sep { height: 1px; margin: 4px 2px; background: var(--line2); }

/* Stage del lienzo */
.ed-stage {
  flex: 1; min-width: 0; min-height: 360px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%),
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%);
  background-size: 22px 22px; background-position: 0 0, 11px 11px;
}
.ed-canvas-wrap { position: relative; line-height: 0; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.ed-canvas-wrap canvas { display: block; max-width: 100%; max-height: 100%; }
#ed-canvas { background: transparent; }
.cancel-hint { font-size: .72rem; color: var(--text2); margin: 6px 0 0; text-align: center; line-height: 1.35; }
#btn-cancel-process { width: 100%; }
.ed-bg-status { font: 600 .76rem var(--mono); color: var(--gold-text); }
.ed-progress { position: relative; height: 8px; margin-top: 10px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.ed-progress-bar { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 4px; transition: width .15s ease; }
.ed-progress.indet .ed-progress-bar { width: 40%; transition: none; animation: ed-indet 1.1s infinite ease-in-out; }
@keyframes ed-indet { 0% { margin-left: -45%; } 100% { margin-left: 105%; } }
#ed-overlay { position: absolute; top: 0; left: 0; pointer-events: none; }

/* Panel de controles (derecha) */
.ed-panel { width: 248px; flex: none; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.ed-grp { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; }
.ed-grp-title { margin: 0 0 10px; font: 700 .72rem/1 var(--mono); letter-spacing: .12em; color: var(--gold-text); display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; user-select: none; }
.ed-grp-title::after { content: '▾'; font-size: .9em; line-height: 1; color: var(--gold-text); transition: transform .15s ease; }
.ed-grp.collapsed > .ed-grp-title { margin-bottom: 0; }
.ed-grp.collapsed > .ed-grp-title::after { transform: rotate(-90deg); }
.ed-grp.collapsed > :not(.ed-grp-title) { display: none !important; }
.ed-grp-title:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
.ed-dims { display: flex; gap: 8px; margin-bottom: 8px; }
.ed-field { flex: 1; display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--text2); }
.ed-field input {
  width: 100%; min-width: 0; padding: 6px 7px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line2); border-radius: 6px; font: 600 .82rem var(--mono); text-align: right;
}
.ed-field input:focus { outline: none; border-color: var(--gold); }
.ed-unit { color: var(--text2); font-size: .72rem; }
.ed-link { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--text2); margin: 4px 0 10px; cursor: pointer; }
.ed-link input { accent-color: var(--gold); }
.ed-hint { font-size: .76rem; color: var(--text2); margin: 0 0 9px; line-height: 1.45; }
.ed-meta { font: 600 .82rem var(--mono); color: var(--text); margin-bottom: 10px; }
.ed-btn-row { display: flex; gap: 8px; margin-top: 6px; }
.ed-btn {
  flex: 1; padding: 8px 10px; font: 600 .8rem var(--font); cursor: pointer;
  background: var(--surface2); color: var(--text); border: 1px solid var(--line2); border-radius: 7px;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.ed-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-text); }
.ed-btn:disabled { cursor: default; }
.ed-btn.primary { background: var(--gold); color: #0D1117; border-color: var(--gold); font-weight: 700; }
.ed-btn.primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #0D1117; }

/* Panel de propiedades (F2) */
.ed-prop-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.ed-prop-lbl { flex: none; width: 50px; font-size: .76rem; color: var(--text2); }
.ed-prop-val { flex: none; width: 30px; text-align: right; font: 600 .78rem var(--mono); color: var(--text); }
.ed-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-swatch { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--line2); cursor: pointer; padding: 0; transition: transform .1s, border-color .1s; }
.ed-swatch:hover { transform: scale(1.08); }
.ed-swatch.active { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.ed-range { flex: 1; min-width: 0; accent-color: var(--gold); }
.ed-select { flex: 1; min-width: 0; padding: 6px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line2); border-radius: 6px; font: 600 .82rem var(--font); }
.ed-select:focus { outline: none; border-color: var(--gold); }
.ed-text-input { width: 100%; padding: 7px 9px; background: var(--bg); color: var(--text); border: 1px solid var(--line2); border-radius: 6px; font: 500 .85rem var(--font); }
.ed-text-input:focus { outline: none; border-color: var(--gold); }

@media (max-width: 880px) {
  .ed-work { flex-direction: column; }
  .ed-toolbar { flex-direction: row; flex-wrap: wrap; align-self: stretch; }
  .ed-tool-sep { width: 1px; height: auto; margin: 2px 4px; }
  .ed-panel { width: 100%; }
}

/* =====================================================================
   F4 · LICENCIA — splash (gate), banner trial, settings, modales de marca
   Tokens duales de MEDIA (--gold/--surface/--line…). El banner va EN FLUJO.
   ===================================================================== */
#tekta-splash {
  position: fixed; inset: 0; z-index: 99999; display: none;
  align-items: center; justify-content: center;
  background: rgba(13,17,23,.92); backdrop-filter: blur(4px);
}
:root[data-theme="light"] #tekta-splash { background: rgba(245,242,235,.92); }
#tekta-splash.on { display: flex; }
#tekta-settings {
  position: fixed; inset: 0; z-index: 99998; display: none;
  align-items: center; justify-content: center; background: rgba(13,17,23,.78);
}
#tekta-settings.on { display: flex; }
.tg-card {
  background: var(--surface); border: 1px solid var(--line2);
  border-top: 2px solid var(--gold); border-radius: 10px;
  width: min(440px, 92vw); padding: 32px 34px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); color: var(--text);
  font-family: var(--font, Inter, system-ui, sans-serif);
  animation: tg-pop .18s ease-out;
}
@keyframes tg-pop { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.tg-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.tg-logo svg { width: 32px; height: 32px; }
.tg-logo .wm { font-weight: 900; font-size: 16px; letter-spacing: .09em; }
.tg-logo .wm b { color: var(--gold); }
.tg-h { font-size: 19px; font-weight: 700; margin: 0 0 6px; }
.tg-sub { font-size: 13px; color: var(--steel); margin: 0 0 20px; line-height: 1.55; }
.tg-field { margin-bottom: 4px; }
.tg-field label { display: block; font-size: 11.5px; color: var(--steel); margin-bottom: 6px; }
.tg-input {
  width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--line2);
  border-radius: 6px; padding: 11px 13px; color: var(--text);
  font-family: 'JetBrains Mono','Consolas',monospace; font-size: 13px;
  text-transform: uppercase; outline: none; transition: border-color .15s;
}
.tg-input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,175,55,.18); }
.tg-btn { display: block; width: 100%; border-radius: 6px; padding: 12px 14px;
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; margin-top: 10px; }
.tg-btn-primary { background: var(--gold); color: #0D1117; }
.tg-btn-primary:hover { filter: brightness(1.08); }
.tg-btn-ghost { background: transparent; color: var(--text); border-color: var(--line2); }
.tg-btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.tg-sep { text-align: center; color: var(--steel); font-size: 12px; margin: 14px 0 4px; }
.tg-link { display: block; text-align: center; margin-top: 18px; font-size: 12.5px;
  color: var(--gold); text-decoration: none; cursor: pointer; }
.tg-err { color: var(--danger); font-size: 12px; margin-top: 8px; min-height: 16px; }
.tg-note { font-size: 11px; color: var(--steel); margin-top: 16px; line-height: 1.5;
  border-top: 1px solid var(--line); padding-top: 12px; }
.tg-adv-hdr { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--steel);
  text-transform: uppercase; margin: 6px 0 10px; }
.tg-set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--line); }
.tg-set-row .lbl { font-size: 13px; font-weight: 600; }
.tg-set-row .desc { font-size: 11px; color: var(--steel); margin-top: 2px; }
.tg-seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; }
.tg-seg button { background: transparent; color: var(--text); border: none; padding: 7px 14px;
  font-size: 12px; font-weight: 700; cursor: pointer; }
.tg-seg button.active { background: var(--gold); color: #0D1117; }

/* Banner trial en flujo (no fixed): no roba clicks a la topbar */
#tekta-trial-banner {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; font-family: var(--font); font-size: 12px; line-height: 1.35;
  background: linear-gradient(90deg, rgba(212,175,55,.18), rgba(212,175,55,.08));
  border-bottom: 1px solid var(--gold); color: var(--gold-text);
}
#tekta-trial-banner.on { display: flex; }
#tekta-trial-banner.expired {
  background: var(--danger-bg); border-bottom-color: var(--danger); color: var(--danger);
}
#tekta-banner-text { flex: 1; min-width: 220px; font-weight: 700; }
.tg-banner-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
#tekta-banner-buy, #tekta-banner-haskey { color: inherit; text-decoration: underline; cursor: pointer; font-weight: 600; }
#tekta-trial-banner .tg-x { cursor: pointer; opacity: .7; }
#tekta-trial-banner .tg-x:hover { opacity: 1; }

/* ===================== PESTAÑA COMPRIMIR (ZIP) ===================== */
.zip-drop.drag { border-color: var(--gold); background: var(--whc-gold-fill-10); }
.zip-add-btns { display: flex; gap: var(--whc-space-3); flex-wrap: wrap; justify-content: center; }
.btn-file-label.zip-alt { background: transparent; color: var(--gold-text); border: 1px solid var(--line2); }
.btn-file-label.zip-alt:hover { border-color: var(--gold); color: var(--gold); }
.zip-hint { margin-top: var(--whc-space-3); font-size: var(--whc-text-xs); color: var(--text2); text-align: center; }
.zip-note { font-size: var(--whc-text-xs); color: var(--text2); line-height: 1.5; margin: 0 0 var(--whc-space-3); padding: var(--whc-space-2) var(--whc-space-3); border-left: 2px solid var(--line2); background: var(--surface2); }
.zip-pill { font: 600 11px/1 var(--font, Inter, sans-serif); letter-spacing: .04em; text-transform: uppercase; padding: 7px 11px; border-radius: 7px; cursor: pointer; color: var(--text2); background: var(--surface2); border: 1px solid var(--line); transition: all .15s ease; }
.zip-pill:hover { color: var(--text); border-color: var(--gold); }
.zip-pill.active { color: var(--c-carbon, #0D1117); background: var(--gold); border-color: var(--gold); }
.zip-modes .zip-pill { flex: 1; }
.zip-name-input { width: 100%; box-sizing: border-box; }
.zip-pass-block { flex-direction: column; gap: var(--whc-space-2); align-items: stretch; }
.zip-strength { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.zip-strength > span { display: block; height: 100%; width: 0; transition: width .2s ease; }
.zip-strength > span.weak { background: var(--danger); }
.zip-strength > span.mid { background: var(--gold); }
.zip-strength > span.strong { background: var(--color-green, #3FB950); }
.ic-hint.zip-err { color: var(--danger); }

/* Lista de archivos */
.zip-list-head { display: flex; align-items: center; gap: var(--whc-space-2); font-size: var(--whc-text-xs); letter-spacing: var(--whc-tracking-wider); text-transform: uppercase; color: var(--gold-text); font-weight: var(--whc-fw-semibold); margin-bottom: var(--whc-space-3); }
.zip-count { color: var(--text2); font-weight: var(--whc-fw-regular); }
.zip-list-head .bl-clear-btn { margin-left: auto; }
.zip-row { display: flex; align-items: center; gap: var(--whc-space-2); padding: var(--whc-space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--whc-text-sm); }
.zip-row-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.zip-tag { font-size: 10px; color: var(--gold-text); border: 1px solid var(--line2); border-radius: 3px; padding: 1px 5px; white-space: nowrap; }
.zip-row-size { color: var(--text2); font-size: var(--whc-text-xs); min-width: 56px; text-align: right; }
.zip-row-x { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 13px; padding: 2px 4px; line-height: 1; }
.zip-row-x:hover { color: var(--danger); }
.zip-row-sum { border-bottom: none; font-weight: var(--whc-fw-semibold); color: var(--gold-text); }
.zip-row-sum .zip-row-name { color: var(--gold-text); }

/* Progreso */
.zip-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: var(--whc-space-2); }
.zip-bar > span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .15s ease; }
.zip-status { font-size: var(--whc-text-xs); color: var(--text2); margin: 0; min-height: 1em; }

/* Resultado */
.zip-result-row { display: flex; align-items: center; justify-content: space-between; gap: var(--whc-space-3); margin-bottom: var(--whc-space-3); }
.zip-result-name { font-weight: var(--whc-fw-semibold); color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.zip-result-size { color: var(--gold-text); font-size: var(--whc-text-sm); white-space: nowrap; }
.zip-lock { font-size: 11px; color: var(--gold); border: 1px solid var(--line2); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }
.zip-result-actions { display: flex; gap: var(--whc-space-3); flex-wrap: wrap; }
.zip-result-actions .btn { flex: 1; min-width: 140px; }

/* Distintivo "NUEVO" en la pestaña COMPRIMIR */
.whc-tab-btn .tab-new { display: inline-block; margin-left: 6px; padding: 1px 5px; font-size: 8px; font-weight: 700; letter-spacing: .06em; line-height: 1.4; vertical-align: middle; color: var(--c-carbon, #0D1117); background: var(--gold); border-radius: 3px; text-transform: uppercase; }
.whc-tab-btn.active .tab-new { background: var(--c-carbon, #0D1117); color: var(--gold); border: 1px solid var(--gold); padding: 0 4px; }

/* Panel de protección/cifrado dentro de COMPRIMIR */
.zip-protect { margin: var(--whc-space-3) 0; padding: var(--whc-space-3); border: 1px solid var(--line2); border-left: 3px solid var(--gold); border-radius: var(--whc-radius-sm, 6px); background: var(--surface2); }
.zip-protect-head { font-weight: var(--whc-fw-semibold); }
.zip-protect-body { display: none; flex-direction: column; gap: var(--whc-space-3); margin-top: var(--whc-space-3); }
.zip-enc-levels { display: flex; gap: 6px; }
.zip-enc-note { margin: 0; }
.zip-pass-block { display: flex; flex-direction: column; gap: var(--whc-space-2); align-items: stretch; }
.zip-pass-field { position: relative; display: flex; }
.zip-pass-field input { flex: 1; padding-right: 34px; }
.zip-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text2); cursor: pointer; padding: 4px; line-height: 0; }
.zip-eye:hover, .zip-eye.on { color: var(--gold); }
.zip-warn { margin: 0; font-size: var(--whc-text-xs); color: var(--danger); line-height: 1.5; padding: var(--whc-space-2) var(--whc-space-3); background: var(--danger-bg, rgba(248,81,73,.08)); border-radius: var(--whc-radius-sm, 6px); }

/* Botón "Comprimir en ZIP" en los resultados (hook) */
.zip-hook-row { margin-top: var(--whc-space-3); text-align: center; }
.zip-hook-btn svg { vertical-align: middle; margin-right: 6px; }

/* ===================== EDICIÓN POR LOTES (editor) ===================== */
.ed-batch { padding: var(--whc-space-4); }
.ed-batch-bar { display: flex; align-items: center; gap: var(--whc-space-3); margin-bottom: var(--whc-space-4); padding-bottom: var(--whc-space-3); border-bottom: 1px solid var(--line); }
.ed-batch-title { font-size: var(--whc-text-sm); font-weight: var(--whc-fw-semibold); letter-spacing: var(--whc-tracking-wider); text-transform: uppercase; color: var(--gold-text); }
.ed-batch-bar-actions { margin-left: auto; display: flex; gap: var(--whc-space-2); }
.ed-btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--text2); }
.ed-btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.ed-batch-main { display: grid; grid-template-columns: 1fr 280px; gap: var(--whc-space-4); align-items: start; }
@media (max-width: 820px) { .ed-batch-main { grid-template-columns: 1fr; } }
.ed-batch-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--whc-space-3); max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.ed-bt-card { position: relative; border: 1px solid var(--line); border-radius: var(--whc-radius-sm, 6px); background: var(--surface); padding: 8px; }
.ed-bt-card.done { border-color: var(--color-green, #3FB950); }
.ed-bt-card.err { border-color: var(--danger); }
.ed-bt-card.proc { border-color: var(--gold); }
.ed-bt-thumb { aspect-ratio: 1 / 1; background: var(--surface2); border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ed-bt-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ed-bt-name { font-size: 11px; color: var(--text); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-bt-st { font-size: 10px; color: var(--text2); margin-top: 2px; }
.ed-bt-card.done .ed-bt-st { color: var(--color-green, #3FB950); }
.ed-bt-card.err .ed-bt-st { color: var(--danger); }
.ed-bt-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 11px; line-height: 1; }
.ed-bt-x:hover { background: var(--danger); }
.ed-batch-panel { border: 1px solid var(--line); border-radius: var(--whc-radius-sm, 6px); background: var(--surface); padding: var(--whc-space-4); display: flex; flex-direction: column; gap: var(--whc-space-3); position: sticky; top: 12px; }
.ed-batch-params { display: flex; flex-direction: column; gap: var(--whc-space-2); }
.ed-bt-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--whc-text-xs); color: var(--text2); }
.ed-bt-field input, .ed-bt-field select { width: 100%; box-sizing: border-box; }
.ed-batch-prog .zip-bar { margin-bottom: 6px; }
.ed-batch-done { display: none; flex-direction: column; gap: var(--whc-space-2); }

/* Demo: COMPRIMIR / cifrado / lote son de escritorio (refuerzan €149) */
/* Demo: COMPRIMIR visible como teaser (cap 1 archivo <1MB); lote y hooks siguen siendo de escritorio */
:root[data-demo] #ed-load-batch,
:root[data-demo] #btn-zip-hook,
:root[data-demo] .zip-hook-btn,
:root[data-demo] #zip-add-dir { display: none !important; }
.zip-demo-note { display: none; }
:root[data-demo] .zip-demo-note { display: block; font-size: var(--whc-text-xs); color: var(--gold-text); background: var(--whc-gold-fill-10); border-left: 2px solid var(--gold); border-radius: 6px; padding: 8px 10px; margin: 0 0 var(--whc-space-3); line-height: 1.5; }

/* Póster de vídeo por canvas (bitmap real; en Electron el <video> pausado se pinta en negro) */
.media-preview-box can
/* Marcador de carga mientras FFmpeg genera la miniatura del vídeo */
.media-loading { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text2); opacity: .45; }

/* Editor: botón overlay 'cambiar imagen' sobre el lienzo */
.ed-stage { position: relative; }
.ed-stage-change { position: absolute; top: 10px; right: 10px; z-index: 12; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); border-radius: 7px; background: rgba(13,17,23,.6); color: var(--gold); cursor: pointer; transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.ed-stage-change:hover { border-color: var(--gold); background: rgba(13,17,23,.9); transform: scale(1.06); }
/* En IMAGE EDITOR, ocultar las flechas undo/redo de la barra superior (pertenecen a otra pestaña) */
:root[data-view="editor"] #undo-btn, :root[data-view="editor"] #redo-btn { display: none; }
