/* =========================================================================
   DecodeFlow — Hoja de Estilos Completa (3 Temas: Oscuro, Claro, Clásico 98)
   ========================================================================= */

:root,
[data-theme="modern-dark"] {
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-elevated: #334155;
  --bg-canvas: #0b1120;
  --grid-dot: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  /* Flowchart Node Colors (Modern Dark) */
  --line-color: #94a3b8;
  --node-stroke: #cbd5e1;
  --node-text: #f8fafc;
  --shape-inicio: #1e3a8a;
  --shape-asignacion: #1e293b;
  --shape-mientras: #312e81;
  --shape-para: #064e3b;
  --shape-decision: #78350f;
  --shape-lectura: #134e4a;
  --shape-impresion: #4c1d95;
  --shape-llamada: #701a75;
  --shape-cierre: #334155;

  --node-selected-stroke: #38bdf8;
  --node-executing-stroke: #22c55e;
  --node-executing-glow: rgba(34, 197, 94, 0.45);
  --node-error-stroke: #ef4444;
  --font-ui: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  --radius: 6px;
}

[data-theme="modern-light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-canvas: #f8fafc;
  --grid-dot: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;

  --line-color: #334155;
  --node-stroke: #1e293b;
  --node-text: #0f172a;
  --shape-inicio: #dbeafe;
  --shape-asignacion: #fef9c3;
  --shape-mientras: #e0e7ff;
  --shape-para: #d1fae5;
  --shape-decision: #ffedd5;
  --shape-lectura: #ccfbf1;
  --shape-impresion: #f3e8ff;
  --shape-llamada: #fce7f3;
  --shape-cierre: #e2e8f0;

  --node-selected-stroke: #2563eb;
  --node-executing-stroke: #16a34a;
  --node-executing-glow: rgba(22, 163, 74, 0.35);
  --node-error-stroke: #dc2626;
}

/* Classic Smart DFD 1.1 / Windows 98 nostalgic theme */
[data-theme="retro-classic"] {
  --bg-app: #c0c0c0;
  --bg-surface: #d4d0c8;
  --bg-elevated: #e4e4e4;
  --bg-canvas: #ffffff;
  --grid-dot: transparent;
  --text-main: #000000;
  --text-muted: #333333;
  --border-color: #808080;
  --accent: #000080;
  --accent-strong: #0000a0;
  --accent-soft: rgba(0, 0, 128, 0.15);
  --danger: #aa0000;
  --success: #008000;
  --warning: #808000;

  --line-color: #000000;
  --node-stroke: #000000;
  --node-text: #000000;
  --shape-inicio: #c0c0c0;
  --shape-asignacion: #ffffcc;
  --shape-mientras: #ccffff;
  --shape-para: #ccffcc;
  --shape-decision: #ffcccc;
  --shape-lectura: #e6ccff;
  --shape-impresion: #ffff99;
  --shape-llamada: #ffcc99;
  --shape-cierre: #d4d0c8;

  --node-selected-stroke: #ff0000;
  --node-executing-stroke: #008000;
  --node-executing-glow: rgba(0, 128, 0, 0.3);
  --node-error-stroke: #ff0000;
  --font-ui: 'Tahoma', 'MS Sans Serif', sans-serif;
  --radius: 0px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 13px;
  user-select: none;
}

/* =========================================================================
   HEADER & MENU BAR
   ========================================================================= */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.brand-badge {
  background: var(--accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.file-name-badge {
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.menubar {
  display: flex;
  align-items: center;
  gap: 2px;
}

.menu-item {
  position: relative;
}

.menu-trigger {
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
}

.menu-trigger:hover,
.menu-item:focus-within .menu-trigger {
  background: var(--bg-elevated);
}

.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  padding: 5px;
  z-index: 500;
}

.menu-item:hover .menu-dropdown {
  display: flex;
  flex-direction: column;
}

.menu-dropdown button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  font-size: 12.5px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  gap: 14px;
}

.menu-dropdown button:hover {
  background: var(--accent);
  color: #ffffff;
}

.menu-dropdown button kbd {
  font-size: 10.5px;
  opacity: 0.75;
  font-family: var(--font-mono);
}

.menu-dropdown hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 4px 0;
}

