/* ==========================================================================
   Visual Node Algorithm Studio (Photoshop / Illustrator Style Canvas)
   ========================================================================== */

.studio-container {
  display: flex;
  height: calc(100vh - var(--header-height) - 40px);
  background: #080c14;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   Left Toolbox / Control Panel (Illustrator / Photoshop Style)
   -------------------------------------------------------------------------- */
.toolbox-panel {
  width: 260px;
  background: rgba(13, 18, 30, 0.95);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 20;
  user-select: none;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, padding 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.toolbox-panel.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  border-right: none !important;
  pointer-events: none !important;
}

.toolbox-header {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.toolbox-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toolbox-sections {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toolbox-category {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-title {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 4px;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: grab;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.1);
}

.tool-item:active {
  cursor: grabbing;
}

.tool-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
}

/* Category-specific icon accents */
.cat-price .tool-icon { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.cat-ind .tool-icon { background: rgba(139, 92, 246, 0.2); color: #c084fc; }
.cat-cond .tool-icon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.cat-logic .tool-icon { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.cat-out .tool-icon { background: rgba(244, 63, 94, 0.2); color: #fb7185; }

/* --------------------------------------------------------------------------
   Canvas & Workspace Area
   -------------------------------------------------------------------------- */
.workspace-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Studio Top Action Bar */
.studio-actionbar {
  height: 52px;
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  user-select: none;
}

.algo-meta-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.algo-name-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  width: 180px;
  outline: none;
}

.algo-name-input:focus {
  border-color: var(--accent-cyan);
}

.algo-select-dropdown {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-studio {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-studio:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.btn-studio.primary {
  background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 100%);
  color: #000;
  font-weight: 800;
  border: none;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

.btn-studio.primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.btn-studio.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
}

/* --------------------------------------------------------------------------
   Infinite Node Canvas
   -------------------------------------------------------------------------- */
.node-canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #080c14;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  cursor: default;
}

.node-canvas-container.panning {
  cursor: grabbing;
}

.wires-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Wire SVG Group & Hitbox */
.wire-group {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.wire-hitbox {
  fill: none;
  stroke: transparent;
  stroke-width: 20px;
  stroke-linecap: round;
  pointer-events: stroke;
  cursor: pointer;
}

.wire-path {
  fill: none;
  stroke: rgba(0, 240, 255, 0.75);
  stroke-width: 3.5px;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
  pointer-events: none;
  transition: stroke 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease;
}

/* Hover over wire group: wire glows red */
.wire-group:hover .wire-path {
  stroke: #ff3366 !important;
  stroke-width: 5px !important;
  filter: drop-shadow(0 0 12px rgba(255, 51, 102, 0.95)) !important;
}

.wire-path.active-pulse {
  stroke: #10b981;
  animation: pulseWire 1.5s infinite;
}

@keyframes pulseWire {
  0% { stroke-dashoffset: 0; stroke-dasharray: 8 4; }
  100% { stroke-dashoffset: -24; stroke-dasharray: 8 4; }
}

/* Glowing red border on nodes when hovering wire to cut */
.node-card.wire-disconnect-glow {
  border-color: #ff3366 !important;
  box-shadow: 0 0 24px rgba(255, 51, 102, 0.75), 0 0 8px #ff3366 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* --------------------------------------------------------------------------
   Node Card Component
   -------------------------------------------------------------------------- */
.node-card {
  position: absolute;
  width: 230px;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  user-select: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.node-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.node-card.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}

.node-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  cursor: move;
}

.node-header-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px;
  border-radius: 4px;
}

.node-delete-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

/* Category header accent bars */
.node-card[data-cat="price"] .node-header { background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), transparent); }
.node-card[data-cat="indicator"] .node-header { background: linear-gradient(90deg, rgba(139, 92, 246, 0.25), transparent); }
.node-card[data-cat="condition"] .node-header { background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), transparent); }
.node-card[data-cat="logic"] .node-header { background: linear-gradient(90deg, rgba(16, 185, 129, 0.25), transparent); }
.node-card[data-cat="output"] .node-header { background: linear-gradient(90deg, rgba(244, 63, 94, 0.25), transparent); }

.node-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node-param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.node-input-field {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  width: 70px;
  text-align: right;
}

.node-select-field {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  width: 90px;
}

.node-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.status-indicator-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.status-indicator-tag.true {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.status-indicator-tag.false {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* Ports Area */
.node-ports {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 10px 8px;
  position: relative;
}

.port-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.port-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.port-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid var(--accent-cyan);
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
  position: relative;
  cursor: crosshair;
  z-index: 30;
}

.port-dot:hover {
  transform: scale(1.45);
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.port-item.connected .port-dot {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}

.port-item.input {
  flex-direction: row;
}

.port-item.output {
  flex-direction: row-reverse;
}

/* Dragging Ghost Wire */
.ghost-wire {
  stroke: var(--accent-cyan);
  stroke-width: 2.5px;
  stroke-dasharray: 6 4;
  fill: none;
  pointer-events: none;
  filter: drop-shadow(0 0 6px var(--accent-cyan));
}

/* ==========================================================================
   Studio Right Drawer Panel (AgentDashboard Design Alignment)
   ========================================================================== */
.studio-right-panel {
  width: 380px;
  min-width: 340px;
  max-width: 440px;
  height: 100%;
  max-height: 100%;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.studio-right-panel.collapsed {
  display: none !important;
}

/* Tab Bar */
.studio-right-tabbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(10, 14, 23, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.studio-right-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-right-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.studio-right-tab-btn.active {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
}

.studio-right-tab-btn .tab-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.studio-right-tab-btn.active .tab-badge {
  background: rgba(168, 85, 247, 0.3);
  color: #e9d5ff;
}

/* Panel Body & Panes */
.studio-tab-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  overflow: hidden;
}

/* AI Model & Guardrail Banner */
.studio-ai-meta-banner {
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-ai-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-ai-model-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
}

.studio-guardrail-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  letter-spacing: 0.02em;
}

.studio-ai-guardrail-note {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Quick Prompts Bar */
.studio-quick-prompts-bar {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-quick-prompt {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-quick-prompt:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
  color: #f3e8ff;
  transform: translateY(-1px);
}

.btn-quick-prompt.highlight {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%);
  border-color: rgba(168, 85, 247, 0.5);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

.btn-quick-prompt.highlight:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(99, 102, 241, 0.35) 100%);
  border-color: rgba(168, 85, 247, 0.7);
}

/* Chat Messages Scroll Area */
.studio-chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.studio-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 92%;
  animation: fadeInMsg 0.2s ease-out;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.studio-chat-msg.user {
  align-self: flex-end;
}

.studio-chat-msg.assistant {
  align-self: flex-start;
  max-width: 96%;
}

.studio-chat-sender {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
}

.studio-chat-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.studio-chat-msg.user .studio-chat-bubble {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.studio-chat-msg.assistant .studio-chat-bubble {
  background: rgba(22, 27, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e6edf3;
  border-bottom-left-radius: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Markdown styling inside AI bubble */
.studio-chat-bubble p {
  margin: 0 0 8px 0;
}
.studio-chat-bubble p:last-child {
  margin-bottom: 0;
}
.studio-chat-bubble ul, .studio-chat-bubble ol {
  margin: 4px 0 8px 18px;
  padding: 0;
}
.studio-chat-bubble li {
  margin-bottom: 4px;
}
.studio-chat-bubble code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 5px;
  border-radius: 4px;
  color: #38bdf8;
  font-size: 11px;
}
.studio-chat-bubble strong {
  color: #ffffff;
  font-weight: 700;
}

/* Workflow Support Callout Card */
.workflow-alert-card {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 6px 0;
  font-size: 11px;
  line-height: 1.5;
  border-left: 3px solid;
}

.workflow-alert-card.warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: #fde68a;
}

.workflow-alert-card.error {
  background: rgba(239, 68, 68, 0.14);
  border-color: #ef4444;
  color: #fca5a5;
}

.workflow-alert-card.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #a7f3d0;
}

.workflow-alert-card.info {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3b82f6;
  color: #bfdbfe;
}

/* Chat Input Form */
.studio-chat-inputbar {
  padding: 10px 12px;
  background: rgba(10, 14, 23, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 8px;
  align-items: center;
}

.studio-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.studio-chat-input:focus {
  border-color: #c084fc;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.btn-studio-send {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-studio-send:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.btn-studio-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Inspector Tab Pane */
.studio-inspector-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-card {
  background: rgba(22, 27, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspector-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.inspector-stat-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.inspector-stat-num {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
}

.inspector-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Studio Right Icon Rail (Antigravity Style Slim Vertical Icon Rail) */
.studio-rail {
  width: 48px;
  min-width: 48px;
  background: rgba(10, 14, 23, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  z-index: 31;
  user-select: none;
}

.studio-rail .rail-top-actions,
.studio-rail .rail-bottom-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.studio-rail .rail-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.studio-rail .rail-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.studio-rail .rail-btn.active {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.studio-rail .rail-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-rail .rail-label {
  font-size: 8px;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
