:root { --bg: #0d1118; --surface: #161b26; --surface2: #1c2232; --border: #263040; --accent: #3BA2A4; --accent-hi:#4DC4C6; --accent2: #4f8ef7; --gold: #f5c842; --danger: #ff5f5f; --text: #e8eaf0; --muted: #7a8899; --node-dec: #4f8ef7; --node-cha: #3BA2A4; --node-ter: #9b7ff4; --optimal: #f5c842; --brand: #3BA2A4; } * { margin:0; padding:0; box-sizing:border-box; } body { font-family: 'Syne', sans-serif; background: var(--bg); color: var(--text); height: 100%; display: flex; flex-direction: column; overflow: hidden; } /* ── HEADER ── */ header { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 44px; background: var(--surface); border-bottom: 1px solid var(--border); border-top: 2px solid var(--brand); flex-shrink: 0; } .logo { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: var(--brand); text-transform: uppercase; } .logo span { color: var(--muted); font-weight: 400; } .logo .brand-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin: 0 2px 1px; vertical-align: middle; } .version-badge { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); background: var(--border); padding: 2px 7px; border-radius: 4px; } .header-sep { flex: 1; } .header-btn { font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 5px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; transition: all .15s; letter-spacing: 0.04em; } .header-btn:hover { border-color: var(--accent-hi); color: var(--accent-hi); } .header-btn.primary { background: var(--brand); border-color: var(--brand); color: #0d1118; font-weight: 700; } .header-btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); } /* ── LAYOUT ── */ .workspace { display: flex; flex: 1; overflow: hidden; } /* ── SIDEBAR ── */ .sidebar { width: 220px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; } .sidebar-section { padding: 14px 14px 8px; border-bottom: 1px solid var(--border); } .sidebar-title { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; opacity: 0.8; } .tool-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-bottom: 4px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--text); font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; text-align: left; } .tool-btn:hover { background: var(--surface2); border-color: var(--border); } .tool-btn.active { background: var(--surface2); border-color: var(--accent); color: var(--accent); } .tool-icon { width: 26px; height: 26px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; } .icon-dec { background: rgba(79,142,247,.18); } .icon-cha { background: rgba(59,162,164,.18); } .icon-ter { background: rgba(155,127,244,.18); } /* Nodo SVG inline en botones */ .node-preview { display: flex; align-items: center; justify-content: center; } .legend-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 11px; color: var(--muted); } .legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; } /* Stats panel */ .stat-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 11px; border-bottom: 1px solid var(--border); } .stat-row:last-child { border: none; } .stat-label { color: var(--muted); } .stat-value { font-family: 'DM Mono', monospace; font-size: 12px; font-weight: 500; color: var(--accent); } .stat-value.gold { color: var(--gold); } /* ── CANVAS AREA ── */ .canvas-area { flex: 1; position: relative; overflow: hidden; background: var(--bg); background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 0); background-size: 28px 28px; } #tree-svg { width: 100%; height: 100%; cursor: default; } /* ── BOTTOM BAR ── */ .bottom-bar { height: 28px; background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; gap: 20px; font-size: 10px; color: var(--muted); font-family: 'DM Mono', monospace; flex-shrink: 0; } .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); } /* ── TOOLTIP ── */ .tooltip { position: absolute; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; font-size: 11px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 100; min-width: 140px; } .tooltip.visible { opacity: 1; } .tooltip-title { font-weight: 700; margin-bottom: 4px; font-size: 12px; } .tooltip-row { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); } .tooltip-val { font-family: 'DM Mono', monospace; color: var(--text); } /* ── MODAL ── */ .modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; } .modal-overlay.open { opacity: 1; pointer-events: all; } .modal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; width: 340px; transform: translateY(10px); transition: transform .2s; } .modal-overlay.open .modal { transform: translateY(0); } .modal-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text); } .modal-field { margin-bottom: 12px; } .modal-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; } .modal-input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; color: var(--text); font-family: 'Syne', sans-serif; font-size: 13px; outline: none; transition: border-color .15s; } .modal-input:focus { border-color: var(--accent); } .modal-row { display: flex; gap: 10px; } .modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; } .modal-btn { font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600; padding: 7px 16px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; background: transparent; color: var(--muted); transition: all .15s; } .modal-btn:hover { color: var(--text); border-color: var(--muted); } .modal-btn.confirm { background: var(--accent); border-color: var(--accent); color: #0f1117; } .modal-btn.confirm:hover { opacity: .85; } /* radio type selector */ .type-selector { display: flex; gap: 8px; } .type-opt { flex: 1; padding: 8px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600; cursor: pointer; text-align: center; transition: all .15s; } .type-opt.selected-dec { border-color: var(--node-dec); color: var(--node-dec); background: rgba(79,142,247,.1); } .type-opt.selected-cha { border-color: var(--node-cha); color: var(--node-cha); background: rgba(59,162,164,.1); } .type-opt.selected-ter { border-color: var(--node-ter); color: var(--node-ter); background: rgba(155,127,244,.1); } /* Botones de número de ramas */ .branch-opt { padding: 5px 10px; border-radius: 5px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .12s; } .branch-opt:hover { border-color: var(--accent); color: var(--accent); } .branch-opt.selected { border-color: var(--accent); color: var(--accent); background: rgba(59,162,164,.1); } /* Context menu */ .ctx-menu { position: absolute; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 4px; z-index: 300; min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,.4); display: none; } .ctx-menu.open { display: block; } .ctx-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer; transition: background .1s; } .ctx-item:hover { background: var(--border); } .ctx-item.danger { color: var(--danger); } .ctx-item.disabled { color: var(--muted); cursor: default; pointer-events: none; } .ctx-sep { height: 1px; background: var(--border); margin: 4px 2px; } .ctx-label { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 2px; } /* Undo/redo disabled state */ #btn-undo:disabled, #btn-redo:disabled { opacity: .35; cursor: default; } #btn-undo:disabled:hover, #btn-redo:disabled:hover { border-color: var(--border); color: var(--muted); } /* ── MODO PRESENTACIÓN ── */ body.presentation-mode header, body.presentation-mode .sidebar, body.presentation-mode .bottom-bar, body.presentation-mode .zoom-controls, body.presentation-mode .minimap, body.presentation-mode .sensitivity-panel, body.presentation-mode .modal-overlay { display: none !important; } body.presentation-mode .workspace { height: 100vh; } body.presentation-mode .canvas-area { flex: 1; height: 100vh; } #btn-present.active { color: var(--brand); border-color: var(--brand); } .presentation-exit { position: fixed; top: 16px; right: 16px; z-index: 9999; background: var(--surface2); border: 1px solid var(--brand); color: var(--brand); padding: 7px 14px; border-radius: 6px; font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700; cursor: pointer; display: none; } body.presentation-mode .presentation-exit { display: block; } /* ── MODAL CALCULADORA BAYESIANA ── */ .bayes-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 500; display: none; align-items: center; justify-content: center; } .bayes-overlay.open { display: flex; } .bayes-modal { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; width: 540px; max-width: 95vw; max-height: 90vh; overflow-y: auto; } .bayes-title { font-size: 14px; font-weight: 700; color: var(--brand); margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; } .bayes-sub { font-size: 10px; color: var(--muted); margin-bottom: 16px; } .bayes-section { margin-bottom: 14px; } .bayes-section-title { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); opacity: .8; margin-bottom: 8px; } .bayes-grid { display: grid; gap: 6px; } .bayes-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; align-items: center; } .bayes-row.header-row { font-size: 9px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; } .bayes-cell { font-size: 11px; } .bayes-input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; color: var(--text); font-family: 'DM Mono', monospace; font-size: 11px; outline: none; } .bayes-input:focus { border-color: var(--accent); } .bayes-label-input { background: transparent; border: none; border-bottom: 1px solid var(--border); color: var(--text); font-family: 'Syne', sans-serif; font-size: 11px; padding: 3px 0; outline: none; width: 100%; } .bayes-label-input:focus { border-bottom-color: var(--accent); } .bayes-result-table { width: 100%; border-collapse: collapse; font-size: 10px; font-family: 'DM Mono', monospace; } .bayes-result-table th { color: var(--muted); font-weight: 700; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: left; } .bayes-result-table td { padding: 5px 8px; border-bottom: 1px solid rgba(42,48,64,.5); color: var(--text); } .bayes-result-table tr:last-child td { border-bottom: none; } .bayes-result-table td.posterior { color: var(--brand); font-weight: 700; } .bayes-result-table td.total { color: var(--gold); font-weight: 700; } .bayes-actions { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; } .bayes-btn { padding: 7px 14px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600; cursor: pointer; transition: all .15s; } .bayes-btn:hover { border-color: var(--accent); color: var(--accent); } .bayes-btn.primary { background: var(--brand); border-color: var(--brand); color: #0d1118; font-weight: 700; } .bayes-btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); } .bayes-warn { font-size: 10px; color: var(--danger); margin-top: 6px; display: none; } /* Min/Max toggle activo */ #btn-minmax.minimizing { color: #ff9f4a; border-color: #ff9f4a; } /* Utility mode activo */ #btn-utility.utility-on { color: #c97ef7; border-color: #c97ef7; } /* ── ETIQUETAS DE TIPO DE PROBABILIDAD ── */ .prob-type-tag { font-size: 8px; font-weight: 700; padding: 1px 4px; border-radius: 3px; font-family: 'DM Mono', monospace; letter-spacing: .04em; } .tag-prior { fill: #4f8ef7; } .tag-likeli { fill: #f5c842; } .tag-posterior{ fill: #3BA2A4; } .tag-marginal { fill: #9b7ff4; } /* ── PANEL DE SENSIBILIDAD (overlay en canvas) ── */ .sensitivity-panel { position: absolute; top: 12px; right: 12px; width: 300px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; z-index: 100; display: none; box-shadow: 0 8px 32px rgba(0,0,0,.5); } .sensitivity-panel.open { display: block; } .sens-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; } .sens-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 2px; } .sens-close:hover { color: var(--text); } .sens-row { margin-bottom: 10px; } .sens-label { font-size: 10px; color: var(--muted); margin-bottom: 4px; } .sens-select { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 6px 8px; color: var(--text); font-family: 'Syne', sans-serif; font-size: 11px; outline: none; cursor: pointer; } .sens-select:focus { border-color: var(--accent); } .sens-slider-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .sens-slider { flex: 1; height: 3px; accent-color: var(--accent); } .sens-val { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--accent); min-width: 38px; text-align: right; } .sens-result { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px; font-size: 11px; line-height: 1.8; } .sens-result-row { display: flex; justify-content: space-between; } .sens-result-label { color: var(--muted); } .sens-result-val { font-family: 'DM Mono', monospace; color: var(--text); } .sens-result-val.changed { color: var(--danger); font-weight: 700; } .sens-threshold { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 10px; color: var(--muted); line-height: 1.6; } .sens-threshold strong { color: var(--gold); font-family: 'DM Mono', monospace; } /* Utilidad: panel config */ .utility-config { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-top: 6px; display: none; } .utility-config.open { display: block; } .utility-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; } .utility-row label { color: var(--muted); width: 60px; flex-shrink: 0; } .utility-input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 4px 7px; color: var(--text); font-family: 'DM Mono', monospace; font-size: 11px; outline: none; } .utility-input:focus { border-color: var(--accent); } /* ── VALIDACIÓN DE PROBABILIDADES ── */ .prob-warning { fill: #ff5f5f !important; stroke: #ff5f5f !important; } .prob-ok { fill: #3BA2A4 !important; stroke: #3BA2A4 !important; } /* Badge de suma de probabilidades en el nodo */ .prob-badge { position: absolute; font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 3px; pointer-events: none; z-index: 10; } .prob-badge.warn { background: rgba(255,95,95,.2); color: #ff5f5f; border: 1px solid #ff5f5f; } .prob-badge.ok { background: rgba(59,162,164,.12); color: #3BA2A4; border: 1px solid #3BA2A4; } /* Panel de advertencias Σp en sidebar */ .prob-alert-panel { margin-top: 8px; padding: 7px 9px; border-radius: 6px; background: rgba(255,95,95,.08); border: 1px solid rgba(255,95,95,.3); font-size: 10px; color: #ff9f9f; line-height: 1.6; display: none; } .prob-alert-panel.visible { display: block; } .prob-alert-row { display: flex; justify-content: space-between; align-items: center; } .prob-alert-id { font-family: 'DM Mono', monospace; color: #ff5f5f; font-weight: 600; } /* Insert node modal select */ .modal-select { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; color: var(--text); font-family: 'Syne', sans-serif; font-size: 12px; outline: none; cursor: pointer; } .modal-select:focus { border-color: var(--accent); } /* ── ZOOM CONTROLS ── */ .zoom-controls { position: absolute; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 4px; z-index: 50; } .zoom-btn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; user-select: none; } .zoom-btn:hover { border-color: var(--accent); color: var(--accent); } .zoom-level { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--muted); text-align: center; padding: 3px 0; background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; } /* SVG canvas pan cursor */ #tree-svg { cursor: grab; user-select: none; } #tree-svg.panning { cursor: grabbing; } #tree-svg.zoom-in-mode { cursor: zoom-in; } /* Minimap */ .minimap { position: absolute; bottom: 16px; left: 16px; width: 140px; height: 80px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; z-index: 50; opacity: 0.85; } .minimap-label { position: absolute; top: 4px; left: 6px; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); pointer-events: none; } #minimap-svg { width: 100%; height: 100%; }