.header-QuickActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-compact {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
}

.btn-icon {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  border-color: var(--accent);
}

/* =========================================================================
   MAIN TOOLBAR
   ========================================================================= */
.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.tool-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 0 4px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  min-width: 32px;
  padding: 0 7px;
  background: transparent;
  color: var(--text-main);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all 0.12s ease;
}

.tool-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.palette-btn svg {
  width: 25px;
  height: 18px;
}

.tool-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-color);
}

.tool-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.tool-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.danger-hover:hover:not(:disabled) {
  color: var(--danger);
  border-color: var(--danger);
}

.tool-text-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 4px;
  background: var(--bg-elevated);
  border-radius: 3px;
}

.btn-run {
  color: var(--success);
  font-weight: 600;
}

.btn-step {
  color: var(--accent);
  font-weight: 600;
}

.btn-pause {
  color: var(--warning);
}

.btn-stop {
  color: var(--danger);
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 0 6px;
  font-size: 12px;
}

.speed-control input[type="range"] {
  width: 68px;
  cursor: pointer;
}

.zoom-indicator {
  font-family: var(--font-mono);
  font-size: 11.5px;
  min-width: 44px;
  text-align: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.zoom-indicator:hover {
  background: var(--bg-elevated);
}

/* =========================================================================
   SUBPROGRAM TABS BAR
   ========================================================================= */
.subprograms-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
}

.tabs-scroll {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.sub-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.sub-tab .tab-close {
  opacity: 0.7;
  font-size: 11px;
  padding: 0 3px;
  border-radius: 3px;
}

.sub-tab .tab-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.25);
}

.btn-new-sub {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  padding: 3px 9px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11.5px;
}

.btn-new-sub:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

.tool-hint-banner {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================================
   WORKSPACE LAYOUT (Canvas + Console + Right Inspector)
   ========================================================================= */
.workspace {
  display: flex;
  height: calc(100vh - 38px - 43px - 34px - 26px);
  width: 100%;
  overflow: hidden;
}

.canvas-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.canvas-viewport {
  flex: 1;
  position: relative;
  background: var(--bg-canvas);
  overflow: hidden;
  outline: none;
  cursor: grab;
}

.canvas-viewport.dragging {
  cursor: grabbing;
}

.canvas-viewport.inserting-mode {
  cursor: crosshair;
}

#dfd-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-floating-tools {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  gap: 6px;
}

.float-btn {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 11.5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.float-btn:hover {
  border-color: var(--accent);
}

/* =========================================================================
   SVG FLOWCHART NODES & INSERTION POINTS
   ========================================================================= */
.dfd-node {
  cursor: pointer;
  transition: filter 0.12s ease;
}

.dfd-node:hover .node-shape {
  stroke-width: 2.4px;
  filter: brightness(1.08);
}

.dfd-node.selected .node-shape {
  stroke: var(--node-selected-stroke) !important;
  stroke-width: 3px !important;
  stroke-dasharray: none;
}

.dfd-node.executing .node-shape {
  stroke: var(--node-executing-stroke) !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 8px var(--node-executing-glow));
}

.dfd-node.error-node .node-shape {
  stroke: var(--node-error-stroke) !important;
  stroke-width: 3.5px !important;
}

.node-shape {
  stroke: var(--node-stroke);
  stroke-width: 1.8px;
  stroke-linejoin: round;
}

