:root {
  --ui-font: "Segoe UI", "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --mono-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  
  /* Visteras Dark Studio Foundations */
  --studio-header-bg: #333333;
  --studio-options-bg: #2d2d2d;
  --studio-toolbar-bg: #3c3c3c;
  --studio-panel-bg: #3c3c3c;
  --studio-panel-bg-darker: #2d2d2d;
  --studio-workspace-bg: #606060;
  --studio-chassis-bg: #535353;
  --studio-border-dark: #1a1a1a;
  --studio-border-med: #2a2a2a;
  --studio-border-light: #505050;
  --studio-text: #cccccc;
  --studio-text-muted: #888888;

  /* Inspire Warm Amber / Gold Brand Accent */
  --inspire-amber: #f59e0b;
  /* @visteras/ui accent hooks (packages/ui never hardcodes an accent) */
  --visteras-accent: var(--inspire-amber);
  --visteras-accent-hover: var(--inspire-amber-light);
  --visteras-on-accent: #111111;
  /* @visteras/ui token overrides (packages/ui/src/tokens.css defaults otherwise) */
  --vui-menu-item-padding: 5px 16px;
  --vui-menu-shortcut-gap: 16px;
  --vui-tab-font-size: 11px;
  --vui-tab-close-size: 14px;
  --vui-new-tab-font-size: 15px;
  --inspire-amber-light: #fbbf24;
  --inspire-amber-dark: #d97706;
  --inspire-amber-glow: rgba(245, 158, 11, 0.28);
  --inspire-card-bg: #262830;
  --inspire-card-border: #3b3e4a;
}

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

html {
  font-size: 16px !important;
}

@media screen {
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--studio-workspace-bg);
    color: var(--studio-text);
    color-scheme: dark;
    overflow: hidden;
    font-family: var(--ui-font);
  }

  /* 
   * Strict Visteras UX Hierarchy:
   * 1. Options bar across top (44px)
   * 2. File menu bar below it (28px)
   * 3. Left tools (42px), Workspace (1fr), Right panels (340px)
   * 4. Status bar on bottom (24px)
   */
  #visteras_app_container {
    display: grid;
    grid-template:
      "menu menu menu" 28px
      "options options options" 45px
      "tools workarea panels" 1fr
      "status status status" 24px
      / 42px 1fr 340px;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--studio-workspace-bg);
  }
}

#visteras_menu_bar, #tools_top, #tools_left, #sidepanels, #tools_bottom {
  font-family: var(--ui-font);
  font-size: 11px;
}

/* ==========================================================================
   1. Top Options Bar (#tools_top) - Studio & Vector 45px Parity
   ========================================================================== */
#tools_top {
  grid-area: options;
  display: flex;
  align-items: center;
  height: 45px;
  min-height: 45px;
  max-height: 45px;
  background-color: var(--studio-options-bg);
  border-bottom: 1px solid var(--studio-border-dark);
  padding: 0 12px 0 0;
  z-index: 500;
  user-select: none;
  box-sizing: border-box;
}

.visteras_inspire_logo_wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 4px;
  padding: 1px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 1px;
  cursor: pointer;
  flex-shrink: 0;
}

.visteras_inspire_logo_wrap img {
  height: 28px;
  width: auto;
  vertical-align: middle;
  flex-shrink: 0;
}

.visteras_inspire_logo_wrap.logo-omarchy-active img,
.visteras_inspire_logo_wrap img.logo-omarchy-active {
  filter: brightness(0) saturate(100%) invert(67%) sepia(69%) saturate(2032%) hue-rotate(357deg) brightness(102%) contrast(95%) !important;
}

