/* BioCanvas Studio - Master Desktop Shell Web Stylesheet
   Faithfully preserves studio_snapshot.png down to every pixel, border, color, and font. */

:root {
  --titlebar-bg: #13161a;
  --menubar-bg: #181b1f;
  --search-header-bg: #282c31;
  --search-box-bg: #1f2327;
  --ribbon-tools-bg: #262626;
  --rail-bg: #1e2227;
  --rail-btn-hover: #2d333b;
  --rail-btn-active: #2563eb;
  --drawer-bg: #ffffff;
  --viewport-bg: #181b1f;
  --inspector-bg: #1a1d21;
  --statusbar-bg: #13161a;
  --border-dark: #22262d;
  --border-subtle: #2d3239;
  --border-light: #e2e8f0;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --text-dark: #1e293b;
  --text-gray: #94a3b8;
  --text-light: #cbd5e1;
  --text-white: #f8fafc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  background-color: var(--titlebar-bg);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   0. TOP TITLE BAR (36px)
   ========================================================================== */
#titleBar {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  flex-shrink: 0;
  background-color: var(--titlebar-bg);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 200;
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s ease;
}

.app-brand:hover {
  opacity: 0.9;
}

.brand-logo-img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.brand-icon {
  width: 18px;
  height: 18px;
  color: #38bdf8;
}

.brand-name-bold {
  font-size: 13px;
  font-weight: 700;
  color: #3b82f6;
}

.brand-name-light {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-left: 2px;
}

/* Pro Plan Badge (Emerald Green - Matching Desktop MainWindow.xaml lines 2571-2594) */
.pro-plan-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #064e3b;
  border: 1px solid #059669;
  border-radius: 3px;
  padding: 2px 10px;
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
}

/* Free Plan Badge (Gold) */
.free-plan-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #261c02;
  border: 1px solid #ca8a04;
  border-radius: 4px;
  padding: 2px 8px;
  color: #facc15;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* Upgrade to Pro Button (Emerald Green) */
.upgrade-pro-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: #059669;
  border: 1px solid #10b981;
  border-radius: 4px;
  padding: 3px 10px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.upgrade-pro-btn:hover {
  background-color: #047857;
}

.titlebar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#userAccountSection {
  display: none !important;
}

.window-ctrl-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  border-radius: 3px;
}

.window-ctrl-btn:hover {
  background-color: #272c32;
  color: #ffffff;
}

.window-ctrl-btn.close:hover {
  background-color: #dc2626;
  color: #ffffff;
}

/* ==========================================================================
   1. MENU BAR (Removed per user request)
   ========================================================================== */
#menuBar {
  display: none !important;
}

.menubar-left {
  display: flex;
  align-items: center;
  gap: 2px;
}

.menu-item {
  position: relative;
}

.menu-button {
  background: transparent;
  border: none;
  padding: 4px 8px;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
}

.menu-button:hover,
.menu-item.open .menu-button {
  background-color: #272c32;
  color: #ffffff;
}

.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: #1e2227;
  border: 1px solid #373d44;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 4px 0;
  z-index: 1000;
}

.menu-item.open .menu-dropdown {
  display: block;
}

.menu-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  color: #cbd5e1;
  font-size: 12px;
  cursor: pointer;
}

.menu-entry:hover {
  background-color: #2563eb;
  color: #ffffff;
}

.menu-entry-shortcut {
  font-size: 10.5px;
  color: #64748b;
  margin-left: 20px;
}

.menu-entry:hover .menu-entry-shortcut {
  color: #dbeafe;
}

.menu-divider {
  height: 1px;
  background-color: #2d3239;
  margin: 4px 0;
}

.menubar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: #94a3b8;
}

.feedback-icon-btn {
  cursor: pointer;
  font-size: 13px;
  color: #94a3b8;
}

.slides-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slide-arrow-btn {
  background: transparent;
  border: 1px solid #373d44;
  border-radius: 3px;
  color: #94a3b8;
  padding: 1px 6px;
  font-size: 11px;
  cursor: pointer;
}

.slide-arrow-btn:hover {
  background-color: #272c32;
  color: #ffffff;
}

/* ==========================================================================
   2. ACTION RIBBON TOOLBAR (48px)
   ========================================================================== */
#actionRibbon {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  flex-shrink: 0;
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 500;
}

/* Left search header (352px width: aligns with 52px rail + 300px drawer) */
.ribbon-search-section {
  width: 352px;
  min-width: 352px;
  max-width: 352px;
  background-color: var(--search-header-bg);
  border-right: 1px solid var(--border-dark);
  padding: 7px 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-input-wrap {
  width: 100%;
  height: 34px;
  background-color: var(--search-box-bg);
  border: 1px solid #3b82f6; /* Blue highlight border matching desktop reference */
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 6px;
}

.search-mag-icon {
  font-size: 12px;
  color: #3b82f6;
}

.ribbon-search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 12px;
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  outline: none;
}

.ribbon-search-input::placeholder {
  color: #94a3b8;
}

.search-clear-btn {
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
}

/* Right tools section (16 vertical tool buttons + blue export split button) */
.ribbon-tools-section {
  flex: 1;
  background-color: var(--ribbon-tools-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 6px;
  overflow: visible;
}

.ribbon-tools-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.vertical-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 42px;
  padding: 2px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.1s ease;
}

.vertical-tool-btn:hover {
  background-color: #373d44;
  color: #ffffff;
}

.vertical-tool-btn.active {
  background-color: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.tool-icon {
  font-size: 14px;
  line-height: 16px;
}

.tool-label {
  font-size: 9.5px;
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
}

.vertical-divider {
  width: 1px;
  height: 24px;
  background-color: #373d44;
  margin: 0 4px;
}

/* Blue Export Split Button */
.export-split-btn {
  display: flex;
  align-items: center;
  height: 32px;
  background-color: var(--accent-blue);
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.export-main-btn {
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.export-arrow-btn {
  padding: 0 6px;
  height: 100%;
  border-left: 1px solid #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.export-split-btn:hover {
  background-color: var(--accent-blue-hover);
}

/* ==========================================================================
   3. MAIN WORKSPACE (Left Rail + Drawer + Canvas Viewport + Inspector)
   ========================================================================== */
#workspace {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Left Rail (52px width) */
#leftRail {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  height: 100%;
  flex-shrink: 0;
  background-color: var(--rail-bg);
  border-right: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  gap: 3px;
  z-index: 50;
  overflow-y: auto;
  overflow-x: hidden;
}

.rail-item-btn {
  width: 46px;
  height: 44px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.rail-item-btn:hover {
  background-color: var(--rail-btn-hover);
  color: #ffffff;
}

.rail-item-btn.active {
  background-color: var(--rail-btn-active);
  color: #ffffff;
  border-color: #3b82f6;
}

.rail-item-icon {
  font-size: 15px;
  line-height: 16px;
}

.rail-item-text {
  font-size: 9px;
  margin-top: 1px;
  white-space: nowrap;
  text-align: center;
  color: inherit;
}

/* Left Drawer (300px width - Categories Accordion List) */
#assetDrawer {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  height: 100%;
  flex-shrink: 0;
  background-color: var(--drawer-bg);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  color: var(--text-dark);
  z-index: 40;
  overflow: visible !important;
}

/* Category List View (Visme Dark Aesthetic) */
.drawer-category-list {
  display: flex;
  flex-direction: column;
  background-color: #202a39;
  height: 100%;
}

.drawer-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  margin: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #f8fafc !important;
  transition: all 0.15s ease;
  user-select: none;
}

.drawer-category-item:hover {
  background: #2b3a4f !important;
  border-color: #0284c7 !important;
  color: #38bdf8 !important;
  transform: translateX(2px);
}

.cat-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.cat-item-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
}

.cat-item-left span:last-child {
  color: #f8fafc !important;
  font-weight: 600;
}

.drawer-category-item:hover .cat-item-left span:last-child {
  color: #38bdf8 !important;
}

.cat-item-arrow {
  color: #64748b;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.15s ease;
}

.drawer-category-item:hover .cat-item-arrow {
  color: #38bdf8;
  transform: translateX(2px);
}

/* Drawer Panel Views (Exclusively active one shown) */
.drawer-panel-view {
  display: none !important;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #202a39;
  overflow-y: auto;
  overflow-x: hidden;
}

.drawer-panel-view.open {
  display: flex !important;
}

/* Active Category Asset Browser View */
.drawer-asset-view {
  display: none;
  flex-direction: column;
  height: 100%;
}