.node-label {
  fill: var(--node-text);
  font-family: var(--font-mono);
  font-size: 12px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.node-sublabel {
  fill: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
}

.branch-label {
  fill: var(--text-main);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.flow-line {
  stroke: var(--line-color);
  stroke-width: 1.8px;
  fill: none;
}

/* Interactive Insertion Dropzones when a Palette Tool is Active */
.insert-hotspot {
  cursor: copy;
}

.insert-hotspot circle.hotspot-bg {
  fill: var(--accent);
  stroke: #ffffff;
  stroke-width: 1.5px;
  opacity: 0.85;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.insert-hotspot:hover circle.hotspot-bg {
  opacity: 1;
  r: 10px;
  fill: var(--success);
}

.insert-hotspot text {
  fill: #ffffff;
  font-size: 12px;
  font-weight: bold;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

/* =========================================================================
   BOTTOM CONSOLE
   ========================================================================= */
.console-drawer {
  height: 155px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.console-drawer.collapsed {
  height: 32px;
}

.console-drawer.collapsed .console-body {
  display: none;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
  height: 32px;
}

.console-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 12px;
}

.status-pill {
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-idle { background: var(--bg-elevated); color: var(--text-muted); }
.status-running { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status-paused { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.status-error { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.console-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
}

.console-body {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: text;
}

.console-line {
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1.4;
  word-break: break-word;
}

.console-line.info { color: var(--text-muted); }
.console-line.output {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid var(--accent);
  color: var(--text-main);
}
.console-line.input {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--success);
  color: var(--text-main);
}
.console-line.error {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--danger);
  color: var(--danger);
  font-weight: 600;
}
.console-line.success {
  color: var(--success);
  font-weight: 600;
}

/* =========================================================================
   RIGHT INSPECTOR PANEL (Watch, Code Generator, Desk Check)
   ========================================================================= */
.inspector-panel {
  width: 370px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.inspector-panel.hidden {
  display: none;
}

.inspector-tabs {
  display: flex;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
}

.insp-tab {
  flex: 1;
  padding: 9px 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.insp-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-surface);
}

.insp-content {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 10px;
  gap: 12px;
  overflow-y: auto;
}

.insp-content.active {
  display: flex;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-count {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.table-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 250px;
  overflow-y: auto;
}

.trace-scroll {
  max-height: calc(100vh - 230px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  user-select: text;
}

.data-table th,
.data-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-app);
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.data-table td {
  font-family: var(--font-mono);
}

.empty-cell {
  text-align: center !important;
  color: var(--text-muted);
  font-family: var(--font-ui) !important;
  padding: 14px !important;
}

.callstack-list {
  list-style: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 6px;
  max-height: 110px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.callstack-list li {
  padding: 4px 6px;
  border-radius: 4px;
}

.callstack-list li.active-frame {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.quick-eval-box {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.quick-eval-row {
  display: flex;
  gap: 6px;
}

.quick-eval-row input {
  flex: 1;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
}

.quick-eval-result {
  font-family: var(--font-mono);
  font-size: 12px;
  min-height: 20px;
  padding: 4px 2px;
}

/* Code Preview Tab */
.code-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-preview {
  flex: 1;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
  user-select: text;
  white-space: pre;
}

/* =========================================================================
   STATUS BAR
   ========================================================================= */
.statusbar {
  height: 26px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-left {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-credits {
  flex-shrink: 0;
  padding: 0 14px;
  white-space: nowrap;
  color: var(--text-muted);
}

.status-credits strong {
  color: var(--accent);
  font-weight: 600;
}

.status-right {
  flex: 1;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .status-credits {
    display: none;
  }
}

.sep { opacity: 0.4; }

/* =========================================================================
   MODALS & DIALOGS (Classic DFD Editor Dialogs)
   ========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.hidden {
  display: none !important;
}

.modal-overlay.hidden {
  display: none;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 92%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 14px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 72vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-app);
  border-top: 1px solid var(--border-color);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  width: 100%;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.assign-row {
  display: grid;
  grid-template-columns: 1fr auto 1.6fr auto;
  align-items: center;
  gap: 8px;
}

.assign-arrow {
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 15px;
  color: var(--accent);
}

.radio-group {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 4px 0;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  cursor: pointer;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-xs {
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-main);
  border-color: var(--border-color);
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-xs {
  background: var(--bg-elevated);
  color: var(--text-main);
  border-color: var(--border-color);
  padding: 3px 8px;
  font-size: 11px;
}

.btn-xs:hover {
  border-color: var(--accent);
}

.help-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg-app);
  padding: 8px 10px;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  line-height: 1.45;
}

/* Print media */
@media print {
  .app-header, .toolbar, .subprograms-bar, .inspector-panel, .console-drawer, .statusbar, .canvas-floating-tools {
    display: none !important;
  }
  .workspace, .canvas-column, .canvas-viewport {
    height: 100vh !important;
    width: 100vw !important;
    background: #fff !important;
  }
}