.visteras_inspire_logo_wrap .logo_text {
  font-size: 14px;
  color: #ffffff;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}

.visteras_inspire_logo_wrap .logo_bold {
  font-weight: 700;
}

.visteras_inspire_logo_wrap .logo_light {
  font-weight: 100;
  opacity: 0.7;
  color: #ffffff;
}

.visteras_top_divider {
  width: 1px;
  height: 22px;
  background: #3c3c3c;
  margin: 0 8px;
  flex-shrink: 0;
}

.options_btn_group {
  display: inline-flex;
  background: #242424;
  border: 1px solid var(--studio-border-dark);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}

.options_toggle_btn {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.options_toggle_btn.active {
  background: var(--inspire-amber);
  color: #111111;
  font-weight: 600;
}

.panel_select, .options_select {
  background: #242424;
  border: 1px solid var(--studio-border-light);
  color: var(--studio-text);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.panel_select:focus, .options_select:focus {
  border-color: var(--inspire-amber);
}

.btn_visteras_secondary {
  background: #3e3e3e;
  border: 1px solid var(--studio-border-light);
  color: var(--studio-text);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.btn_visteras_secondary:hover {
  background: #4a4a4a;
  border-color: #666666;
}

.btn_visteras_secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn_visteras_amber {
  background: var(--inspire-amber);
  border: 1px solid var(--inspire-amber-dark);
  color: #111111;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px var(--inspire-amber-glow);
  transition: all 0.15s ease;
}

.btn_visteras_amber:hover {
  background: var(--inspire-amber-light);
}

.options_actions_right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   2. Main Top Menu Bar (#visteras_menu_bar) - Placed directly below Options
   ========================================================================== */
#visteras_menu_bar {
  grid-area: menu;
  display: flex;
  align-items: stretch;
  height: var(--vui-menu-bar-height);
  background: var(--studio-header-bg);
  border-bottom: 1px solid #222222;
  padding: 0 var(--vui-menu-bar-padding-x);
  user-select: none;
  z-index: 3000;
}

.menu_group {
  display: flex;
  align-items: stretch;
}

.menu_entry {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  height: 100%;
}

.menu_entry_title {
  display: flex;
  align-items: center;
  padding: var(--vui-menu-title-padding);
  font-family: var(--ui-font);
  font-size: var(--vui-menu-font-size);
  font-weight: 400;
  line-height: normal;
  color: #cccccc;
  cursor: pointer;
  border-radius: 0;
  box-sizing: border-box;
  height: 100%;
  transition: background 0.12s, color 0.12s;
}

.menu_entry:hover .menu_entry_title {
  background: #505050;
  color: #ffffff;
}

.menu_entry.open .menu_entry_title {
  background: var(--inspire-amber);
  color: #111111;
}

.menu_dropdown_list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #2b2b2b;
  border: 1px solid #1a1a1a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  border-radius: 0 0 4px 4px;
  padding: var(--vui-menu-dropdown-padding);
  z-index: 4000;
}

.menu_entry.open .menu_dropdown_list {
  display: block;
}

.menu_dropdown_item {
  padding: var(--vui-menu-item-padding);
  color: #d1d5db;
  font-size: var(--vui-menu-font-size);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.menu_dropdown_item:hover {
  background-color: var(--inspire-amber);
  color: #111111;
}

.menu_dropdown_item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.menu_dropdown_shortcut {
  color: #888888;
  font-size: var(--vui-menu-shortcut-font-size);
  font-family: var(--mono-font);
  margin-left: var(--vui-menu-shortcut-gap);
}

.menu_dropdown_item:hover .menu_dropdown_shortcut {
  color: #333333;
}

.menu_dropdown_separator {
  height: 1px;
  background: #3a3a3a;
  margin: var(--vui-menu-separator-margin);
}

.menu_right_controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visteras_switch_btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  color: #aaaaaa;
  padding: 2px 8px;
  border-radius: 2px;
  background: #242424;
  border: 1px solid #383838;
  transition: all 0.15s;
}

.visteras_switch_btn:hover {
  background: #333333;
  color: #ffffff;
  border-color: #555555;
}

/* ==========================================================================
   3. Left Toolbar (#tools_left)
   ========================================================================== */
#tools_left {
  grid-area: tools;
  background: var(--studio-toolbar-bg);
  border-right: 1px solid var(--studio-border-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  gap: 4px;
  z-index: 1000;
  user-select: none;
}

.tool_btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #cccccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool_btn:hover {
  background: #4a4a4a;
  color: #ffffff;
}

.tool_btn.active {
  background: #242424;
  border-color: var(--inspire-amber);
  color: var(--inspire-amber);
}

.tool_separator {
  width: 24px;
  height: 1px;
  background: var(--studio-border-dark);
  margin: 4px 0;
}

/* ==========================================================================
   4. Tabbed Document Bar (.document_tabs) & Middle Workarea (#workarea)
   ========================================================================== */
#workarea {
  grid-area: workarea;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #17181c;
  background-image: radial-gradient(circle, #252833 1px, transparent 1px);
  background-size: 24px 24px;
  user-select: none;
}

#workarea.drag-over {
  outline: 3px dashed var(--inspire-amber);
  outline-offset: -3px;
}

/* 4.1 Document Tabs Bar */
.document_tabs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--vui-tab-bar-height);
  background-color: #242424;
  border-bottom: 1px solid #181818;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 1000;
  user-select: none;
  cursor: default !important;
}