.drawer-asset-view.open {
  display: flex !important;
}

.drawer-sub-header {
  padding: 10px 14px;
  background-color: #182230 !important;
  border-bottom: 1px solid #28374b !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-to-cats-btn {
  background: transparent;
  border: none;
  color: #38bdf8 !important;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back-to-cats-btn:hover {
  color: #7dd3fc !important;
}
  text-decoration: underline;
}

.subcat-chips-bar {
  display: none !important;
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow: visible;
  border-bottom: 1px solid #f1f5f9;
}

.subcat-chip {
  padding: 3px 8px;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

.subcat-chip.active {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.drawer-asset-grid {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-content: start;
}

.asset-card {
  background: transparent !important;
  border: none !important;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: none !important;
}

.asset-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  box-shadow: none !important;
  transform: scale(1.05);
}

.asset-card-thumb-wrap {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border-radius: 4px;
  margin-bottom: 4px;
  overflow: hidden;
}

.asset-card-thumb-wrap img,
.asset-card-thumb-wrap svg {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.asset-card-name {
  font-size: 10.5px;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Center Canvas Viewport (Dark background matching desktop reference) */
#canvasHost {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  background-color: var(--viewport-bg);
  position: relative;
  overflow: hidden;
}

/* Right Inspector (Dark background matching desktop reference) */
#propertiesInspector {
  width: 290px;
  min-width: 290px;
  max-width: 290px;
  height: 100%;
  flex-shrink: 0;
  background-color: var(--inspector-bg);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow: visible !important;
}

.inspector-tab-bar {
  height: 36px;
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background-color: #181b1f;
  flex-shrink: 0;
}

.inspector-tab-btn {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.inspector-tab-btn.active {
  color: #ffffff;
  border-bottom-color: #3b82f6;
  background-color: #1e2227;
}

.inspector-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
}

.inspector-empty-hint {
  font-size: 11.5px;
  font-style: italic;
  color: #94a3b8;
  line-height: 1.6;
}

/* ==========================================================================
   4. BOTTOM STATUS BAR (24px)
   ========================================================================== */
#statusBar {
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  flex-shrink: 0;
  background-color: var(--statusbar-bg);
  border-top: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 10.5px;
  color: #94a3b8;
  z-index: 500;
}

.status-dim-badge {
  background-color: #1e2227;
  padding: 1px 6px;
  border-radius: 3px;
  color: #cbd5e1;
}

.status-right-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-link {
  color: #94a3b8;
  cursor: pointer;
}

.status-link:hover {
  color: #ffffff;
}

.beta-feedback-pill {
  background-color: #1e3a5f;
  color: #60a5fa;
  font-weight: 600;
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

/* ==========================================================================
   5. MODALS & DIALOG OVERLAYS (Fixed Position, Hidden by Default)
   ========================================================================== */
.modal-overlay {
  display: none !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 15, 25, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex !important;
}

.modal-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid #334155;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #1e293b;
  max-height: 85vh;
}

.modal-header {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #ef4444;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
}

.modal-footer {
  padding: 10px 18px;
  background-color: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.welcome-template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.welcome-template-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.15s ease;
}

.welcome-template-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.export-figure-btn {
  height: 32px;
  padding: 0 14px;
  background-color: #2563eb;
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.inspector-btn {
  height: 30px;
  padding: 0 12px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* --- Ribbon Tool Wraps & Dropdown Menus --- */
.ribbon-tool-wrap {
  position: relative;
  display: inline-flex;
}

.ribbon-tool-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background-color: #1e2227;
  border: 1px solid #373d44;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  min-width: 210px;
  padding: 6px 0;
  z-index: 2000;
  color: #f1f5f9;
}

.ribbon-tool-wrap.open .ribbon-tool-dropdown,
.ribbon-tool-wrap:focus-within .ribbon-tool-dropdown {
  display: block;
}

.dropdown-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  font-size: 11.5px;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.1s;
}

.dropdown-entry:hover {
  background-color: #2b323c;
  color: #ffffff;
}

.dropdown-entry-shortcut {
  font-size: 10px;
  color: #94a3b8;
  margin-left: 14px;
}

.dropdown-divider {
  height: 1px;
  background-color: #373d44;
  margin: 5px 0;
}

.dropdown-header {
  padding: 4px 14px 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #60a5fa;
  letter-spacing: 0.5px;
}

.dropdown-custom-box {
  padding: 8px 12px;
  background-color: #16191d;
  margin: 4px 8px;
  border-radius: 5px;
  border: 1px solid #2e353e;
}

.dropdown-input-row {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.dropdown-input {
  height: 24px;
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 3px;
  color: #f8fafc;
  font-size: 11px;
  padding: 2px 6px;
  width: 100%;
}

.dropdown-apply-btn {
  width: 100%;
  height: 24px;
  background: #2563eb;
  border: none;
  border-radius: 3px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

.dropdown-apply-btn:hover {
  background: #1d4ed8;
}

.dropdown-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 12px 8px;
}

.dropdown-swatch {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.1s;
}

.dropdown-swatch:hover {
  transform: scale(1.15);
  border-color: #ffffff;
}

/* --- Left Rail Panels (Brushes, Arrows, Shapes, Charts, Uploads, PDB) --- */
.drawer-panel-view {
  display: none !important;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 10px 12px;
  background-color: #202a39 !important;
  box-sizing: border-box;
}

.drawer-panel-view.open {
  display: flex !important;
}

.drawer-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8 !important;
  margin: 10px 0 6px;
  letter-spacing: 0.5px;
}

.drawer-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.drawer-cards-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.drawer-item-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.15s ease;
  user-select: none;
}

.drawer-item-card:hover {
  border-color: #0284c7;
  background-color: #2b3a4f;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
  transform: translateY(-1px);
}

.drawer-item-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.drawer-item-name {
  font-size: 11px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.2;
}

.drawer-item-card-row {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  user-select: none;
}

.drawer-item-card-row:hover {
  border-color: #0284c7;
  background-color: #2b3a4f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateX(2px);
}

.drawer-item-row-info {
  display: flex;
  flex-direction: column;
}

.drawer-item-row-name {
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
}

.drawer-item-row-desc {
  font-size: 10.5px;
  color: #94a3b8;
}

/* Local Uploads Drag Drop Zone */
.upload-drop-zone {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 14px;
}

.upload-drop-zone:hover {
  border-color: #2563eb;
  background-color: #eff6ff;
}

/* PDB 3D Macromolecule Search Panel */
.pdb-search-wrap {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.pdb-input {
  flex: 1;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.pdb-fetch-btn {
  height: 32px;
  padding: 0 12px;
  background: #2563eb;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pdb-badge-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.pdb-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 10.5px;
  color: #475569;
  cursor: pointer;
}

.pdb-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ========================================================================= */
/* DESKTOP-MATCHING FLYOUT POPUPS (Brushes, Arrows/Lines, Shapes)            */
/* ========================================================================= */
.desktop-flyout-popup {
  position: fixed;
  left: 56px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  z-index: 10000;
  display: none;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  user-select: none;
}

.desktop-flyout-popup.open {
  display: flex !important;
}

.flyout-left-col {
  background: #f8fafc;
  border-radius: 8px 0 0 8px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
}

.flyout-category-nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #1e293b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  box-sizing: border-box;
}

.flyout-category-nav-btn:hover {
  background: #f1f5f9;
}

.flyout-category-nav-btn.active {
  background: #f1f5f9;
  font-weight: 600;
}

.flyout-category-icon {
  width: 22px;
  text-align: center;
  font-size: 13px;
  flex-shrink: 0;
}

.flyout-category-label {
  flex: 1;
  margin-left: 4px;
}

.flyout-category-chevron {
  font-size: 14px;
  font-weight: bold;
  color: #94a3b8;
  margin-left: auto;
}

.flyout-divider-v {
  width: 1px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.flyout-right-panel {
  background: #ffffff;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  overflow-y: auto;
  box-sizing: border-box;
}

.flyout-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin: 6px 2px 4px;
  letter-spacing: 0.2px;
}

.flyout-shapes-wrap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: 100% !important;
  box-sizing: border-box;
}

.flyout-card-btn {
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 4px 2px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all 0.12s ease;
  overflow: hidden;
}

.flyout-card-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.flyout-card-btn:active {
  background: #e2e8f0;
}

.flyout-line-card-btn {
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 4px 2px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all 0.12s ease;
  overflow: hidden;
}

.flyout-line-card-btn svg {
  max-width: 100%;
  height: auto;
  display: block;
  flex-shrink: 1;
}

