/* ==========================================================================
   BUILD REAL STUDIO — PROFESSIONAL STYLING
   Brand language: White primary workspace, light-gray secondary surfaces,
   Build Real blue (#2563eb / #1e0935), Build Real orange (#f97316),
   subtle borders (#e2e8f0), restrained cards, professional typography.
   ========================================================================== */

:root {
  --studio-bg: #f8fafc;
  --studio-surface: #ffffff;
  --studio-surface-subtle: #f1f5f9;
  --studio-surface-hover: #e2e8f0;
  
  --studio-border: #e2e8f0;
  --studio-border-strong: #cbd5e1;
  --studio-border-focus: #3b82f6;

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

  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --brand-blue-light: #eff6ff;
  --brand-blue-border: #bfdbfe;

  --brand-orange: #f97316;
  --brand-orange-hover: #ea580c;
  --brand-orange-light: #fff7ed;
  --brand-orange-border: #fed7aa;

  --brand-purple: #7c3aed;
  --brand-purple-light: #f5f3ff;

  --studio-success: #10b981;
  --studio-success-light: #ecfdf5;
  --studio-warning: #f59e0b;
  --studio-warning-light: #fffbeb;
  --studio-danger: #ef4444;
  --studio-danger-light: #fef2f2;

  --topbar-height: 54px;
  --left-panel-width: 300px;
  --right-panel-width: 340px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-floating: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Dark Mode Tokens (Explicit / System Resolved) */
:root[data-theme="dark"],
html.dark,
html[data-theme="dark"],
body[data-theme="dark"] {
  --studio-bg: #090d16;
  --studio-surface: #0f172a;
  --studio-surface-subtle: #172033;
  --studio-surface-hover: #1e293b;
  
  --studio-border: #1e293b;
  --studio-border-strong: #334155;
  --studio-border-focus: #60a5fa;

  --studio-text-main: #f8fafc;
  --studio-text-muted: #94a3b8;
  --studio-text-light: #64748b;

  --brand-blue-light: #172033;
  --brand-blue-border: #2563eb;

  --brand-orange-light: #27160c;
  --brand-orange-border: #c2410c;

  --brand-purple-light: #27174a;

  --studio-success-light: #052e16;
  --studio-warning-light: #451a03;
  --studio-danger-light: #450a0a;

  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
  --shadow-floating: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

/* Fallback pure CSS media query for Phone Dark Mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --studio-bg: #090d16;
    --studio-surface: #0f172a;
    --studio-surface-subtle: #172033;
    --studio-surface-hover: #1e293b;
    
    --studio-border: #1e293b;
    --studio-border-strong: #334155;
    --studio-border-focus: #60a5fa;

    --studio-text-main: #f8fafc;
    --studio-text-muted: #94a3b8;
    --studio-text-light: #64748b;

    --brand-blue-light: #172033;
    --brand-blue-border: #2563eb;

    --brand-orange-light: #27160c;
    --brand-orange-border: #c2410c;

    --brand-purple-light: #27174a;

    --studio-success-light: #052e16;
    --studio-warning-light: #451a03;
    --studio-danger-light: #450a0a;

    --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
    --shadow-floating: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  }
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--studio-bg);
  color: var(--studio-text-main);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   STUDIO CONTAINER & APP SHELL
   -------------------------------------------------------------------------- */

.studio-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--studio-bg);
}

/* --------------------------------------------------------------------------
   TOP NAVIGATION BAR
   -------------------------------------------------------------------------- */

.studio-topbar {
  height: var(--topbar-height);
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
  user-select: none;
  flex-shrink: 0;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Mobile Menu Toggler */
.mobile-menu-toggler {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mobile-menu-toggler:hover {
  background: #1e293b;
}

.toggler-icon {
  font-size: 14px;
}

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

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  color: var(--studio-text-main);
  letter-spacing: -0.02em;
}

.brand-bolt {
  font-size: 15px;
  color: var(--brand-orange);
}

.studio-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue-border);
  border-radius: var(--radius-sm);
}