.document_tabs * {
  cursor: default !important;
}

.document_tabs::-webkit-scrollbar {
  height: 3px;
}

.document_tabs::-webkit-scrollbar-thumb {
  background: #444444;
}

.document_tab {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--vui-tab-padding-x);
  height: 100%;
  font-size: var(--vui-tab-font-size);
  color: #999999;
  background-color: #202020;
  border-right: 1px solid #1a1a1a;
  border-top: var(--vui-tab-accent-width) solid transparent;
  cursor: pointer !important;
  white-space: nowrap;
  max-width: var(--vui-tab-max-width);
  min-width: var(--vui-tab-min-width);
  box-sizing: border-box;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.document_tab * {
  cursor: pointer !important;
}

.document_tab:hover:not(.active) {
  background-color: #2c2c2c;
  color: #cccccc;
}

.document_tab.active {
  background-color: #383838;
  color: #ffffff;
  border-top: var(--vui-tab-accent-width) solid var(--visteras-accent);
}

.document_tab .tab_title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
  margin-right: var(--vui-tab-title-gap);
}

.document_tab .tab_zoom {
  font-size: var(--vui-tab-zoom-font-size);
  color: #777777;
  margin-right: 6px;
  flex-shrink: 0;
}

.document_tab.active .tab_zoom {
  color: #aaaaaa;
}

.document_tab .tab_dirty {
  color: var(--inspire-amber);
  font-weight: bold;
  margin-left: 2px;
}

.document_tab .tab_close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vui-tab-close-size);
  height: var(--vui-tab-close-size);
  border-radius: 2px;
  font-size: var(--vui-tab-close-font-size);
  line-height: 1;
  color: #777777;
  flex-shrink: 0;
  transition: background-color 0.15s, color 0.15s;
}

.document_tab .tab_close:hover {
  background-color: #555555;
  color: #ffffff;
}

.document_tab.active .tab_close:hover {
  background-color: #ef4444;
  color: #ffffff;
}

.document_tabs .new_tab_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vui-new-tab-size);
  height: var(--vui-new-tab-size);
  padding: 0;
  border: 0;
  background: transparent;
  color: #888888;
  font-size: var(--vui-new-tab-font-size);
  line-height: 1;
  cursor: pointer !important;
  flex-shrink: 0;
  transition: background-color 0.15s, color 0.15s;
}

.document_tabs .new_tab_btn:hover {
  background-color: #2c2c2c;
  color: #ffffff;
}

.tab_rename_input {
  background: #181818;
  color: #ffffff;
  border: 1px solid var(--inspire-amber);
  border-radius: 2px;
  padding: 0 4px;
  font-size: 11px;
  width: 90px;
  outline: none;
  height: 18px;
  line-height: 18px;
  font-family: inherit;
}