.flyout-line-card-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.inspector-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.inspector-glyph-box {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: #1e3a5f;
  border: 1px solid #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #3b82f6;
}

.inspector-object-title {
  flex: 1;
  font-weight: 700;
  font-size: 13px;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 0 4px;
}

.inspector-close-btn:hover {
  color: #ffffff;
}

.inspector-group-banner {
  background: #1e293b;
  border: 1px solid #38bdf8;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.inspector-group-text {
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
}

.inspector-back-btn {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.inspector-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 8px;
  border-top: 1px solid #2d333b;
  padding-top: 10px;
}

.inspector-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.inspector-reset-link {
  font-size: 10.5px;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
}

.inspector-reset-link:hover {
  color: #38bdf8;
}

.inspector-style-presets {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.style-preset-btn {
  flex: 1;
  height: 28px;
  background: #282c31;
  border: 1px solid #373d44;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.style-preset-btn:hover,
.style-preset-btn.active {
  border-color: #2563eb;
  background: #1e3a5f;
  color: #ffffff;
}

.inspector-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.inspector-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #475569;
  cursor: pointer;
  transition: transform 0.1s;
}

.inspector-color-dot:hover {
  transform: scale(1.15);
  border-color: #ffffff;
}

.inspector-slider-row {
  display: grid;
  grid-template-columns: 80px 42px 1fr;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #cbd5e1;
}

.inspector-val-box {
  height: 24px;
  background: #0f172a;
  border: 1px solid #373d44;
  border-radius: 3px;
  color: #ffffff;
  text-align: center;
  font-size: 11px;
}

.inspector-slider-input {
  accent-color: #2563eb;
  cursor: pointer;
}

.inspector-transform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.inspector-field-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inspector-field-label {
  font-size: 10px;
  color: #94a3b8;
}

.inspector-field-input {
  height: 26px;
  background: #0f172a;
  border: 1px solid #373d44;
  border-radius: 3px;
  color: #ffffff;
  padding: 0 6px;
  font-size: 11px;
}

.inspector-action-btn-row {
  display: flex;
  gap: 6px;
  margin: 6px 0;
}

.inspector-tool-btn {
  flex: 1;
  height: 26px;
  background: #282c31;
  border: 1px solid #373d44;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
}

.inspector-tool-btn:hover {
  background: #373d44;
  color: #ffffff;
}

.inspector-delete-btn {
  width: 100%;
  height: 30px;
  background: #dc2626;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.inspector-delete-btn:hover {
  background: #b91c1c;
}

/* ==========================================================================
   BioRender 4-Column Visual Thumbnail Grid (62px x 62px tiles - 4 x 100 tab)
   ========================================================================== */
.drawer-asset-grid-4col {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(4, 62px);
  justify-content: space-between;
  gap: 6px;
  align-content: start;
}

.asset-card-tile {
  width: 62px;
  height: 62px;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
  padding: 4px;
  box-shadow: none !important;
}

.asset-card-tile:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  box-shadow: none !important;
  transform: scale(1.12);
}

.asset-card-thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.asset-card-tile:hover .asset-card-thumb {
  transform: scale(1.06);
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.45));
}

.asset-card-triangle {
  display: none !important;
}

/* Subcategory List in Drawer */
.drawer-subcategory-list {
  display: none;
  flex-direction: column;
  padding: 6px 8px;
  gap: 4px;
  overflow-y: auto;
  height: 100%;
  background: #202a39 !important;
}

.drawer-subcategory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #f8fafc !important;
  transition: all 0.15s ease;
  user-select: none;
}

.drawer-subcategory-item:hover {
  background-color: #2b3a4f !important;
  border-color: #0284c7 !important;
  color: #38bdf8 !important;
  transform: translateX(2px);
}

.drawer-subcategory-item:hover .cat-item-left span:last-child {
  color: #38bdf8 !important;
}

.drawer-subcategory-item:hover .cat-item-arrow {
  color: #38bdf8 !important;
  transform: translateX(2px);
}

.subcat-item-count {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8 !important;
  background: #182230 !important;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid #28374b !important;
}

/* Icons Count Badge in Asset Header */
.icons-count-badge {
  font-size: 10.5px;
  color: #38bdf8 !important;
  font-weight: 600;
  margin-left: auto;
  background: #182230 !important;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #28374b !important;
}

/* Load More 100 Tab */
.load-more-tab-btn {
  grid-column: span 4;
  height: 32px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.load-more-tab-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

/* Drawer Sub-Tab Bar (for Brushes, Shapes) */
.drawer-sub-tab-bar {
  display: flex;
  background: #182230;
  border: 1px solid #28374b;
  border-radius: 6px;
  padding: 3px;
  margin: 6px 8px 10px;
  gap: 3px;
  flex-shrink: 0;
}

.drawer-sub-tab {
  flex: 1;
  padding: 6px 3px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  background: transparent;
  transition: all 0.15s ease;
}

.drawer-sub-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.drawer-sub-tab.active {
  background: #2b3a4f;
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 4-Column Brushes & Shapes Grid */
.drawer-4col-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 0 12px;
  box-sizing: border-box;
}

/* Drawer Arrow Grids & Frameless Buttons */
#drawerArrowsView .drawer-arrow-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px 0 8px;
  box-sizing: border-box;
}

#drawerArrowsView .drawer-arrow-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 4px 0 8px;
  box-sizing: border-box;
}

#drawerArrowsView .drawer-arrow-card-btn {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 2px 4px;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s ease;
  box-shadow: none !important;
}

#drawerArrowsView .drawer-arrow-card-btn:hover {
  background: #2b3a4f !important;
  border-color: #38bdf8 !important;
  transform: translateY(-1px);
}

#drawerArrowsView .drawer-arrow-card-btn:active {
  transform: translateY(0);
}

#drawerArrowsView .drawer-arrow-card-btn svg {
  display: block;
  max-width: 100%;
}

.drawer-tile-btn {
  width: 100%;
  min-width: 0;
  height: 62px;
  background: transparent !important;
  border: none !important;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px 2px;
  box-sizing: border-box;
  transition: all 0.15s ease;
  box-shadow: none !important;
}

.drawer-tile-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  box-shadow: none !important;
  transform: scale(1.08);
}

.drawer-tile-btn:hover .drawer-tile-icon svg {
  filter: drop-shadow(0 2px 4px rgba(56, 189, 248, 0.45));
}

.drawer-tile-label {
  color: #94a3b8 !important;
  font-size: 10.5px;
  font-weight: 500;
  margin-top: 3px;
  transition: color 0.15s ease;
}

.drawer-tile-btn:hover .drawer-tile-label {
  color: #38bdf8 !important;
}

.drawer-tile-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-tile-label {
  font-size: 8.5px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  margin-top: 2px;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ==========================================================================
   Asset View 4 x 100 Tabs & Pagination
   ========================================================================== */
.drawer-top-tab-switcher {
  display: flex;
  background: #151d29;
  border: 1px solid #28374b;
  border-radius: 8px;
  padding: 3px;
  margin: 10px 10px 8px 10px;
  gap: 4px;
  flex-shrink: 0;
}

.drawer-top-tab {
  flex: 1;
  padding: 6px 4px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.drawer-top-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.drawer-top-tab.active {
  background: #2b3a4f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.asset-pages-tabs {
  display: none !important;
  display: flex;
  overflow-x: auto;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 4px 6px;
  gap: 4px;
  flex-shrink: 0;
  scrollbar-width: thin;
}

.asset-pages-tabs::-webkit-scrollbar {
  height: 3px;
}
.asset-pages-tabs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.asset-page-tab {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.asset-page-tab:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0284c7;
}

.asset-page-tab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.25);
}

/* Tab Panels Content Show/Hide */
.drawer-tab-content {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
}

.drawer-tab-content.active {
  display: flex;
}

/* ==========================================================================
   Text Formatting Toolbar in Drawer
   ========================================================================== */
