/**
 * App Shell & Grid Layout
 */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-app);
}

/* ==================== HEADER ==================== */
.app-header {
  height: var(--header-height);
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.brand-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Mode Switcher Buttons */
.mode-switcher {
  display: flex;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  color: var(--text-main);
  text-decoration: none;
}

.mode-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==================== WORKSPACE BODY ==================== */
.app-body {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
}

/* Left Sidebar: Components & Shapes Library */
.sidebar-left {
  width: var(--sidebar-left-width);
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* Center Canvas Workspace */
.canvas-wrapper {
  flex: 1;
  height: 100%;
  position: relative;
  background-color: #0f172a;
  overflow: hidden;
}

/* Right Sidebar: Inspector & Elements List */
.sidebar-right {
  width: var(--sidebar-right-width);
  height: 100%;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.sidebar-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-tab:hover {
  color: var(--text-main);
}

.sidebar-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background-color: var(--bg-sidebar);
}

.sidebar-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.sidebar-tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Floating Toolbar on Canvas */
.floating-toolbar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  z-index: 30;
}

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

/* Floating View Navigation (Bottom Left/Right) */
.floating-view-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  padding: 4px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  z-index: 30;
}

.zoom-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 44px;
  text-align: center;
}