/* 4.2 Canvas Container (Below Tabs) */
.inspire_canvas_container {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.inspire-viewport {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  cursor: default;
  outline: none;
}

.inspire-viewport.tool-hand,
.inspire-viewport.panning {
  cursor: grab !important;
}

.inspire-viewport.tool-hand:active,
.inspire-viewport.panning:active,
.inspire-viewport.is-dragging-pan {
  cursor: grabbing !important;
}

.inspire-viewport.tool-hand .inspire-element,
.inspire-viewport.panning .inspire-element {
  cursor: grab !important;
}

.inspire-viewport.tool-hand:active .inspire-element,
.inspire-viewport.panning:active .inspire-element,
.inspire-viewport.is-dragging-pan .inspire-element {
  cursor: grabbing !important;
}

.inspire-viewport.tool-text,
.inspire-viewport.tool-text .inspire-element {
  cursor: text !important;
}

.inspire-canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* Fixed Artboard Frame */
.inspire-artboard-frame {
  position: relative;
  display: inline-block;
  vertical-align: top; /* keep the artboard at world (0,0) regardless of line-box baseline */
}

.inspire-artboard-header {
  display: none !important;
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  align-items: center;
  gap: 10px;
  color: #8c93a0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.artboard-dims-badge {
  background: #282a33;
  padding: 2px 6px;
  border-radius: 3px;
  color: #a0a6b5;
  font-family: var(--mono-font);
  font-size: 10px;
}

.inspire-artboard {
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  /* Width/height are never animated; the artboard's size drives hit-testing and snapping,
     so it must be correct the instant the mode or preset changes. */
}

.inspire-artboard-frame.infinite-mode .inspire-artboard-header {
  display: none !important;
}

.inspire-artboard.mode-infinite {
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  transition: none !important;
  border: none !important;
}

/* Full Workspace Infinite Canvas */
.inspire-viewport.mode-infinite {
  background-color: #ffffff;
}

/* Dots / blueprint grid are painted inline from js/grid-config.js (GRID_CONFIG),
   shared by fixed and infinite modes so spacing and dot size always match. */

.inspire-viewport.mode-infinite.pattern-blank,
.inspire-artboard.pattern-blank {
  background-image: none;
}

.inspire-elements-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.inspire-connectors-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.inspire-guides-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.snap-guide-line {
  position: absolute;
  background-color: #38bdf8;
  z-index: 9999;
}

.snap-guide-line.v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.snap-guide-line.h {
  left: 0;
  right: 0;
  height: 1px;
}

/* ==========================================================================
   5. Board Elements Styling
   ========================================================================== */
.inspire-element {
  position: absolute;
  cursor: move;
  transition: outline 0.1s ease, box-shadow 0.15s ease;
  user-select: none;
}

.inspire-element:hover {
  outline: 1px solid rgba(63, 143, 247, 0.4);
}

.inspire-element.selected {
  outline: 1px solid #3f8ff7;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.inspire-element.el-type-text {
  outline: none !important;
  box-shadow: none !important;
}

.inspire-element.el-type-text:hover {
  outline: none !important;
}

.inspire-element.el-type-text.selected {
  outline: none !important;
  box-shadow: none !important;
}

/* 5.1 Image Element & Polaroid */
.el-inner-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  background: #1e2028;
}

.el-inner-image.is-polaroid {
  background: #ffffff;
  padding: 12px 12px 38px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  display: block;
}

.polaroid-caption,
.polaroid-caption-input {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-family: "Caveat", "Comic Sans MS", cursive, sans-serif;
  color: #222222;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  outline: none;
  width: calc(100% - 24px);
  padding: 1px 4px;
  box-sizing: border-box;
}

.polaroid-caption-input:hover {
  background: rgba(0, 0, 0, 0.04);
}

.polaroid-caption-input:focus {
  background: #ffffff;
  border: 1px solid var(--inspire-amber);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  white-space: normal;
  overflow: visible;
  z-index: 10;
}

/* 5.2 Quote Element */
.el-inner-quote {
  width: 100%;
  height: 100%;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
}

.quote-mark {
  font-size: 48px;
  line-height: 1;
  color: var(--inspire-amber);
  margin-bottom: -10px;
  opacity: 0.8;
}

.quote-body {
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.2px;
}