.text-format-panel {
  padding: 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.text-format-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.text-format-select {
  flex: 1;
  height: 28px;
  font-size: 11px;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 6px;
  background: #ffffff;
  outline: none;
}
.text-format-select:focus {
  border-color: #0284c7;
}

.text-size-stepper {
  display: flex;
  align-items: center;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.text-size-btn {
  width: 24px;
  height: 100%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}
.text-size-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.text-size-input {
  width: 32px;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
}

.text-style-btn-group {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.text-style-toggle-btn {
  width: 26px;
  height: 28px;
  border: none;
  background: #ffffff;
  color: #475569;
  font-size: 11.5px;
  cursor: pointer;
  border-right: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.text-style-toggle-btn:last-child {
  border-right: none;
}
.text-style-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.text-style-toggle-btn.active {
  background: #0284c7;
  color: #ffffff;
}

.text-color-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.text-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.text-color-dot:hover {
  transform: scale(1.18);
}
.text-color-dot.active {
  box-shadow: 0 0 0 2px #0284c7;
}

.text-quick-input-box {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.text-quick-input {
  flex: 1;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 11.5px;
  outline: none;
}
.text-quick-input:focus {
  border-color: #0284c7;
}

.text-quick-insert-btn {
  height: 28px;
  padding: 0 10px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.text-quick-insert-btn:hover {
  background: #0369a1;
}

.text-box-presets-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px 10px 8px;
}

.text-box-preset-pill {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}
.text-box-preset-pill:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
}

/* ========================================================================= */
/* PDB & Chemistry Drawer and Visualizer Parity (MainWindow.xaml Views 4 & 5) */
/* ========================================================================= */
.drawer-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #32383e;
  padding: 10px 12px;
  border-bottom: 1px solid #22262d;
  margin: -12px -12px 10px -12px;
}
.drawer-back-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.drawer-back-btn:hover {
  color: #38bdf8;
}
.drawer-header-tag {
  color: #94a3b8;
  font-size: 10.5px;
}
.drawer-instruction-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  line-height: 1.4;
}
.drawer-search-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.drawer-search-input {
  flex: 1;
  height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  background: #ffffff;
  color: #0f172a;
}
.drawer-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
.drawer-search-btn {
  height: 34px;
  padding: 0 14px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease;
}
.drawer-search-btn:hover {
  background: #0369a1;
}
.drawer-spinner-wrap {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-rotatable-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #bfdbfe;
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.drawer-status-msg {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
  line-height: 1.4;
}
.drawer-pills-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}
.drawer-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.drawer-pill-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s ease;
}
.drawer-pill-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
}
.drawer-section-subhead {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 10px 0 6px 0;
}
.drawer-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 280px;
  overflow-y: auto;
}
.drawer-result-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.drawer-result-item:hover {
  border-color: #0284c7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.drawer-detail-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.drawer-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.drawer-card-headings {
  flex: 1;
  min-width: 0;
}
.drawer-card-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-card-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.drawer-id-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #2563eb;
}
.drawer-formula-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
}
.drawer-visual-preview-box {
  height: 180px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 6px 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.drawer-metadata-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  margin-bottom: 10px;
}
.drawer-metadata-table td {
  padding: 3px 0;
  vertical-align: top;
}
.drawer-metadata-table td:first-child {
  color: #64748b;
  width: 82px;
  font-weight: 500;
}
.drawer-metadata-table td:last-child {
  color: #1e293b;
  font-weight: 600;
}
.drawer-primary-action-btn {
  width: 100%;
  height: 36px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  transition: background 0.15s ease;
}
.drawer-primary-action-btn:hover {
  background: #0369a1;
}
.drawer-secondary-action-btn {
  width: 100%;
  height: 32px;
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease;
}
.drawer-secondary-action-btn:hover {
  background: #0f172a;
  border-color: #38bdf8;
}
.drawer-curated-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.drawer-curated-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.drawer-curated-item:hover {
  border-color: #0284c7;
  background: #f8fafc;
}
.drawer-small-add-btn {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}
.drawer-small-add-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
.pdb-ctrl-btn {
  background: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
.pdb-ctrl-btn:hover {
  background: #475569;
}
.pdb-ctrl-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}


/* ========================================================================== */
/* SMARTDRAW BIOCANVAS GALLERY DASHBOARD (Matches app.smartdraw.com)          */
/* Clean 2-column layout: Left navigation rail (240px) + Main content panel   */
/* Crisp enterprise light aesthetic: Slate/white cards, SmartDraw blue accent */
/* ========================================================================== */
.bio-gallery-dashboard.sd-dashboard-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: #f8fafc;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
}

/* -------------------------------------------------------------------------- */
/* 1. SMARTDRAW LEFT NAVIGATION SIDEBAR (240px)                               */
/* -------------------------------------------------------------------------- */
.sd-sidebar {
  width: 248px;
  min-width: 248px;
  max-width: 248px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  z-index: 25;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.03);
}

.sd-sidebar-header {
  height: 60px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.sd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.sd-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.sd-brand-title-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.sd-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.sd-brand-sub {
  font-size: 9.5px;
  font-weight: 700;
  color: #0284c7;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* SmartDraw Primary Blue Button: + New Document */
.sd-action-wrapper {
  padding: 14px 14px 10px 14px;
  flex-shrink: 0;
}

.sd-btn-new-document {
  width: 100%;
  height: 42px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  user-select: none;
}

.sd-btn-new-document:hover {
  background: #0369a1;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
  transform: translateY(-1px);
}

.sd-btn-new-document:active {
  transform: translateY(0);
}

/* SmartDraw Navigation Tree */
.sd-nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sd-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sd-nav-group-heading {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.7px;
  padding: 4px 10px;
  text-transform: uppercase;
  user-select: none;
}

.sd-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.sd-nav-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.sd-nav-item.active {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

.sd-nav-icon {
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.sd-nav-item:hover .sd-nav-icon {
  color: #0f172a;
}

.sd-nav-item.active .sd-nav-icon {
  color: #0284c7;
}

.sd-nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-nav-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.sd-nav-item.active .sd-nav-badge {
  background: #bae6fd;
  color: #0369a1;
}

/* Sidebar Footer: Sync Badge & User Card */
.sd-sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.sd-sync-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 20px;
}

.sd-sync-badge .dash-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.sd-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sd-user-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.sd-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sd-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.sd-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-user-plan {
  font-size: 10px;
  font-weight: 600;
  color: #0284c7;
}

.sd-user-arrow {
  font-size: 11px;
  color: #94a3b8;
}

/* User Account Switcher Dropdown Modal */
.sd-user-dropdown {
  position: absolute;
  bottom: 56px;
  left: 0;
  width: 290px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  padding: 14px;
  z-index: 1050;
  text-align: left;
  color: #0f172a;
}

.sd-user-dropdown .dash-dropdown-header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 10px;
}

.sd-user-dropdown .dash-dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sd-user-dropdown .dash-dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.sd-user-dropdown .dash-dropdown-email {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-user-dropdown .dash-dropdown-badge {
  display: inline-block;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
  align-self: flex-start;
}

.sd-user-dropdown .dash-dropdown-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.6px;
  margin: 10px 0 6px 0;
  text-transform: uppercase;
}

.sd-user-dropdown .dash-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.sd-user-dropdown .dash-account-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  color: #334155;
  background: #f8fafc;
}

.sd-user-dropdown .dash-account-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.sd-user-dropdown .dash-account-item.active {
  background-color: #e0f2fe;
  border-left: 3px solid #0284c7;
  color: #0369a1;
}

.sd-user-dropdown .dash-acc-mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sd-user-dropdown .dash-acc-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.sd-user-dropdown .dash-acc-meta {
  font-size: 10px;
  color: #64748b;
}

.sd-user-dropdown .dash-dropdown-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.sd-user-dropdown .dash-dropdown-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.12s;
}

.sd-user-dropdown .dash-dropdown-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.sd-user-dropdown .dash-btn-signout {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.sd-user-dropdown .dash-btn-signout:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* -------------------------------------------------------------------------- */
/* 2. SMARTDRAW MAIN CONTENT PANEL                                            */
/* -------------------------------------------------------------------------- */
.sd-main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #f8fafc;
}

/* SmartDraw Top Header */
.sd-topbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  gap: 16px;
  z-index: 10;
}

.sd-topbar-left {
  display: flex;
  align-items: center;
}

.sd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 500;
}

.sd-breadcrumb-root {
  font-weight: 700;
  color: #0f172a;
}

.sd-breadcrumb-separator {
  color: #cbd5e1;
}

.sd-breadcrumb-current {
  color: #0284c7;
  font-weight: 600;
}

/* Center Search */
.sd-topbar-center {
  flex: 1;
  max-width: 460px;
}

.sd-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.sd-search-box svg {
  position: absolute;
  left: 11px;
  color: #94a3b8;
  pointer-events: none;
}