.project-name-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--studio-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.project-name-badge:hover {
  background: var(--studio-surface-hover);
  border-color: var(--studio-border-strong);
}

.project-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--studio-success);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   WORKSPACE LAYOUT (DARK SIDEBAR + WHITE MAIN VIEWPORT)
   -------------------------------------------------------------------------- */

.studio-workspace-layout {
  display: flex;
  height: calc(100vh - var(--topbar-height));
  width: 100vw;
  overflow: hidden;
  background: var(--studio-bg);
  position: relative;
}

/* Mobile Backdrop */
.sidebar-backdrop {
  display: none;
}

/* --------------------------------------------------------------------------
   LEFT-HAND SIDE MENU (Dark / Black Background)
   -------------------------------------------------------------------------- */

.studio-sidebar-menu {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  background: #080c14;
  border-right: 1px solid #1e293b;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 50;
  user-select: none;
}

.sidebar-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.sidebar-menu-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

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

.sidebar-menu-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar-menu-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar-menu-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu-scroll::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 10px;
}

.side-menu-group {
  margin-bottom: 14px;
}

.side-menu-label {
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 6px 16px 4px;
  text-transform: uppercase;
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.side-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
}

.side-menu-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
}

.side-menu-item.active {
  background: #1e293b;
  color: #ffffff;
  font-weight: 750;
  box-shadow: inset 3px 0 0 #38bdf8, 0 1px 3px rgba(0, 0, 0, 0.3);
}

.side-menu-item.active .menu-item-icon {
  transform: scale(1.1);
}

.menu-item-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.menu-item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-live {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-visual {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.badge-ai {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.sidebar-menu-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #05080f;
}

.sidebar-status-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 8px 10px;
}

.sidebar-status-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  color: #f8fafc;
}

.sidebar-status-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-status-sub {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   MAIN VIEWPORT CANVAS (White Background)
   -------------------------------------------------------------------------- */

.studio-main-viewport {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--studio-bg);
  color: var(--studio-text-main);
  position: relative;
}

.studio-main-viewport::-webkit-scrollbar {
  width: 8px;
}

.studio-main-viewport::-webkit-scrollbar-track {
  background: var(--studio-bg);
}

.studio-main-viewport::-webkit-scrollbar-thumb {
  background: var(--studio-border-strong);
  border-radius: 4px;
}

/* Device Viewport Selector */
.device-switcher-bar,
.device-selector-group {
  display: inline-flex;
  align-items: center;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.device-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--studio-text-muted);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.device-btn:hover {
  color: var(--studio-text-main);
  background: rgba(0, 0, 0, 0.04);
}

