/* ==========================================================================
   Tensor Visualizer - Light Theme Professional Stylesheet
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Fira Code", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Light Theme Palette */
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-light: rgba(0, 0, 0, 0.07);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --color-a: #0284c7;
  --color-a-light: #f0f9ff;
  --color-a-dark: #0369a1;

  --color-b: #d97706;
  --color-b-light: #fffbeb;
  --color-b-dark: #b45309;

  --color-c: #9333ea;
  --color-c-light: #faf5ff;
  --color-c-dark: #6b21a8;

  --accent-blue: #0284c7;
  --accent-amber: #d97706;
  --accent-purple: #9333ea;
  --accent-green: #059669;
  --accent-rose: #e11d48;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   App Layout (2 Columns: Canvas Left ~72%, Sidebar Right ~28%)
   ========================================================================== */

.app-container {
  display: flex;
  flex: 1;
  height: 100vh;
  overflow: hidden;
}

/* Canvas Area (Left) */
.canvas-column {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(#e2e8f0 1.2px, transparent 1.2px),
    radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
  background-size: 24px 24px, 100% 100%;
  overflow: hidden;
}

#canvas-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#canvas-viewport:active {
  cursor: grabbing;
}

/* Sidebar Area (Right) */
.sidebar-column {
  width: 400px;
  min-width: 400px;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.05);
  z-index: 20;
  transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .sidebar-column {
  margin-right: -400px;
}

/* Sidebar Toggle Chevron Button */
.sidebar-toggle-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 26px;
  height: 52px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 25;
  color: #64748b;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.sidebar-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.sidebar-toggle-btn .chevron-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .sidebar-toggle-btn .chevron-icon {
  transform: rotate(180deg);
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.sidebar-header h1 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}

.badge-tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Tabbed Navigation Header for Sidebar
   ========================================================================== */

.sidebar-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-bottom: 1px solid var(--border-color);
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

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

.tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.tab-icon {
  font-size: 1rem;
}

.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 30px;
}

.sidebar-scrollable::-webkit-scrollbar {
  width: 6px;
}
.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Tab Panes */
.tab-pane {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.tab-pane.active {
  display: flex;
}

/* ==========================================================================
   Floating Canvas Overlays (Light Theme Glassmorphism)
   ========================================================================== */

/* Top Canvas Toolbar */
.canvas-top-bar {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  pointer-events: none;
  z-index: 10;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  max-width: 100%;
  flex-wrap: wrap;
}

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

.toolbar-btn {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.toolbar-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.toolbar-btn.active {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.explode-slider-container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
}

.explode-slider-container input[type="range"] {
  width: 75px;
  cursor: pointer;
}

/* Đế dưới Canvas: xếp chồng thẻ công thức + thanh player (chống tràn/che đồ họa) */
.canvas-bottom-dock {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  pointer-events: none;
  z-index: 10;
}

/* Thanh điều khiển hoạt họa (một hàng, căn giữa) */
.player-bar {
  pointer-events: auto;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
}

/* Nhóm nút chế độ hiển thị 3D (ẩn khi không có tensor 3D) */
.view-mode-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Floating Formula & Step Card (Duy nhất trên Canvas) */
.canvas-formula-card {
  position: static;
  align-self: flex-start;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  pointer-events: auto;
  transition: all 0.2s ease;
}

.formula-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.formula-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-a-dark);
}

#broadcasting-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-weight: 700;
  display: none;
}

.formula-expression {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
  word-break: break-word;
}

.formula-highlight {
  color: #92400e;
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: 4px;
  border-left: 3px solid #f59e0b;
}

.badge-shape {
  font-family: var(--font-mono);
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #334155;
}

.formula-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

.formula-desc:empty {
  display: none;
}

/* Player Controls bên trong Header Toolbar */
.player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  width: 100%;
  flex-wrap: nowrap;
}

.player-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.player-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.player-btn.primary {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
  width: 32px;
  height: 30px;
  font-size: 0.9rem;
}

.player-btn.primary:hover {
  background: #0369a1;
}

.player-btn.primary.playing {
  background: #d97706;
  border-color: #b45309;
}

.player-step-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
  flex: 1 1 auto;
  min-width: 140px;
}

#player-step-slider {
  flex: 1 1 auto;
  min-width: 90px;
  cursor: pointer;
}

#player-step-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  min-width: 78px;
  white-space: nowrap;
  text-align: right;
}

.speed-control {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  border-left: 1px solid var(--border-color);
  padding-left: 8px;
}

#player-speed-slider {
  width: 50px;
  cursor: pointer;
}