.quote-author {
  margin-top: 14px;
  font-size: 13px;
  font-family: var(--ui-font);
  color: var(--studio-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 5.3 Text Element */
.el-inner-text {
  width: 100%;
  height: 100%;
  display: block;
  box-sizing: border-box;
  line-height: 1.2;
}

.el-inner-text.text-point-mode {
  white-space: pre;
  word-break: normal;
  overflow: visible;
}

.el-inner-text.text-box-mode {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.inspire-inline-text-editor {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  background: transparent !important;
  border: 1px solid rgba(63, 143, 247, 0.5);
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  outline: none;
  resize: none;
  overflow: hidden;
}

.inspire-inline-text-editor.is-textbox {
  border: 1px dashed #000000 !important;
}

/* 5.4 Sticky Note */
.el-inner-sticky {
  width: 100%;
  height: 100%;
  padding: 24px 14px 14px 14px;
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  color: #1e1e1e;
  font-size: 15px;
  line-height: 1.4;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.sticky-note-textarea {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
  resize: none;
  outline: none;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: inherit;
  cursor: text;
  word-break: break-word;
}

.sticky-note-textarea::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.sticky-note-textarea:focus {
  outline: none;
}

.sticky-note-textarea.font-handwriting {
  font-family: 'Caveat', 'Patrick Hand', 'Comic Sans MS', cursive, sans-serif;
  font-size: 19px;
}

.sticky-note-textarea.font-sans {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
}

.sticky-washi-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 20px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  border-left: 2px dashed rgba(0, 0, 0, 0.1);
  border-right: 2px dashed rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.sticky-pushpin {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.sticky-text {
  font-weight: 500;
}

/* 5.5 Color Swatch */
.el-inner-swatch {
  width: 100%;
  height: 100%;
  background: #20222a;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.swatch-color-box {
  flex: 1;
  width: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 8px;
}

.swatch-copy-btn {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #ffffff;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.el-inner-swatch:hover .swatch-copy-btn {
  opacity: 1;
}

.swatch-info {
  padding: 10px 12px;
}

.swatch-name {
  font-weight: 600;
  font-size: 12px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.swatch-hex {
  font-family: var(--mono-font);
  font-size: 11px;
  color: var(--inspire-amber);
  margin-top: 2px;
}

.swatch-label {
  font-size: 9px;
  color: var(--studio-text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   6. Transform Handles & Selection Overlay
   ========================================================================== */
.inspire-selection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

.inspire-transform-box {
  position: absolute;
  border: 1px solid #3f8ff7;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 10001;
}

.inspire-transform-box.is-textbox {
  border: 1px dashed #000000 !important;
}

.inspire-transform-box.is-textbox .transform-handle {
  border: 1px solid #000000 !important;
  background: #ffffff !important;
}

.inspire-element.is-textbox {
  border: 1px dashed rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.inspire-element.is-textbox.selected {
  border-color: transparent;
}

.transform-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border: 1px solid #3f8ff7;
  border-radius: 0;
  box-sizing: border-box;
  pointer-events: auto;
  z-index: 10002;
}

.handle-nw { top: -4px; left: -4px; cursor: nwse-resize; }
.handle-n  { top: -4px; left: calc(50% - 4px); cursor: ns-resize; }
.handle-ne { top: -4px; right: -4px; cursor: nesw-resize; }
.handle-e  { top: calc(50% - 4px); right: -4px; cursor: ew-resize; }
.handle-se { bottom: -4px; right: -4px; cursor: nwse-resize; }
.handle-s  { bottom: -4px; left: calc(50% - 4px); cursor: ns-resize; }
.handle-sw { bottom: -4px; left: -4px; cursor: nesw-resize; }
.handle-w  { top: calc(50% - 4px); left: -4px; cursor: ew-resize; }

/* Studio and Vector Parity: Corner Rotation Zones (replaces old stem handle) */
.transform-rotate-zone {
  position: absolute;
  width: 28px;
  height: 28px;
  background: transparent;
  pointer-events: auto;
  z-index: 10001;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" stroke="%23ffffff" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round" d="M 17 5.9 A 8 8 0 1 0 18.9 17.1"/><path fill="%23ffffff" stroke="%23ffffff" stroke-width="2.8" stroke-linejoin="round" d="M 19 18.5 L 21.6 13.6 L 16 16.1 Z"/><path fill="none" stroke="%23000000" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" d="M 17 5.9 A 8 8 0 1 0 18.9 17.1"/><path fill="%23000000" stroke="%23000000" stroke-width="0.9" stroke-linejoin="round" d="M 19 18.5 L 21.6 13.6 L 16 16.1 Z"/></svg>') 12 12, url('../images/rotate.svg') 12 12, crosshair;
}

.rot-zone-nw { top: -26px; left: -26px; }
.rot-zone-ne { top: -26px; right: -26px; }
.rot-zone-se { bottom: -26px; right: -26px; }
.rot-zone-sw { bottom: -26px; left: -26px; }

.inspire-marquee-box {
  display: none;
  position: absolute;
  border: 1px solid #3f8ff7;
  background: rgba(63, 143, 247, 0.12);
  pointer-events: none;
  z-index: 8000;
}

/* ==========================================================================
   7. Right Sidepanels (#sidepanels)
   ========================================================================== */
#sidepanels {
  grid-area: panels;
  background: var(--studio-panel-bg);
  border-left: 1px solid var(--studio-border-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  user-select: none;
}

.sidepanel_tabs {
  display: flex;
  background: var(--studio-panel-bg-darker);
  border-bottom: 1px solid var(--studio-border-dark);
}

.sidepanel_tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--studio-text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 8px 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.sidepanel_tab:hover {
  color: #ffffff;
  background: #333333;
}

.sidepanel_tab.active {
  color: var(--inspire-amber);
  border-bottom-color: var(--inspire-amber);
  background: var(--studio-panel-bg);
}

.sidepanel_panes {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.sidepanel_pane {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidepanel_pane.active {
  display: flex;
  flex-direction: column;
}

/* Panel Header & Sections */
.panel_header {
  padding: 8px 12px;
  background: #303030;
  border-bottom: 1px solid var(--studio-border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #ffffff;
  font-size: 11px;
}

.panel_badge {
  background: #242424;
  border: 1px solid var(--studio-border-light);
  color: var(--inspire-amber);
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.panel_section {
  padding: 10px 12px;
  border-bottom: 1px solid var(--studio-border-dark);
}

.panel_field {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel_label {
  font-size: 10px;
  font-weight: 600;
  color: var(--studio-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.panel_input, .panel_textarea {
  background: #242424;
  border: 1px solid var(--studio-border-light);
  color: var(--studio-text);
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 4px;
  outline: none;
  font-family: inherit;
}

.panel_input:focus, .panel_textarea:focus {
  border-color: var(--inspire-amber);
}

.panel_helper_text {
  font-size: 11px;
  color: var(--studio-text-muted);
  line-height: 1.4;
  margin: 0 0 6px 0;
}

/* 7.1 Swipe File Library Styles */
.swipe-panel-header {
  padding: 10px 12px;
  background: #333333;
  border-bottom: 1px solid var(--studio-border-dark);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-tabs-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  background: #262626;
  border: 1px solid var(--studio-border-light);
  color: var(--studio-text);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-pill:hover {
  background: #3a3a3a;
}

.cat-pill.active {
  background: var(--inspire-amber);
  border-color: var(--inspire-amber-dark);
  color: #111111;
  font-weight: 600;
}

.quick-capture-dropzone {
  background: #252830;
  border: 1.5px dashed var(--inspire-amber);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.quick-capture-dropzone:hover, .quick-capture-dropzone.drag-active {
  background: #2e323e;
}

.capture-icon {
  color: var(--inspire-amber);
}

.capture-text {
  display: flex;
  flex-direction: column;
}

.capture-text strong {
  font-size: 11px;
  color: #ffffff;
}

.capture-text span {
  font-size: 9px;
  color: var(--studio-text-muted);
}

.tags-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.tags-label {
  font-size: 9px;
  color: var(--studio-text-muted);
  margin-right: 2px;
}

.tag-badge {
  background: #20222a;
  border: 1px solid #3d4150;
  color: #94a3b8;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-badge:hover {
  color: #ffffff;
  border-color: var(--inspire-amber);
}

.tag-badge.active {
  background: var(--inspire-amber);
  color: #111111;
  border-color: var(--inspire-amber);
  font-weight: 600;
}

.tag-badge-clear {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 9px;
  cursor: pointer;
  margin-left: 4px;
}

.swipe-items-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.swipe-cards-masonry {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.swipe-card {
  background: var(--inspire-card-bg);
  border: 1px solid var(--inspire-card-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: grab;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.swipe-card:hover {
  border-color: var(--inspire-amber);
  transform: translateY(-2px);
}

.swipe-card .card-header {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-cat-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--inspire-amber);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-delete-item {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 10px;
  cursor: pointer;
}

.btn-delete-item:hover {
  color: #ef4444;
}

.card-thumb-wrap {
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: #15171d;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-quote-preview {
  padding: 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  line-height: 1.4;
  color: #f8fafc;
  background: #1a1c23;
}

.card-palette-preview {
  display: flex;
  height: 36px;
  width: 100%;
}

.palette-swatch-bar {
  flex: 1;
  height: 100%;
}

.card-text-preview {
  padding: 12px;
  font-size: 11px;
  line-height: 1.4;
  color: #cbd5e1;
  background: #1e2029;
}

.card-info {
  padding: 8px 10px;
}

.card-title {
  font-weight: 600;
  font-size: 11px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-palette-dots {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-tag:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-remove-tag {
  background: none;
  border: none;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
  padding: 0 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.btn-remove-tag:hover {
  color: #ef4444;
  opacity: 1;
}

.btn-add-tag-trigger {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 3px;
  color: var(--inspire-amber);
  font-size: 9px;
  font-weight: 500;
  padding: 1px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.btn-add-tag-trigger:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--inspire-amber);
}

.inline-tag-form {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
  width: 100%;
}

.card-tag-input {
  flex: 1;
  min-width: 0;
  height: 20px;
  background: #1e2028;
  border: 1px solid var(--inspire-amber);
  border-radius: 3px;
  color: #ffffff;
  font-size: 10px;
  padding: 0 5px;
  outline: none;
}

.card-tag-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.btn-confirm-add-tag {
  background: var(--inspire-amber);
  color: #111111;
  border: none;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  height: 20px;
  padding: 0 6px;
  cursor: pointer;
}

.btn-confirm-add-tag:hover {
  background: #fbbf24;
}

.btn-cancel-add-tag {
  background: #333645;
  color: #94a3b8;
  border: none;
  border-radius: 3px;
  font-size: 10px;
  height: 20px;
  padding: 0 5px;
  cursor: pointer;
}

.btn-cancel-add-tag:hover {
  background: #474b5d;
  color: #ffffff;
}

.btn-add-to-board {
  width: 100%;
  background: #323542;
  border: none;
  border-top: 1px solid var(--inspire-card-border);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
  padding: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-to-board:hover {
  background: var(--inspire-amber);
  color: #111111;
}

.empty-library-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--studio-text-muted);
}

.empty-library-state p {
  font-size: 12px;
  margin: 0 0 6px 0;
  color: #ffffff;
}

.empty-library-state span {
  font-size: 10px;
  line-height: 1.4;
}

/* 7.2 Inspector Panel Styles */
.inspire-inspector-scroll {
  padding: 12px;
  overflow-y: auto;
}

.inspector-section {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--studio-border-dark);
  padding-bottom: 12px;
}

.inspector-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--inspire-amber);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.inspector-row {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inspector-row.dual-inputs {
  flex-direction: row;
  gap: 8px;
}

.inspector-row.dual-inputs > div {
  flex: 1;
}

.inspector-label {
  font-size: 10px;
  color: var(--studio-text-muted);
  font-weight: 500;
}

.inspector-label-sub {
  font-size: 9px;
  color: #71717a;
}

.inspector-input, .inspector-select {
  background: #242424;
  border: 1px solid var(--studio-border-light);
  color: var(--studio-text);
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 4px;
  outline: none;
  width: 100%;
}

.inspector-btn-group {
  display: flex;
  background: #242424;
  border: 1px solid var(--studio-border-dark);
  border-radius: 4px;
  padding: 2px;
}

.inspector-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.inspector-toggle-btn.active {
  background: var(--inspire-amber);
  color: #111111;
  font-weight: 600;
}

.inspector-textarea {
  background: #242424;
  border: 1px solid var(--studio-border-light);
  color: var(--studio-text);
  font-size: 11px;
  line-height: 1.45;
  padding: 6px 8px;
  border-radius: 4px;
  outline: none;
  width: 100%;
  font-family: inherit;
  resize: vertical;
  min-height: 64px;
  box-sizing: border-box;
}

.inspector-textarea:focus, .inspector-input:focus, .inspector-select:focus {
  border-color: var(--inspire-amber);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

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

.inspector-color-picker {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--studio-border-light);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.inspector-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.inspector-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

/* Card Tint Color Chips (Square & Borderless) */
.sticky-color-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.sticky-color-chip {
  width: 22px;
  height: 22px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: transform 0.12s ease, outline 0.1s ease;
  box-sizing: border-box;
}

.sticky-color-chip:hover {
  transform: scale(1.12);
}

.sticky-color-chip.active {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

/* Inline Checkbox Rows */
.inspector-checkbox-row {
  flex-direction: row !important;
  align-items: center !important;
  margin-bottom: 8px;
}

.inspector-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--studio-text);
  cursor: pointer;
  user-select: none;
}

.inspector-checkbox {
  width: 14px;
  height: 14px;
  accent-color: var(--inspire-amber);
  cursor: pointer;
  margin: 0;
}

.slider-with-val {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inspector-slider {
  flex: 1;
  accent-color: var(--inspire-amber);
  cursor: pointer;
}

.slider-val {
  font-size: 10px;
  color: var(--studio-text-muted);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.inspector-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.btn_icon_close {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1;
}

.btn_icon_close:hover {
  background: #333333;
  color: #ffffff;
}

.inspector-desc-text {
  font-size: 10px;
  color: var(--studio-text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.inspector-actions-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

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

.btn_visteras_arrange {
  background: #383838;
  border: 1px solid var(--studio-border-light);
  color: #cccccc;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s ease;
  user-select: none;
}

.btn_visteras_arrange:hover {
  background: #4a4a4a;
  border-color: #666666;
  color: #ffffff;
}

.visteras_arrange_icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.btn_visteras_text {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  font-size: 11px;
  padding: 6px;
  cursor: pointer;
  border-radius: 4px;
}

.btn_visteras_text:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.add-quote-panel-card {
  animation: fadeInPanel 0.15s ease-out;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 7.3 Templates & Layout Cards */
.btn-layout-card {
  width: 100%;
  background: #2e3038;
  border: 1px solid var(--studio-border-light);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.btn-layout-card:hover {
  background: #393c46;
  border-color: #3f8ff7;
  transform: translateY(-1px);
}

.btn-layout-card.active {
  background: #343844;
  border-color: #3f8ff7;
  box-shadow: 0 0 0 1px #3f8ff7;
}

.layout-card-icon {
  font-size: 22px;
}

.layout-card-content {
  display: flex;
  flex-direction: column;
}

.layout-card-content strong {
  font-size: 11px;
  color: #ffffff;
}

.layout-card-content span {
  font-size: 9px;
  color: var(--studio-text-muted);
}

/* 7.4 Layers List */
.layers-list-scroll {
  padding: 8px 12px;
  overflow-y: auto;
}

.layers-list-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.layer-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #2a2c34;
  border: 1px solid var(--studio-border-dark);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.layer-item-row:hover {
  background: #343742;
}

.layer-item-row.selected {
  border-color: var(--inspire-amber);
  background: #383c4a;
}

.layer-icon {
  font-size: 13px;
}

.layer-title {
  flex: 1;
  font-size: 10px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layer-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.layer-controls button {
  background: transparent;
  border: 1px solid transparent;
  color: #888888;
  padding: 2px 4px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.layer-controls button:hover {
  background: #383838;
  border-color: #505050;
  color: #ffffff;
}

.layer-ctrl-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: middle;
}

.empty-layers {
  font-size: 11px;
  color: var(--studio-text-muted);
  text-align: center;
  padding: 20px 0;
}

/* ==========================================================================
   8. Bottom Status Bar (#tools_bottom)
   ========================================================================== */
#tools_bottom {
  grid-area: status;
  background: var(--studio-header-bg);
  border-top: 1px solid var(--studio-border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 10px;
  color: #a0a6b5;
  user-select: none;
  z-index: 2000;
}

.status_info_left, .status_info_right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status_tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status_tag_val {
  color: #ffffff;
  font-weight: 500;
}

.status_zoom_badge {
  background: #242424;
  border: 1px solid var(--studio-border-light);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--mono-font);
  font-size: 10px;
}

.status_zoom_badge:hover {
  border-color: var(--inspire-amber);
}

/* ==========================================================================
   9. Modals & Notifications
   ========================================================================== */
.visteras-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.visteras-modal-card {
  width: 480px;
  max-width: 90vw;
  background: #2d2f38;
  border: 1px solid var(--studio-border-light);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 12px 16px;
  background: #24252e;
  border-bottom: 1px solid var(--studio-border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 13px;
  color: #ffffff;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #888888;
  font-size: 14px;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-footer {
  padding: 12px 16px;
  background: #24252e;
  border-top: 1px solid var(--studio-border-dark);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Alertify Studio Style Toasts */
.alertify-notifier.ajs-top.ajs-center {
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  position: fixed;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.ajs-message {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: auto;
  cursor: pointer;
}

.ajs-message.ajs-visible {
  opacity: 1;
  transform: translateY(0);
}

.ajs-message.ajs-info {
  background: #242834;
  border: 1px solid var(--inspire-amber);
  color: #ffffff;
}

.ajs-message.ajs-success {
  background: #143525;
  border: 1px solid #22c55e;
  color: #ffffff;
}

.ajs-message.ajs-error {
  background: #3f1a1a;
  border: 1px solid #ef4444;
  color: #ffffff;
}