.device-btn.active {
  background: var(--studio-surface);
  color: var(--brand-blue);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Action Buttons */
.btn-studio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-studio-secondary {
  background: var(--studio-surface);
  border-color: var(--studio-border);
  color: var(--studio-text-main);
}

.btn-studio-secondary:hover {
  background: var(--studio-surface-subtle);
  border-color: var(--studio-border-strong);
}

.btn-studio-primary {
  background: var(--brand-orange);
  color: #ffffff;
  border-color: #ea580c;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.2);
}

.btn-studio-primary:hover {
  background: var(--brand-orange-hover);
}

/* --------------------------------------------------------------------------
   MAIN STUDIO WORKSPACE (3-COLUMN LAYOUT)
   -------------------------------------------------------------------------- */

.studio-main-workspace {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
  position: relative;
  width: 100vw;
}

/* --------------------------------------------------------------------------
   LEFT TOOLBOX / SIDEBAR PANEL
   -------------------------------------------------------------------------- */

.studio-left-panel {
  width: var(--left-panel-width);
  min-width: var(--left-panel-width);
  max-width: var(--left-panel-width);
  background: var(--studio-surface);
  border-right: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  user-select: none;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-header,
.left-panel-nav {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--studio-border);
  background: var(--studio-surface-subtle);
  padding: 4px;
}

.sidebar-nav-tabs {
  display: flex;
  width: 100%;
  gap: 2px;
}

.sidebar-tab-btn {
  flex: 1;
  padding: 6px 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--studio-text-muted);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sidebar-tab-btn:hover {
  color: var(--studio-text-main);
  background: rgba(0, 0, 0, 0.03);
}

.sidebar-tab-btn.active {
  background: var(--studio-surface);
  color: var(--brand-blue);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-content-body,
.left-panel-content {
  flex: 1;
  overflow-y: auto;
  display: block;
  height: calc(100% - 44px);
}

.element-search-bar,
.left-panel-search {
  padding: 10px 12px 6px;
  position: relative;
}

.element-search-input,
.search-input {
  width: 100%;
  padding: 6px 10px;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--studio-text-main);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.element-search-input:focus,
.search-input:focus {
  border-color: var(--studio-border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Category Sections */
.elements-category-group,
.elements-category {
  margin-bottom: 16px;
}

.category-header-title,
.category-header {
  font-size: 10.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--studio-text-muted);
  margin-bottom: 8px;
  padding: 0 2px;
}

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

.draggable-element-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  cursor: grab;
  text-align: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
}

.draggable-element-item:hover {
  border-color: var(--brand-blue-border);
  background: var(--brand-blue-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.draggable-element-item:active {
  cursor: grabbing;
}

.draggable-element-item .elem-icon {
  font-size: 16px;
  color: var(--brand-blue);
}

.draggable-element-item .elem-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--studio-text-main);
  white-space: nowrap;
}

/* Navigator Tree */
.navigator-tree {
  list-style: none;
  font-size: 12px;
}

.tree-node-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 2px;
  color: var(--studio-text-main);
  transition: background 0.1s ease;
}

.tree-node-item:hover {
  background: var(--studio-surface-subtle);
}

.tree-node-item.selected {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  font-weight: 600;
}

.tree-node-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-node-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.tree-node-item:hover .tree-node-actions,
.tree-node-item.selected .tree-node-actions {
  opacity: 1;
}

.tree-action-btn {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
}

.tree-action-btn:hover {
  color: var(--studio-text-main);
  background: rgba(0,0,0,0.06);
}

/* Pages Manager */
.pages-manager-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-list-item:hover {
  border-color: var(--studio-border-strong);
  background: var(--studio-surface-subtle);
}

.page-list-item.active {
  border-color: var(--brand-blue);
  background: var(--brand-blue-light);
}

.page-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--studio-text-main);
}

.home-page-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 5px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   CENTER CANVAS WORKSPACE (EXPANDS TO FILL REMAINING SPACE)
   -------------------------------------------------------------------------- */

.studio-center-canvas {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.studio-canvas-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: calc(100% - 32px);
  position: relative;
  overflow: hidden;
}

/* Canvas Viewport Container */
.canvas-viewport-container {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
  position: relative;
  box-sizing: border-box;
}

.canvas-device-frame {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.canvas-device-frame.desktop-mode {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.canvas-device-frame.laptop-mode {
  width: 1024px;
  max-width: 100%;
  height: 680px;
  max-height: 100%;
  border-radius: 8px;
}

.canvas-device-frame.tablet-mode {
  width: 768px;
  max-width: 100%;
  height: 860px;
  max-height: 100%;
  border-radius: 12px;
}

.canvas-device-frame.mobile-mode {
  width: 375px;
  max-width: 100%;
  height: 680px;
  max-height: 100%;
  border-radius: 28px;
  border: 6px solid #1e293b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.canvas-render-iframe,
.canvas-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
}

/* Visual Selection Overlay on Canvas */
.canvas-selection-box {
  position: absolute;
  border: 2px solid var(--brand-blue);
  pointer-events: none;
  z-index: 40;
  display: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.selection-tag-pill {
  position: absolute;
  top: -24px;
  left: -2px;
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.selection-quick-bar {
  position: absolute;
  bottom: -32px;
  right: -2px;
  background: var(--studio-text-main);
  color: #ffffff;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
  box-shadow: var(--shadow-floating);
}

.selection-quick-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 3px 6px;
  font-size: 10.5px;
  cursor: pointer;
  border-radius: 3px;
}

.selection-quick-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   CANVAS STATUS BAR
   -------------------------------------------------------------------------- */

.canvas-status-bar,
.studio-statusbar {
  height: 32px;
  background: var(--studio-surface);
  border-top: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 11px;
  color: var(--studio-text-muted);
  user-select: none;
  flex-shrink: 0;
  z-index: 10;
}

.status-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--studio-success);
}

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

/* --------------------------------------------------------------------------
   RIGHT INSPECTOR PANEL (ELEMENT SETTINGS)
   -------------------------------------------------------------------------- */

.studio-right-panel {
  width: var(--right-panel-width);
  min-width: var(--right-panel-width);
  max-width: var(--right-panel-width);
  background: var(--studio-surface);
  border-left: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  user-select: none;
  flex-shrink: 0;
  overflow: hidden;
}

.inspector-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.inspector-title {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--studio-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.inspector-element-tag {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--studio-text-muted);
}

/* Primary Tabs (CONTENT / STYLE / ADVANCED) */
.inspector-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--studio-border);
  background: var(--studio-surface-subtle);
  flex-shrink: 0;
}

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