.sd-search-box input {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12.5px;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.sd-search-box input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.sd-search-box .dash-search-clear {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 15px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
}

.sd-search-box .dash-search-clear:hover {
  color: #0f172a;
}

/* Topbar Right Actions */
.sd-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sd-header-btn {
  height: 34px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.sd-header-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.sd-view-toggle {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.sd-view-toggle .dash-toggle-btn {
  height: 32px;
  width: 32px;
  background: #ffffff;
  border: none;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s;
}

.sd-view-toggle .dash-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sd-view-toggle .dash-toggle-btn.active {
  background: #e0f2fe;
  color: #0284c7;
}

/* -------------------------------------------------------------------------- */
/* 3. MAIN SCROLLABLE CONTENT BODY                                            */
/* -------------------------------------------------------------------------- */
.sd-main-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 64px 32px;
  background: #f8fafc;
}

.sd-container {
  max-width: 1360px;
  margin: 0 auto;
}

/* Hero / Welcome Banner */
.sd-hero-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 28px;
}

.sd-workspace-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.sd-workspace-tag .dash-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #0284c7;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.6);
}

.sd-hero-heading {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.sd-hero-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.sd-starters-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.7px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* SmartDraw Quick Starters Bento Grid */
.sd-quick-starters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.sd-starter-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sd-starter-card:hover {
  border-color: #0284c7;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.14);
  background: #ffffff;
  transform: translateY(-2px);
}

.sd-starter-card.starter-blank {
  background: #f0f9ff;
  border: 1.5px dashed #0284c7;
}

.sd-starter-card.starter-blank:hover {
  background: #e0f2fe;
}

.sd-starter-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.starter-details {
  display: flex;
  flex-direction: column;
}

.starter-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.starter-desc {
  font-size: 11px;
  color: #64748b;
}

/* -------------------------------------------------------------------------- */
/* 4. DOCUMENTS & TEMPLATES SECTIONS                                          */
/* -------------------------------------------------------------------------- */
.sd-section {
  width: 100%;
}

.sd-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.sd-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sd-section-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.3px;
}

.sd-section-count {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.sd-login-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 2px 8px;
  border-radius: 4px;
}

.sd-section-desc-tag {
  font-size: 12px;
  color: #64748b;
}

.sd-section-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sd-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sd-pill-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.sd-pill-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.sd-pill-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
  font-weight: 700;
}

.sd-sort-dropdown {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  outline: none;
}

/* -------------------------------------------------------------------------- */
/* 5. DIAGRAM CARDS GRID & CARDS                                              */
/* -------------------------------------------------------------------------- */
.sd-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.dash-diagram-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dash-diagram-card:hover {
  border-color: #0284c7;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  transform: translateY(-3px);
}

.dash-diagram-thumb {
  height: 154px;
  background: #090e1a;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.dash-diagram-thumb svg {
  width: 100%;
  height: 100%;
  max-height: 132px;
  object-fit: contain;
}

.dash-tag-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
}

/* Card Hover Actions Overlay */
.dash-card-hover-actions {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.dash-diagram-card:hover .dash-card-hover-actions {
  opacity: 1;
  pointer-events: auto;
}

.dash-hover-open-btn {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #38bdf8;
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.45);
  transition: all 0.15s ease;
}

.dash-hover-open-btn:hover {
  background: #0369a1;
  transform: scale(1.02);
}

.dash-hover-sub-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-hover-icon-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.dash-hover-icon-btn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.dash-hover-icon-btn.btn-delete:hover {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
}

.dash-diagram-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #ffffff;
}

.dash-diagram-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-diagram-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}