/* ==========================================================================
   Sidebar Panels & Form Controls (Light Theme)
   ========================================================================== */

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Presets List */
.presets-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.preset-btn:hover {
  background: #f8fafc;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

.preset-btn.active {
  background: #f0f9ff;
  border-color: #0284c7;
  border-width: 1.5px;
}

.preset-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.preset-desc {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

/* Input Card */
.config-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tensor-a-title {
  color: var(--color-a-dark);
}

.tensor-b-title {
  color: var(--color-b-dark);
}

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

.form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  min-width: 50px;
}

.form-control {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

select.form-control {
  font-family: var(--font-sans);
  cursor: pointer;
}

.btn-small {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-small:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-small.primary {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
}

.btn-small.primary:hover {
  background: #0369a1;
}

/* Export Actions & Buttons */
.export-actions {
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.btn-export {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-export:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-export.primary {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

.btn-export.primary:hover {
  background: #0369a1;
}

.config-hint {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.45;
}

.fill-generators {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-gen {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-gen:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Error Banner */
.error-banner {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  display: none;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* ==========================================================================
   D3 SVG Elements & Colors (Light Theme)
   ========================================================================== */

.tensor-title {
  font-family: var(--font-sans);
  font-size: 14px;
}

.title-bold {
  font-weight: 700;
  fill: #0f172a;
}

.title-dim {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: #64748b;
}

.axis-coord-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #94a3b8;
  font-weight: 500;
  user-select: none;
}

/* Cell Rect */
.tensor-cell .cell-rect {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.tensor-cell .cell-val-text {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  fill: #0f172a;
  user-select: none;
  pointer-events: none;
}

.tensor-cell .cell-coord-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  fill: #64748b;
  opacity: 0.8;
  user-select: none;
  pointer-events: none;
}

/* Masked / Hidden Tensor Cells */
.tensor-cell.cell-masked .cell-rect {
  fill: #f1f5f9 !important;
  stroke: #94a3b8 !important;
  stroke-dasharray: 4, 3;
}

.tensor-cell.cell-masked .cell-val-text {
  fill: #64748b !important;
  font-weight: 800;
  font-size: 16px;
}

.tensor-cell.cell-masked.result-active .cell-rect {
  fill: #faf5ff !important;
  stroke: #9333ea !important;
  stroke-dasharray: 4, 3;
  filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.4));
}

.tensor-cell.cell-masked.result-active .cell-val-text {
  fill: #7e22ce !important;
  font-size: 17px;
}

/* Highlight & Linking States (Light Theme) */
.tensor-cell.result-active .cell-rect {
  fill: #d8b4fe !important;
  stroke: #9333ea !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.45));
}

.tensor-cell.result-active .cell-val-text {
  fill: #3b0764 !important;
  font-size: 15px;
  font-weight: 800;
}

.tensor-cell.input-active-a .cell-rect {
  fill: #7dd3fc !important;
  stroke: #0284c7 !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 10px rgba(2, 132, 199, 0.45));
}

.tensor-cell.input-active-a .cell-val-text {
  fill: #082f49 !important;
  font-weight: 800;
}

.tensor-cell.input-active-b .cell-rect {
  fill: #fde68a !important;
  stroke: #d97706 !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 10px rgba(217, 119, 6, 0.45));
}

.tensor-cell.input-active-b .cell-val-text {
  fill: #78350f !important;
  font-weight: 800;
}

.tensor-cell.source-focus .cell-rect {
  stroke: #0284c7 !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 0 8px rgba(2, 132, 199, 0.4));
}

.tensor-cell.target-linked .cell-rect {
  stroke: #9333ea !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.4));
}

/* Operator Badge */
.op-circle {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 2px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.08));
}

.op-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  fill: #1e293b;
}

.op-sublabel {
  font-size: 11px;
  font-weight: 600;
  fill: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Isometric Layer Plates (Light Theme) */
.iso-layer-plate {
  fill: rgba(241, 245, 249, 0.75);
  stroke: #cbd5e1;
  stroke-width: 1.2px;
  stroke-dasharray: 4, 3;
}

.iso-layer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  fill: #475569;
}

/* 2D Flat Slices */
.slice-card-bg {
  fill: rgba(241, 245, 249, 0.65);
  stroke: #cbd5e1;
  stroke-width: 1.2px;
}

.slice-badge-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  fill: #334155;
}

/* Connecting Bezier Curves */
.connections-layer {
  pointer-events: none !important;
}

.connection-curve {
  pointer-events: none !important;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px currentColor);
  stroke-dasharray: 6, 4;
  animation: dashAnimation 1.2s linear infinite;
}

@keyframes dashAnimation {
  to {
    stroke-dashoffset: -20;
  }
}

/* ==========================================================================
   Cell Edit Modal (Light Theme)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 22px 26px;
  width: 320px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Thẻ công thức ở trạng thái lỗi */
.formula-error {
  color: #be123c;
  font-weight: 600;
}

/* Nút Áp dụng hình dạng dùng chung cho Tensor A & B (tab Dữ liệu) */
.btn-apply-shapes {
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  background: #0284c7;
  border: 1px solid #0369a1;
  color: #ffffff;
  transition: all 0.15s ease;
}

.btn-apply-shapes:hover {
  background: #0369a1;
}

/* Bảng giải phẫu tensor (chế độ Giới thiệu Tensor) */
.anatomy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: #0f172a;
}

.anatomy-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  padding: 2px 8px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.anatomy-axes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: #334155;
}

.anatomy-stride {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #64748b;
}

/* Dải bộ nhớ: ngoặc đánh mốc ranh giới từng trục */
.ribbon-bracket-line {
  stroke: #94a3b8;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.ribbon-bracket.axis-0 .ribbon-bracket-line {
  stroke: #0284c7;
  stroke-width: 1.8;
}

.ribbon-bracket-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  fill: #64748b;
  user-select: none;
}

.ribbon-bracket.axis-0 .ribbon-bracket-label {
  fill: #0284c7;
}

.ribbon-row-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  fill: #0284c7;
  user-select: none;
}

/* Nút biểu tượng nhỏ trên thanh công cụ canvas (zoom +/-) */
.toolbar-btn.icon-btn {
  padding: 5px 0;
  width: 26px;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}