.inspector-tab-btn:hover {
  color: var(--studio-text-main);
}

.inspector-tab-btn.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
  background: var(--studio-surface);
}

.inspector-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

/* Form Controls & Groups in Inspector */
.inspector-group {
  margin-bottom: 18px;
}

.inspector-group-title {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--studio-text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspector-field {
  margin-bottom: 10px;
}

.inspector-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--studio-text-main);
  margin-bottom: 4px;
}

.inspector-input,
.inspector-select,
.inspector-textarea {
  width: 100%;
  padding: 6px 9px;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--studio-text-main);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.inspector-input:focus,
.inspector-select:focus,
.inspector-textarea:focus {
  border-color: var(--studio-border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.inspector-textarea {
  resize: vertical;
  min-height: 60px;
}

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

.inspector-col {
  flex: 1;
}

/* Visual Box Model (Margin & Padding) */
.box-model-widget {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  position: relative;
  margin-top: 8px;
}

.box-model-margin {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  padding: 10px;
  position: relative;
}

.box-model-padding {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 10px;
  position: relative;
}

.box-model-center {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--studio-text-muted);
}

.box-input {
  width: 36px;
  padding: 2px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
}

/* --------------------------------------------------------------------------
   TABBED CODE EDITOR VIEW
   -------------------------------------------------------------------------- */

.studio-code-editor-view {
  flex: 1;
  display: none;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  position: relative;
}

.code-editor-tabs {
  height: 36px;
  background: #f8fafc;
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
  overflow-x: auto;
}

.code-file-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--studio-text-muted);
  cursor: pointer;
  user-select: none;
}

.code-file-tab.active {
  background: #ffffff;
  border-color: var(--studio-border);
  border-bottom-color: #ffffff;
  color: var(--brand-blue);
}

.code-editor-workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.code-file-sidebar {
  width: 220px;
  background: #f8fafc;
  border-right: 1px solid var(--studio-border);
  padding: 10px;
  overflow-y: auto;
}

.code-editor-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.code-editor-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  border: none;
  outline: none;
  resize: none;
  color: #1e293b;
  background: #ffffff;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

/* --------------------------------------------------------------------------
   MODAL DIALOGS & POPUPS
   -------------------------------------------------------------------------- */

.studio-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.studio-modal-backdrop.active {
  display: flex;
}

.studio-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--studio-border);
  box-shadow: var(--shadow-modal);
  width: min(720px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.studio-modal-header h2,
.studio-modal-header h3 {
  font-size: 15px;
  font-weight: 750;
  color: var(--studio-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--studio-text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  background: var(--studio-surface-subtle);
  color: var(--studio-text-main);
}

.studio-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.studio-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #fafbfc;
}

/* --------------------------------------------------------------------------
   SECURITY SCANNER STYLES
   -------------------------------------------------------------------------- */

.scan-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.scan-stat-card {
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.scan-stat-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--studio-text-muted);
  margin-bottom: 4px;
}

.scan-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--studio-text-main);
}

.finding-item-card {
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #ffffff;
}