.dash-diagram-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-meta-badge {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Empty State Card */
.dash-empty-state {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dash-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.dash-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.dash-empty-sub {
  font-size: 12px;
  color: #64748b;
  max-width: 380px;
  line-height: 1.4;
  margin: 0;
}

.dash-empty-btn {
  margin-top: 6px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.dash-empty-btn:hover {
  background: #0369a1;
}

/* Templates Section Grid */
.dash-templates-grid .dash-diagram-thumb {
  height: 144px;
}


/* Layer Selection & Recoloring Styles: Vibrant Dynamic Layer-Color Glow */
.sublayer-highlight-pulse,
.sublayer-selected-glow {
  outline: none !important;
  filter: drop-shadow(0 0 3px var(--layer-glow-color, #00f2fe)) 
          drop-shadow(0 0 7px var(--layer-glow-color, #0284c7)) 
          drop-shadow(0 0 14px var(--layer-glow-color, #38bdf8)) 
          brightness(1.25) !important;
  animation: sublayerGlowPulse 1.4s infinite alternate ease-in-out !important;
  transform-origin: center center;
}

@keyframes sublayerGlowPulse {
  0% {
    filter: drop-shadow(0 0 2px var(--layer-glow-color, #00f2fe)) 
            drop-shadow(0 0 5px var(--layer-glow-color, #0284c7)) 
            drop-shadow(0 0 9px var(--layer-glow-color, #38bdf8)) 
            brightness(1.15);
  }
  100% {
    filter: drop-shadow(0 0 4px var(--layer-glow-color, #00f2fe)) 
            drop-shadow(0 0 10px var(--layer-glow-color, #0284c7)) 
            drop-shadow(0 0 18px var(--layer-glow-color, #38bdf8)) 
            brightness(1.35);
  }
}

/* Sublayer Hover Preview Glow (Triggers when hovering over list rows or on canvas) */
.sublayer-hover-glow {
  outline: none !important;
  filter: drop-shadow(0 0 4px var(--hover-glow-color, #38bdf8)) 
          drop-shadow(0 0 10px var(--hover-glow-color, #0284c7)) 
          drop-shadow(0 0 16px var(--hover-glow-color, #00f2fe)) 
          brightness(1.3) !important;
  cursor: pointer !important;
  transition: filter 0.15s ease !important;
}

.sublayer-glow-overlay-path {
  fill: none !important;
  stroke: var(--overlay-glow-color, #00f2fe) !important;
  stroke-width: 2.5px !important;
  stroke-dasharray: 6 3 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter: drop-shadow(0 0 4px var(--overlay-glow-color, #0284c7)) 
          drop-shadow(0 0 8px var(--overlay-glow-color, #00f2fe)) !important;
  animation: sublayerDashMarch 1.2s linear infinite !important;
  pointer-events: none !important;
}

@keyframes sublayerDashMarch {
  to {
    stroke-dashoffset: -18;
  }
}

/* Select Arrow Button in Floating Toolbar & Inspector */
.sub-layer-select-arrow-btn,
.sft-sublayer-arrow-btn {
  background: transparent;
  border: 1px solid #373d44;
  border-radius: 4px;
  color: #38bdf8;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
  font-weight: bold;
}

.sub-layer-select-arrow-btn:hover,
.sft-sublayer-arrow-btn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.7);
  transform: scale(1.1);
}

.sub-layer-select-arrow-btn.active,
.sft-sublayer-arrow-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

/* Layer Color Active Arrow Mode */
#sftLayerColor.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6) !important;
}

#sftLayerColor.active svg {
  stroke: #ffffff !important;
}

#sftLayerColor.active span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

#sftSubLayerSelect.active,
#toolSubLayerSelect.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6) !important;
}

#sftSubLayerSelect.active svg,
#toolSubLayerSelect.active svg {
  stroke: #ffffff !important;
}

#sftSubLayerSelect.active span,
#toolSubLayerSelect.active span {
  color: #ffffff !important;
}

/* Canvas Sub-layer Hover Tooltip */
#canvasSubLayerTooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border: 1px solid #38bdf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 8px rgba(56, 189, 248, 0.5);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 10000;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  transform: translate(-50%, -140%);
  transition: opacity 0.1s ease;
}

/* ==========================================================================
   Visme Scientific Chart & Graph Studio Modal (Matches my.visme.co/editor/.../data)
   ========================================================================== */
.visme-chart-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  animation: vcmFadeIn 0.15s ease-out;
}

@keyframes vcmFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.visme-chart-modal-window {
  width: 96%;
  max-width: 1160px;
  height: 90vh;
  max-height: 750px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vcm-topbar,
.vcm-header {
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131d33;
  flex-shrink: 0;
}

.vcm-brand,
.vcm-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vcm-brand-icon {
  font-size: 20px;
}

.vcm-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.vcm-sub,
.vcm-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

.vcm-topbar-actions,
.vcm-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vcm-btn-secondary {
  height: 32px;
  padding: 0 14px;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.vcm-btn-secondary:hover {
  background: #334155;
  color: #ffffff;
}

.vcm-btn-primary {
  height: 32px;
  padding: 0 16px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
  transition: all 0.15s;
}

.vcm-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.vcm-close-btn,
.vcm-btn-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.vcm-close-btn:hover,
.vcm-btn-icon:hover {
  background: #1e293b;
  color: #f8fafc;
}

.vcm-main-body,
.vcm-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.vcm-types-rail {
  width: 210px;
  border-right: 1px solid #1e293b;
  background: #0b1120;
  overflow-y: auto;
  padding: 12px 8px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.vcm-types-scroll {
  flex: 1;
  overflow-y: auto;
}

.vcm-section-label,
.vcm-rail-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  padding: 4px 8px 6px 8px;
}

.vcm-type-card,
.vcm-type-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  margin-bottom: 3px;
  box-sizing: border-box;
}

.vcm-type-card:hover,
.vcm-type-btn:hover {
  background: #1e293b;
  color: #f8fafc;
}

.vcm-type-card.active,
.vcm-type-btn.active {
  background: rgba(2, 132, 199, 0.18);
  border-color: #0284c7;
  color: #38bdf8;
  font-weight: 700;
}

.vcm-type-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.vcm-type-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.vcm-type-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
}

.vcm-type-cat {
  font-size: 9.5px;
  color: #64748b;
}

.vcm-controls-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
  background: #0f172a;
  min-width: 360px;
  overflow: hidden;
}

.vcm-tabs-bar {
  height: 44px;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #1e293b;
  background: #131d33;
  padding: 0 16px;
  gap: 6px;
  flex-shrink: 0;
}

.vcm-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.vcm-tab-btn:hover {
  color: #e2e8f0;
}

.vcm-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.vcm-tab-panel {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
}

.vcm-data-toolbar,
.vcm-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.vcm-tool-btn {
  height: 28px;
  padding: 0 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 5px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.vcm-tool-btn:hover {
  background: #334155;
  color: #ffffff;
}

.vcm-table-wrap {
  max-height: 380px;
  overflow: auto;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0b1120;
  margin-bottom: 10px;
}

.vcm-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.vcm-data-table th {
  background: #1e293b;
  color: #f8fafc;
  font-weight: 600;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid #334155;
  white-space: nowrap;
}

.vcm-data-table td {
  padding: 4px 6px;
  border: 1px solid #1e293b;
  background: #0f172a;
}

.vcm-th-input {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
  width: 100%;
  box-sizing: border-box;
}

.vcm-td-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #f1f5f9;
  font-size: 11.5px;
  padding: 4px 6px;
  width: 100%;
  box-sizing: border-box;
}

.vcm-td-input:focus,
.vcm-th-input:focus {
  outline: none;
  border-color: #0284c7;
  background: #1e293b;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.vcm-cell-btn-del {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
}

.vcm-cell-btn-del:hover {
  background: rgba(239, 68, 68, 0.2);
}

.vcm-setting-row-2 {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.vcm-setting-group,
.vcm-field-group {
  margin-bottom: 12px;
  flex: 1;
}

.vcm-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 5px;
}

.vcm-input {
  width: 100%;
  height: 32px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 11.5px;
  padding: 0 10px;
  box-sizing: border-box;
}

.vcm-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.vcm-palette-picker,
.vcm-palettes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.vcm-palette-card {
  background: #1e293b;
  border: 1.5px solid #334155;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s;
  box-sizing: border-box;
}

.vcm-palette-card:hover {
  border-color: #64748b;
}

.vcm-palette-card.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.vcm-palette-preview {
  display: flex;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.vcm-swatch {
  flex: 1;
}

.vcm-palette-name {
  font-size: 10.5px;
  font-weight: 600;
  color: #cbd5e1;
}

.vcm-checkbox-list,
.vcm-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vcm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.vcm-checkbox-label input[type="checkbox"] {
  accent-color: #0284c7;
  width: 14px;
  height: 14px;
}

.vcm-preview-col {
  width: 440px;
  display: flex;
  flex-direction: column;
  background: #090e17;
  flex-shrink: 0;
}

.vcm-preview-header {
  height: 44px;
  border-bottom: 1px solid #1e293b;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  flex-shrink: 0;
}

.vcm-preview-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #38bdf8;
}

.vcm-preview-size {
  font-size: 10px;
  color: #64748b;
  font-family: monospace;
}

.vcm-preview-stage {
  flex: 1;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e293b 0%, #090e17 85%);
  overflow: auto;
}

.vcm-preview-stage svg {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  background: #ffffff;
}

.vcm-preview-footer {
  height: 56px;
  border-top: 1px solid #1e293b;
  background: #0f172a;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Left drawer hero button & chart card enhancements */
.vcm-hero-create-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   Visme Collapsible UI & Floating Canvas Controls (Matches User Uploaded Image)
   ========================================================================== */

/* 1. Left Drawer Collapse & Visme-Style Toggle Tab */
#assetDrawer {
  position: relative !important;
  overflow: visible !important;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease !important;
}

#assetDrawer.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border-right-color: transparent !important;
  overflow: visible !important;
}

#assetDrawer.collapsed > *:not(.drawer-collapse-pill-btn) {
  display: none !important;
}

.drawer-collapse-pill-btn {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  width: 18px;
  height: 116px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: -1px;
  outline: none;
  filter: drop-shadow(2px 0 3px rgba(0, 0, 0, 0.25));
  transition: filter 0.15s ease;
}

.drawer-collapse-pill-btn:hover {
  filter: drop-shadow(3px 0 6px rgba(0, 0, 0, 0.35));
}

.drawer-collapse-pill-btn .tab-curve-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 116px;
  pointer-events: none;
}

.drawer-collapse-pill-btn .tab-curve-bg path {
  fill: #202a39;
  transition: fill 0.15s ease;
}

.drawer-collapse-pill-btn:hover .tab-curve-bg path {
  fill: #2a3a4e;
}

.drawer-collapse-pill-btn .tab-chevron-icon {
  position: relative;
  z-index: 2;
  margin-left: -2px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.drawer-collapse-pill-btn .tab-chevron-icon path {
  stroke: #ffffff;
  transition: stroke 0.15s ease;
}

.drawer-collapse-pill-btn:hover .tab-chevron-icon path {
  stroke: #38bdf8;
}

#assetDrawer.collapsed .drawer-collapse-pill-btn {
  left: 0;
  margin-left: 0;
}

#assetDrawer.collapsed .drawer-collapse-pill-btn .tab-chevron-icon {
  transform: rotate(180deg);
}

/* 2. Right Inspector Collapse & Visme-Style Toggle Tab */
#propertiesInspector {
  position: relative !important;
  overflow: visible !important;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease !important;
}

#propertiesInspector.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border-left-color: transparent !important;
  overflow: visible !important;
}

#propertiesInspector.collapsed > *:not(.inspector-collapse-pill-btn) {
  display: none !important;
}

.inspector-collapse-pill-btn {
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  width: 18px;
  height: 116px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-right: -1px;
  outline: none;
  filter: drop-shadow(-2px 0 3px rgba(0, 0, 0, 0.25));
  transition: filter 0.15s ease;
}

.inspector-collapse-pill-btn:hover {
  filter: drop-shadow(-3px 0 6px rgba(0, 0, 0, 0.35));
}

.inspector-collapse-pill-btn .tab-curve-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 116px;
  pointer-events: none;
}

.inspector-collapse-pill-btn .tab-curve-bg path {
  fill: #181b1f;
  transition: fill 0.15s ease;
}

.inspector-collapse-pill-btn:hover .tab-curve-bg path {
  fill: #242930;
}

.inspector-collapse-pill-btn .tab-chevron-icon {
  position: relative;
  z-index: 2;
  margin-right: -2px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.inspector-collapse-pill-btn .tab-chevron-icon path {
  stroke: #ffffff;
  transition: stroke 0.15s ease;
}

.inspector-collapse-pill-btn:hover .tab-chevron-icon path {
  stroke: #38bdf8;
}

#propertiesInspector.collapsed .inspector-collapse-pill-btn {
  right: 0;
  margin-right: 0;
}

#propertiesInspector.collapsed .inspector-collapse-pill-btn .tab-chevron-icon {
  transform: rotate(180deg);
}

/* 3. Visme Floating Chart Context Bar (Matches Uploaded Screenshot) */
.canvas-chart-floating-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  height: 44px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  padding: 3px 8px;
  gap: 6px;
  z-index: 1200;
  user-select: none;
  animation: vcmPillFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-chart-btn-main {
  height: 32px;
  padding: 0 14px;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.floating-chart-btn-main:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.floating-chart-divider {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
  margin: 0 2px;
}

.floating-chart-types-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.floating-type-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #334155;
  padding: 0;
}

.floating-type-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.floating-type-btn.active {
  background: #e0f2fe;
  border-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.floating-chart-btn-chevron {
  width: 26px;
  height: 26px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}

.floating-chart-btn-chevron:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* 4. Visme Floating Sub-Pill Handle Below Selected Item - REMOVED */
.canvas-object-sub-pill {
  display: none !important;
}

/* 5. Visme Bottom Coordinate HUD Pill */
.canvas-coordinates-hud {
  display: none !important;
}
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
  user-select: none;
}

.canvas-coordinates-hud .hud-key {
  color: #64748b;
  font-weight: 700;
  margin-right: 2px;
}

.canvas-coordinates-hud span[id^="hudVal"] {
  color: #f8fafc;
  font-weight: 600;
}

/* ==========================================================================
   VISME EXACT EDITOR UI STYLING (Pixel-Matched to media_1792847501110_dc9d9bc8.png)
   ========================================================================== */

/* 1. Visme Top Title Bar (Navy #182230) */
#titleBar.visme-top-bar {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  background-color: #182230 !important;
  border-bottom: 1px solid #243144 !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  z-index: 200 !important;
  color: #ffffff !important;
}

.visme-top-bar .titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visme-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.visme-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.visme-live-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: #94a3b8;
  margin-left: 4px;
  margin-right: 6px;
  user-select: none;
}

.visme-live-status .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.visme-live-status .live-online {
  color: #10b981;
  font-weight: 700;
}

.visme-top-bar .titlebar-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visme-project-title-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 5px 12px;
  outline: none;
  transition: all 0.15s ease;
  min-width: 230px;
  text-align: center;
}

.visme-project-title-input:hover,
.visme-project-title-input:focus {
  background: #202b3d;
  border-color: #3b82f6;
}

.visme-center-pill {
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: #202b3d;
  border: 1px solid #2e3d54;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.visme-center-pill:hover {
  background: #2b3a52;
  color: #ffffff;
  border-color: #475569;
}

.visme-top-bar .titlebar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visme-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #00b894;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 184, 148, 0.4);
}

.visme-add-collab-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #202b3d;
  border: 1px solid #334155;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.visme-add-collab-btn:hover {
  background: #2d3d57;
  color: #ffffff;
}

.visme-btn-pill {
  height: 30px;
  padding: 0 14px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.visme-btn-pill.visme-btn-dark {
  background: #243144;
  color: #ffffff;
}

.visme-btn-pill.visme-btn-dark:hover {
  background: #31425b;
}

.visme-btn-pill.visme-btn-blue {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.visme-btn-pill.visme-btn-blue:hover {
  background: #0369a1;
}

.visme-btn-pill.visme-btn-gold {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.visme-btn-pill.visme-btn-gold:hover {
  background: #d97706;
}

/* 2. Left Tool Rail (64px, #131b26) */
#leftRail {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  background-color: #131b26 !important;
  border-right: 1px solid #1f2a3a !important;
  padding: 8px 0 !important;
  gap: 3px !important;
}

#leftRail .rail-item-btn {
  width: 56px !important;
  height: 52px !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#leftRail .rail-item-btn:hover {
  background: #1c2737 !important;
  color: #ffffff !important;
}

#leftRail .rail-item-btn.active {
  background: transparent !important;
  color: #ffffff !important;
}

#leftRail .rail-item-btn.active .rail-item-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.45) !important;
}

#leftRail .rail-item-text {
  font-size: 10px !important;
  font-weight: 500 !important;
  color: inherit !important;
}

/* 3. Left Drawer (#assetDrawer, 290px, #202a39) */
#assetDrawer {
  background-color: #202a39 !important;
  border-right: 1px solid #2d3b4e !important;
  width: 290px !important;
  min-width: 290px !important;
  max-width: 290px !important;
  color: #f1f5f9 !important;
}

.visme-drawer-header {
  padding: 14px 16px 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #2d3b4e;
}

.visme-drawer-back-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}

.visme-drawer-back-btn:hover {
  color: #38bdf8;
}

.visme-drawer-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.visme-charts-toggle-bar {
  display: flex;
  background: #151d29;
  border-radius: 8px;
  padding: 3px;
  margin: 12px 16px;
  border: 1px solid #29374c;
}

.visme-toggle-btn {
  flex: 1;
  height: 30px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.visme-toggle-btn.active {
  background: #2b3a4f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.visme-beta-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.visme-charts-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px 6px 16px;
}

.visme-chart-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 16px 14px 16px;
}

.visme-chart-card {
  background: #182230;
  border: 1px solid #2b3a4f;
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.visme-chart-card:hover {
  background: #232f42;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.visme-chart-card .card-thumb-svg {
  width: 70px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visme-chart-card .card-label {
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
}

/* 4. Visme Action Ribbon & Canvas Viewport */
#actionRibbon {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  background-color: #1e2837 !important;
  border-bottom: 1px solid #28374b !important;
  display: flex !important;
  align-items: center !important;
  z-index: 50 !important;
}

#actionRibbon .ribbon-search-section {
  width: 290px !important;
  min-width: 290px !important;
  max-width: 290px !important;
  background-color: #1a2330 !important;
  border-right: 1px solid #28374b !important;
  padding: 5px 8px !important;
}

#actionRibbon .search-input-wrap {
  height: 30px !important;
  background-color: #111822 !important;
  border: 1px solid #33445c !important;
  border-radius: 6px !important;
}

#actionRibbon .search-input-wrap:focus-within {
  border-color: #0284c7 !important;
}

#actionRibbon .ribbon-tools-section {
  background-color: #1e2837 !important;
  height: 100% !important;
  padding: 0 12px 0 6px !important;
}

#actionRibbon .vertical-tool-btn {
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 6px !important;
  color: #94a3b8 !important;
  transition: all 0.12s ease !important;
}

#actionRibbon .vertical-tool-btn:hover {
  background-color: #28374b !important;
  color: #ffffff !important;
}

#actionRibbon .vertical-tool-btn.active {
  background-color: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

#actionRibbon .export-split-btn {
  height: 30px !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35) !important;
}

#rulerCorner, #rulerTop, #rulerLeft {
  display: none !important;
}

#canvasHost {
  background-color: #edf2f7 !important;
  transition: background-color 0.2s ease;
}

#canvasViewport {
  background-color: #edf2f7 !important;
  transition: background-color 0.2s ease;
}

#canvasHost.dark-contrast,
#canvasViewport.dark-contrast,
.dark-contrast #canvasViewport,
.dark-contrast #canvasHost {
  background-color: #475569 !important; /* Neutral dark grey contrast behind canvas */
}

#svgCanvas {
  background: #ffffff !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border-radius: 2px !important;
  outline: none !important;
}

.canvas-context-ribbon {
  display: none !important;
}

.cc-ribbon-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.cc-ribbon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.cc-ribbon-divider {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 4px;
}

.cc-ribbon-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.cc-ribbon-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* 5. Right Properties & Style Inspector Panel (290px width - BioRender / Desktop standard) */
#propertiesInspector {
  width: 290px !important;
  min-width: 290px !important;
  max-width: 290px !important;
  background-color: #181b1f !important;
  border-left: 1px solid #2d3748 !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 40 !important;
  height: 100% !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: visible !important;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#propertiesInspector.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border-left-color: transparent !important;
  overflow: visible !important;
}

#propertiesInspector.collapsed > *:not(.inspector-collapse-pill-btn) {
  display: none !important;
}

.inspector-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.inspector-bg-swatch {
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.inspector-bg-swatch:hover {
  transform: scale(1.12);
  border-color: #38bdf8 !important;
}

/* 6. Visme Bottom Stage HUD */
.canvas-stage-hud {
  display: none !important;
}
  gap: 10px;
  z-index: 99;
  color: #cbd5e1;
  font-size: 11.5px;
  user-select: none;
}

.stage-hud-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.stage-hud-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.stage-hud-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-family: monospace;
}

/* ==========================================================================
   GLOBAL SCROLLBAR REMOVAL (Visme Zero-Scrollbar Aesthetic)
   ========================================================================== */
*, *::before, *::after {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

html, body, #workspace, #leftRail, .drawer-panel-view,
#drawerCategoryList, #categoryItemsContainer, #subcategoryItemsContainer,
#drawerAssetView, #canvasHost, #canvasViewport,
.inspector-body, #vismeSlidesPanel, #vismeSlidesList,
.flyout-right-panel, .desktop-flyout-popup, .vcm-spreadsheet-container {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overflow-x: hidden !important;
}

/* Drawer category headers and labels high-contrast typography */
#categoryItemsContainer {
  padding: 4px 0 16px 0;
  overflow-y: auto;
  overflow-x: hidden !important;
}