.finding-item-card.critical {
  border-left: 4px solid var(--studio-danger);
}

.finding-item-card.high {
  border-left: 4px solid #f97316;
}

.finding-item-card.medium {
  border-left: 4px solid var(--studio-warning);
}

.finding-item-card.low {
  border-left: 4px solid var(--brand-blue);
}

.finding-item-card.info {
  border-left: 4px solid #64748b;
}

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

.finding-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--studio-text-main);
}

.finding-desc {
  font-size: 12px;
  color: var(--studio-text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   PROJECT CONTROL CENTER & WORKSPACE VIEWS
   -------------------------------------------------------------------------- */

.studio-app-body {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
  background: var(--studio-bg);
}

.workspace-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  overflow: hidden;
  background: var(--studio-bg);
}

.workspace-view.active {
  display: block;
}

/* Control Center Dashboard Container */
.control-center-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 32px 60px;
  height: 100%;
  overflow-y: auto;
}

.cc-project-hero {
  background: #ffffff;
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.cc-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.cc-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.cc-pill-framework {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.cc-pill-tech {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.cc-pill-neutral {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.cc-project-title {
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--studio-text-main);
  margin-bottom: 8px;
}

.cc-stats-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--studio-text-muted);
}

.cc-stats-ribbon strong {
  color: var(--studio-text-main);
  font-weight: 750;
}

.stat-dot {
  opacity: 0.4;
}

.cc-hero-actions {
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   CORE INFORMATION STATUS (CIS) BOLD DISPLAY STYLING
   ========================================================================== */

.cis-display-section {
  margin: 10px 0 36px;
}

.cis-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}

.cis-eyebrow {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 4px;
}

.cis-section-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
}

.cis-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 750;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 999px;
}

.cis-bold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.cis-bold-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  position: relative;
}

.cis-bold-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.06);
}

.cis-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cis-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.cis-icon-tech {
  background: #eff6ff;
}

.cis-icon-backend {
  background: #fdf4ff;
}

.cis-icon-services {
  background: #ecfeff;
}

.cis-icon-security {
  background: #fef2f2;
}

.cis-icon-performance {
  background: #fffbeb;
}

.cis-icon-seo {
  background: #f0fdf4;
}

.cis-badge-pill {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.cis-card-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 6px;
}

.cis-card-bold-value {
  font-size: 21px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.cis-card-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 0;
}

.cc-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--studio-border);
}

.cc-status-card {
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cc-status-icon {
  font-size: 20px;
}

.cc-status-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cc-status-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--studio-text-muted);
  letter-spacing: 0.03em;
}

.cc-status-value {
  font-size: 13px;
  font-weight: 750;
  color: var(--studio-text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 750;
}

.badge-neutral {
  background: #f1f5f9;
  color: #64748b;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

/* Actions Section */
.cc-section-header {
  margin-bottom: 20px;
}

.cc-section-title {
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--studio-text-main);
  margin-bottom: 4px;
}

.cc-section-desc {
  font-size: 13px;
  color: var(--studio-text-muted);
}

.cc-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.cc-action-card {
  background: #ffffff;
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.cc-action-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.cc-action-card-primary {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

.cc-action-card-primary:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.15);
}

.action-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.action-icon {
  font-size: 24px;
}

.action-tag {
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
}

.action-tag-primary {
  background: #ffedd5;
  color: #c2410c;
}

.action-tag-warning {
  background: #fee2e2;
  color: #b91c1c;
}

.action-tag-ai {
  background: #eff6ff;
  color: #1d4ed8;
}

.action-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--studio-text-main);
  margin-bottom: 6px;
}

.action-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--studio-text-muted);
  flex: 1;
  margin-bottom: 14px;
}

.action-footer {
  display: flex;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.action-link {
  font-size: 12px;
  font-weight: 750;
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cc-action-card-primary .action-link {
  color: var(--brand-orange);
}

/* Dedicated Workspace Views */
.dedicated-workspace-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 60px;
  height: 100%;
  overflow-y: auto;
}

.ws-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--studio-border);
}

.ws-title {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--studio-text-main);
}