.drawer-category-list {
  background: #202a39 !important;
}

.drawer-sub-header {
  background-color: #182230 !important;
  border-bottom: 1px solid #28374b !important;
  color: #ffffff !important;
}

.drawer-sub-header * {
  color: #ffffff !important;
}

.drawer-sub-header .back-to-cats-btn {
  color: #38bdf8 !important;
}

.drawer-section-title {
  color: #94a3b8 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* ==========================================================================
   Visme Data Panel & Widgets Styles (Exact Match to User Reference Images)
   ========================================================================== */

/* 1. Main Data Menu Items (Image 1: media_1792874079117_9433662d.png) */
.visme-data-menu-item {
  width: 100%;
  height: 62px;
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.visme-data-menu-item:hover {
  background-color: #27364b;
  border-color: #38bdf8;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.visme-data-menu-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.visme-data-menu-label {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

/* 2. Subview Panels */
.data-subview-panel {
  background-color: #202a39;
  box-sizing: border-box;
}

/* 3. Data Widgets 2-Column Grid & Tiles (Image 2: media_1792874128434_fc277c92.png) */
.visme-widgets-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.visme-widget-tile {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 6px;
  box-sizing: border-box;
}

.visme-widget-tile:hover {
  background-color: #26354a;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 4. Maps 2-Column Grid & Cards (Image 3: media_1792874170804_35c9ad1e.png) */
.visme-maps-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.visme-map-card {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  height: 115px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 8px 4px;
  box-sizing: border-box;
}

.visme-map-card:hover {
  background-color: #26354a;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.map-card-thumb {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-card-label {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
}

/* 5. Tables 2-Column Grid & Cards (Image 5: media_1792874214976_e6a51285.png) */
.visme-tables-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.visme-table-card {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 6px;
  box-sizing: border-box;
}

.visme-table-card:hover {
  background-color: #26354a;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 6. Interactive Maps Modal Dialog (Image 4: media_1792874189578_acb0281c.png) */
.visme-maps-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visme-maps-modal-window {
  width: 900px;
  max-width: 95vw;
  height: 560px;
  max-height: 90vh;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.visme-maps-modal-header {
  height: 48px;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
}

.visme-maps-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.visme-maps-modal-close:hover {
  color: #0f172a;
}

.visme-maps-modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.visme-maps-preview-pane {
  flex: 1.35;
  border-right: 1px solid #e2e8f0;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
}

.visme-maps-preview-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  margin-bottom: 14px;
}

.visme-maps-preview-canvas-box {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 8px;
}

.visme-maps-preview-canvas-box svg {
  max-width: 98%;
  max-height: 98%;
  width: auto;
  height: auto;
  display: block;
}

.visme-maps-edit-btn {
  background-color: #334155;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 7px 16px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.visme-maps-edit-btn:hover {
  background-color: #1e293b;
}

.visme-maps-customizer-pane {
  flex: 1;
  padding: 16px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  min-height: 0;
  overflow: hidden;
}

.visme-maps-tabs-header {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  gap: 18px;
  margin-bottom: 14px;
}

.visme-maps-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 4px 10px 4px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.visme-maps-tab.active {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
}

.visme-maps-search-box {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  height: 36px;
  margin-bottom: 12px;
}

.visme-maps-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 12.5px;
  color: #0f172a;
  padding-left: 8px;
}

.visme-maps-country-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid #f1f5f9;
}

.map-country-group-header {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  padding: 10px 0 4px 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-country-group-header .group-line {
  flex: 1;
  height: 1px;
  background-color: #e2e8f0;
}

.map-country-item {
  padding: 8px 10px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.map-country-item:hover {
  background-color: #f8fafc;
  color: #0284c7;
}

.map-country-item.active {
  background-color: #e0f2fe;
  color: #0284c7;
  font-weight: 600;
}

.visme-maps-insert-btn {
  width: 100%;
  height: 42px;
  flex-shrink: 0;
  background-color: #22a7f0;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(34, 167, 240, 0.35);
}

.visme-maps-insert-btn:hover {
  background-color: #1a94d8;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

/* 7. Visme Map Data Table & Settings Editor (Matches media_1792914484185_524c82bc.png) */
.visme-map-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: Inter, -apple-system, sans-serif;
}

.visme-map-data-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  padding: 6px 8px;
  text-align: left;
  height: 32px;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.visme-map-data-table tbody td {
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  padding: 4px 6px;
  height: 28px;
  vertical-align: middle;
}

.visme-map-data-table tbody tr:hover {
  background-color: #f8fafc;
}

.visme-map-data-table tbody tr.active-country-row {
  background-color: #eff6ff;
}

.map-table-idx {
  width: 32px;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
}

.map-table-eye {
  width: 28px;
  text-align: center;
  cursor: pointer;
  color: #475569;
  user-select: none;
  transition: opacity 0.15s;
}

.map-table-eye.hidden-country {
  opacity: 0.25;
}

.map-table-swatch-box {
  width: 44px;
  text-align: center;
}

.map-table-color-swatch {
  width: 26px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.map-table-val-input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
  color: #334155;
  outline: none;
  font-family: inherit;
}

.visme-map-add-col-rail {
  width: 34px;
  background: #f1f5f9;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding-top: 8px;
  transition: background 0.15s;
  user-select: none;
}

.visme-map-add-col-rail:hover {
  background: #e2e8f0;
}

.rail-add-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rail-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* =========================================================================
   GOOGLE FONTS & TYPOGRAPHY DROPDOWNS
   ========================================================================= */
select.text-format-select optgroup,
select#ittFont optgroup,
select#propFontFamily optgroup,
select#textFontFamilySelect optgroup {
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  background: #1e2227;
  padding: 4px 6px;
}

select#ittFont option,
select#propFontFamily option,
select#textFontFamilySelect option {
  font-size: 13px;
  color: #f1f5f9;
  background: #23272d;
  padding: 4px 8px;
}

select.text-format-select {
  background: #ffffff;
  color: #0f172a;
}

select.text-format-select optgroup {
  background: #f1f5f9;
  color: #64748b;
}

select.text-format-select option {
  background: #ffffff;
  color: #0f172a;
  padding: 4px 8px;
  font-size: 13px;
}







/* =========================================================================
   8. VISME MAP SETTINGS STYLES (Exact Match: media_1792915119550_fd50ae83.png)
   ========================================================================= */
.visme-settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.visme-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.visme-setting-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
}

.visme-setting-subtext {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.3;
}

.visme-setting-swatch {
  width: 32px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.visme-setting-swatch:hover {
  transform: scale(1.05);
  border-color: #94a3b8;
}

.visme-setting-swatch-square {
  width: 22px;
  height: 22px;
  border-radius: 3px;
}

.visme-setting-select {
  height: 26px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 8px;
  color: #334155;
  background-color: #ffffff;
  outline: none;
  cursor: pointer;
}

.visme-setting-select:focus {
  border-color: #0284c7;
}

/* iOS-style toggle switch matching Visme */
.visme-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.visme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.visme-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: background-color 0.2s ease;
  border-radius: 22px;
}

.visme-switch-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: transform 0.2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.visme-switch input:checked + .visme-switch-slider {
  background-color: #0ea5e9;
}

.visme-switch input:checked + .visme-switch-slider::before {
  transform: translateX(16px);
}

/* Checkerboard transparency background for live export preview */
.export-preview-checkered {
  background-color: #0f172a !important;
  background-image: linear-gradient(45deg, #1e293b 25%, transparent 25%),
                    linear-gradient(-45deg, #1e293b 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #1e293b 75%),
                    linear-gradient(-45deg, transparent 75%, #1e293b 75%) !important;
  background-size: 16px 16px !important;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px !important;
}


/* ==========================================================================
   Visible Modern Scrollbar for Left Drawer Asset Grid
   ========================================================================== */
#drawerAssetGrid {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: #38bdf8 #182230 !important;
}

#drawerAssetGrid::-webkit-scrollbar {
  width: 6px !important;
  display: block !important;
}

#drawerAssetGrid::-webkit-scrollbar-track {
  background: #182230 !important;
}

#drawerAssetGrid::-webkit-scrollbar-thumb {
  background: #334155 !important;
  border-radius: 4px !important;
}

#drawerAssetGrid::-webkit-scrollbar-thumb:hover {
  background: #38bdf8 !important;
}