.ws-body-content {
  background: #ffffff;
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* Preview Workspace */
.preview-workspace-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #0f172a;
}

.preview-top-toolbar {
  height: 48px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.preview-frame-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow: hidden;
}

.read-only-iframe {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.read-only-iframe.desktop { max-width: 100%; }
.read-only-iframe.laptop { max-width: 1024px; }
.read-only-iframe.tablet { max-width: 768px; }
.read-only-iframe.mobile { max-width: 390px; }

/* Editor Secondary Header */
.editor-header-bar {
  height: 40px;
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

#view-editor .studio-main-workspace {
  height: calc(100% - 40px);
}

/* Code Workspace */
.code-workspace-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.code-top-toolbar {
  height: 44px;
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.code-editor-full-container {
  flex: 1;
  height: calc(100% - 44px);
}

/* --------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .cc-hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 992px) {
  .mobile-menu-toggler {
    display: inline-flex;
  }

  .sidebar-close-btn {
    display: block;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.mobile-open {
    opacity: 1;
    pointer-events: auto;
  }

  .studio-sidebar-menu {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.5);
  }

  .studio-sidebar-menu.mobile-open {
    transform: translateX(0);
  }

  .cis-bold-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .studio-topbar {
    padding: 0 10px;
    height: 52px;
    gap: 8px;
  }
  
  .studio-badge {
    display: none;
  }
  
  .project-name-badge {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 8px;
    font-size: 11px;
  }
  
  .topbar-right {
    gap: 5px;
  }
  
  .topbar-right .btn-studio {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  #btn-top-github {
    display: none;
  }
  
  /* Control Center Mobile */
  .control-center-container {
    padding: 16px 12px 48px;
    max-width: 100%;
  }
  
  .cc-project-hero {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
  
  .cc-project-title {
    font-size: 22px;
    margin-bottom: 8px;
  }
  
  .cc-stats-ribbon {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 11.5px;
  }
  
  .cis-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cis-section-title {
    font-size: 16px;
  }

  .cis-bold-card {
    padding: 16px 14px;
  }

  .cis-card-bold-value {
    font-size: 18px;
  }
  
  /* Dedicated Workspaces Mobile */
  .dedicated-workspace-container {
    padding: 16px 12px 48px;
  }
  
  .ws-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .ws-title {
    font-size: 17px;
  }
  
  .ws-body-content {
    padding: 14px 12px;
    border-radius: var(--radius-md);
  }
  
  /* Responsive Grids Inside Workspaces */
  .dedicated-workspace-container [style*="grid-template-columns: 1fr 1fr"],
  .dedicated-workspace-container [style*="grid-template-columns: repeat(2, 1fr)"],
  .dedicated-workspace-container [style*="grid-template-columns: 1fr 1.5fr"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  
  /* Preview Workspace Mobile */
  .preview-top-toolbar {
    padding: 0 10px;
    height: auto;
    min-height: 46px;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .preview-frame-container {
    padding: 8px;
  }
  
  /* Visual Editor Mobile */
  .editor-header-bar {
    padding: 0 10px;
    height: auto;
    min-height: 42px;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .studio-main-workspace {
    position: relative;
  }
  
  .studio-left-panel {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 82%;
    max-width: 300px;
    z-index: 40;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .studio-left-panel.mobile-open {
    transform: translateX(0);
  }
  
  .studio-right-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 82%;
    max-width: 320px;
    z-index: 40;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .studio-right-panel.mobile-open {
    transform: translateX(0);
  }
  
  .studio-center-canvas {
    width: 100% !important;
    flex: 1;
  }
  
  /* Modals Mobile */
  .studio-modal-container {
    padding: 12px;
  }
  
  .studio-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: var(--radius-md) !important;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 13px;
  }
  
  .topbar-left {
    gap: 6px;
  }
  
  #btn-open-import-modal {
    padding: 4px 6px;
    font-size: 11px;
  }
  
  .cc-project-hero {
    padding: 14px 10px;
  }
  
  .cc-badge-row {
    gap: 4px;
  }
  
  .cc-pill {
    font-size: 9.5px;
    padding: 2px 6px;
  }
  
  .cis-eyebrow {
    font-size: 9px;
  }

  .cis-section-title {
    font-size: 15px;
  }
  
  .cc-section-title {
    font-size: 13px;
  }
  
  .cc-section-desc {
    font-size: 12px;
  }
}

/* ==========================================================================
   PROJECT HEALTH SUMMARY & OVERVIEW WIDGET
   ========================================================================== */

.project-health-summary-card {
  background: #ffffff;
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.health-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.health-summary-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.health-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.health-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.health-item-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   MAIN DASHBOARD TALK TO BUILD REAL AI BOX
   ========================================================================== */

/* ==========================================================================
   CLEAN AI-FOCUSED PROJECT OVERVIEW (MAIN WHITE DASHBOARD)
   ========================================================================== */

.project-overview-clean-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 36px 64px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Small Top Project Identity Header */
.po-identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--studio-border);
  gap: 16px;
  flex-wrap: wrap;
}

.po-identity-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.po-project-name {
  font-size: 22px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.po-project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}

.po-meta-tech {
  font-weight: 700;
  color: #2563eb;
}

.po-meta-dot {
  color: #cbd5e1;
  font-size: 10px;
}

.po-meta-stat strong {
  color: #1e293b;
  font-weight: 750;
}

.po-meta-saved {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 750;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.po-identity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Centered AI Stage */
.po-ai-stage {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.po-ai-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.po-ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 850;
  color: #2563eb;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.po-ai-heading {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
}

.po-ai-subheading {
  font-size: 14.5px;
  color: #64748b;
  margin: 0;
  max-width: 520px;
  line-height: 1.5;
}

/* Large Elegant AI Input Card */
.po-ai-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  padding: 16px 20px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.po-ai-card:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 6px 24px rgba(15, 23, 42, 0.08);
}

.po-ai-textarea-wrapper {
  width: 100%;
}

.po-ai-textarea {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  line-height: 1.5;
  color: #0f172a;
  resize: none;
  font-family: inherit;
}

.po-ai-textarea::placeholder {
  color: #94a3b8;
}

.po-ai-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  gap: 12px;
  flex-wrap: wrap;
}

.po-context-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.po-context-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.po-ai-button-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Suggested Actions Grid */
.po-suggestions-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.po-suggestions-title {
  font-size: 11px;
  font-weight: 850;
  color: #94a3b8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.po-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .po-suggestions-grid {
    grid-template-columns: 1fr;
  }
}

.po-suggestion-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.po-suggestion-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.po-suggestion-btn .sug-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.po-suggestion-btn .sug-text {
  flex: 1;
}

/* Response Card */
.po-response-card {
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  font-size: 13.5px;
  line-height: 1.6;
  color: #0f172a;
  animation: fadeIn 0.2s ease-out;
}

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

/* ==========================================================================
   MULTI-STEP WORKFLOWS (DEPLOY & CONNECT)
   ========================================================================== */

.workflow-steps-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  padding: 0 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.workflow-step-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
  color: var(--studio-text-muted);
  z-index: 2;
  background: var(--studio-surface);
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid var(--studio-border);
}

.workflow-step-badge.active {
  color: var(--brand-blue);
  border-color: var(--brand-blue-border);
  background: var(--brand-blue-light);
  font-weight: 800;
}

.workflow-step-badge.completed {
  color: var(--studio-success);
  border-color: var(--studio-border);
  background: var(--studio-success-light);
}

.workflow-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--studio-surface-subtle);
  color: var(--studio-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.workflow-step-badge.active .workflow-step-num {
  background: var(--brand-blue);
  color: #ffffff;
}

.workflow-step-badge.completed .workflow-step-num {
  background: var(--studio-success);
  color: #ffffff;
}

.workflow-step-card {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-subtle);
}

.workflow-step-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--studio-text-main);
  margin-bottom: 6px;
}

.workflow-step-desc {
  font-size: 12.5px;
  color: var(--studio-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.workflow-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

/* Coming Soon Badge */
.badge-coming-soon {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}



