/* ============================================================================
   AG Studio Pro — World-Class Kitchen Studio (Modern CAD / BIM Standard)
   Inspired by Autodesk, Coohom, Homestyler & Figma CAD
   ============================================================================ */

/* === Root Layout & Viewport Sizing === */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background-color: #070b12 !important;
  color: #f8fafc;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.ag-studio-page {
  padding-top: 52px !important;  /* Space for Master AG Studio Header */
  padding-bottom: 52px !important; /* Space for Bottom Dock */
  box-sizing: border-box;
}

/* === Secondary Studio Sub-Bar (Clean, High-Tech, Single Row) === */
.app-header.no-print {
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  background: #0b1120 !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  z-index: 500 !important;
  position: relative !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4) !important;
}

/* Completely remove old duplicate brand and back button */
.app-header .brand {
  display: none !important;
}

/* Clean Streamlined Tabs (Apple / Autodesk Segmented Style) */
.app-header .main-tabs {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(15, 23, 42, 0.8) !important;
  padding: 3px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  gap: 3px !important;
  margin: 0 !important;
}

.app-header .tab-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.app-header .tab-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.app-header .tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4) !important;
}

/* Center Tools: Presets & Save */
.header-center-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
}

.preset-dropdown {
  background: #0f172a !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  outline: none !important;
  transition: all 0.2s !important;
  width: 100% !important;
}
.preset-dropdown:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
}

.btn-save-design {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  transition: all 0.2s !important;
}
.btn-save-design:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
}

/* Left Tools: Undo, Redo, Sidebar Toggle */
.header-left-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.undo-redo-cluster {
  display: flex !important;
  align-items: center !important;
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  border-radius: 8px !important;
  padding: 2px !important;
  gap: 2px !important;
}

.btn-hud-action {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 14px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}
.btn-hud-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
.btn-hud-action:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

.btn-sidebar-toggle {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid #1e293b !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}
.btn-sidebar-toggle:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

/* === Hide all legacy mixed buttons in header-actions === */
.header-actions {
  display: none !important;
}

/* === Layout of Designer Tab: Full Bleed 3D + Precision Sidebar === */
.tab-view {
  display: none;
  height: calc(100vh - 52px - 46px - 52px);
  width: 100%;
  position: relative;
  overflow: hidden;
}
.tab-view.active {
  display: flex !important;
}

.designer-layout {
  display: flex !important;
  flex-direction: row-reverse !important; /* RTL: Sidebar on right, Canvas on left */
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}

/* === 3D Workspace Canvas (Hero Area) === */
.preview-workspace {
  flex: 1 !important;
  height: 100% !important;
  position: relative !important;
  background: radial-gradient(circle at 50% 30%, #151d2f 0%, #070b12 85%) !important;
  overflow: hidden !important;
}

.preview-canvas-container {
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
}

/* HIDE all clunky floating bars inside the viewport */
#kCanvasTopHud,
#kWorkspaceQuickEditorBar,
.canvas-floating-hud,
.canvas-floating-dock {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Floating Top Viewport Controls Cluster (Badge + Quick Actions) */
.viewport-floating-top-bar {
  position: absolute !important;
  top: 14px !important;
  left: 16px !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  pointer-events: none !important;
  flex-wrap: wrap !important;
}

.viewport-floating-top-bar > * {
  pointer-events: auto !important;
}

/* Viewport Mode Switcher (3D vs 2D Toggle Pills) */
.k-viewport-mode-toggle {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 30px !important;
  padding: 3px !important;
  gap: 4px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(2, 132, 199, 0.25) !important;
}

.k-viewport-mode-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 24px !important;
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.k-viewport-mode-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.k-viewport-mode-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.5) !important;
}

.k2d-btn-switch3d {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 16px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35) !important;
}
.k2d-btn-switch3d:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  transform: translateY(-1px) !important;
}

/* Floating Clean Quotation & Stats Badge (Discreet Top-Left Pill) */
#kSummaryBadge {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  z-index: 100 !important;
  background: rgba(11, 17, 32, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 30px !important;
  padding: 6px 16px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  pointer-events: auto !important;
}
#kSummaryBadge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Quick Interactive Pill Buttons directly in Viewport */
.btn-viewport-pill {
  background: rgba(11, 17, 32, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 30px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
  user-select: none !important;
}

.btn-viewport-pill:hover {
  background: #0f172a !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35) !important;
}

.btn-viewport-pill.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(37, 99, 235, 0.25)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

/* === Precision Right Controls Sidebar (Modern BIM Inspector) === */
.controls-sidebar {
  width: 360px !important;
  min-width: 360px !important;
  max-width: 360px !important;
  height: 100% !important;
  background: #0b1120 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 150 !important;
  box-shadow: -4px 0 25px rgba(0,0,0,0.4) !important;
}

/* Sub-Tabs (Cabinets / Materials / Room) */
.sub-tabs {
  display: flex !important;
  background: #070b12 !important;
  border-bottom: 1px solid #1e293b !important;
  padding: 6px !important;
  gap: 4px !important;
  margin: 0 !important;
}

.sub-tab-btn {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 8px 6px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  text-align: center !important;
}
.sub-tab-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
.sub-tab-btn.active {
  background: #0f172a !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* Sidebar Scrollable Area */
.sidebar-scroll {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}
.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}

/* Sleek Panel Cards */
.panel-card {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  border-radius: 12px !important;
  padding: 14px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
  margin-bottom: 0 !important;
}

.panel-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding-bottom: 8px !important;
}

.panel-card-title {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Form Inputs & Grids */
.form-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}
.form-group.full {
  grid-column: 1 / -1 !important;
}

.form-group label {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  margin-bottom: 4px !important;
  display: block !important;
}

.form-control {
  background: #070b12 !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: all 0.2s !important;
}
.form-control:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25) !important;
}

/* Action Buttons inside Panels */
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}
.btn-primary:hover {
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4) !important;
  transform: translateY(-1px) !important;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
}
.btn-danger:hover {
  background: #ef4444 !important;
  color: #fff !important;
}

/* Placed Cabinets List */
.ops-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.ops-item {
  background: #070b12 !important;
  border: 1px solid #1e293b !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  transition: all 0.15s !important;
}
.ops-item:hover, .ops-item.selected {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.05) !important;
}

/* === Shop Drawings, Cutlist, Nesting & Labels Tabs Styling === */
#kTabShopDrawings,
#kTabCutlist,
#kTabNesting,
#kTabLabels {
  overflow-y: auto !important;
  background: #070b12 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .controls-sidebar {
    position: fixed !important;
    bottom: 52px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 50vh !important;
    border-radius: 16px 16px 0 0 !important;
    transform: translateY(100%);
    transition: transform 0.3s ease !important;
  }
  .controls-sidebar.open {
    transform: translateY(0);
  }
}

/* === Sidebar Controls: Corner Style + Dims + Door Slider === */
#kQuickCornerStyleSelect.form-control {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  width: 100% !important;
  cursor: pointer !important;
}
#kQuickCornerStyleSelect.form-control:focus {
  border-color: #38bdf8 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(56,189,248,0.2) !important;
}

#kShowDimsCheck {
  accent-color: #38bdf8 !important;
  width: 16px !important;
  height: 16px !important;
  cursor: pointer !important;
}

#kOpenDoorsSlider {
  width: 100% !important;
  accent-color: #38bdf8 !important;
  margin-top: 6px !important;
}

#kOpenAngleLabel {
  color: #38bdf8;
  font-weight: 800;
  font-size: 13px;
}

#kToggleOpenBtn {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 9px 14px !important;
  width: 100% !important;
  margin-top: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}
#kToggleOpenBtn:hover {
  box-shadow: 0 4px 15px rgba(2,132,199,0.4) !important;
  transform: translateY(-1px) !important;
}


/* ============================================================================
   Interactive 2D Kitchen Studio Pro — Modern CAD & BIM Blueprint
   ============================================================================ */

.k2d-container {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  background: #070b14 !important;
  overflow: hidden !important;
  position: relative !important;
  user-select: none !important;
  font-family: 'Cairo', -apple-system, sans-serif !important;
}

/* Top Wall & Mode Bar */
.k2d-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 14px !important;
  background: #090d16 !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  z-index: 10 !important;
}

.k2d-wall-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  overflow-x: auto !important;
}

.k2d-wall-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
}

.k2d-wall-tab:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: #38bdf8 !important;
  color: #f8fafc !important;
}

.k2d-wall-tab.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(37, 99, 235, 0.3)) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
}

.k2d-wall-key {
  background: #0284c7 !important;
  color: #fff !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

.k2d-wall-len {
  color: #fde68a !important;
  font-size: 11px !important;
}

.k2d-wall-count {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 10px !important;
}

.k2d-top-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.k2d-segmented-group {
  display: inline-flex !important;
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 2px !important;
  gap: 2px !important;
}

.k2d-seg-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.15s !important;
}

.k2d-seg-btn:hover {
  color: #f8fafc !important;
}

.k2d-seg-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4) !important;
}

.k2d-layer-filter {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.k2d-label {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
}

.k2d-select {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.k2d-select:focus {
  border-color: #38bdf8 !important;
  outline: none !important;
}

.k2d-btn-ghost {
  background: transparent !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.k2d-btn-ghost:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
}

/* Stats Ribbon */
.k2d-stats-ribbon {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 16px !important;
  background: #050811 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.k2d-stat-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  color: #94a3b8 !important;
}

.k2d-stat-pill strong {
  color: #f8fafc !important;
  font-weight: 900 !important;
}

.k2d-stat-pill .sp-sub.rem {
  color: #f59e0b !important;
  font-weight: 800 !important;
}

.k2d-stat-pill .sp-sub.ok {
  color: #10b981 !important;
  font-weight: 800 !important;
}

.k2d-quick-tools {
  display: inline-flex !important;
  gap: 6px !important;
}

.k2d-btn-action {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s !important;
}

.k2d-btn-action:hover {
  background: rgba(2, 132, 199, 0.2) !important;
  border-color: #0284c7 !important;
  color: #38bdf8 !important;
}

/* Main Canvas Area */
.k2d-workspace {
  flex: 1 !important;
  overflow: hidden !important;
  position: relative !important;
  display: flex !important;
}

.k2d-canvas-scroll {
  flex: 1 !important;
  overflow: auto !important;
  padding: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.k2d-canvas-stage {
  margin: auto !important;
}

.k2d-elevation-svg {
  display: block !important;
  margin: auto !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7) !important;
}

/* Cabinet SVG Interactive Hover & Actions */
.k2d-cab-group {
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.k2d-cab-group:hover rect:first-child {
  stroke-width: 2.5 !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4)) !important;
}

.k2d-cab-overlay-tools {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease !important;
}

.k2d-cab-group:hover .k2d-cab-overlay-tools,
.k2d-cab-group.selected .k2d-cab-overlay-tools {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.k2d-action-btn {
  cursor: pointer !important;
  transition: transform 0.15s !important;
}

.k2d-action-btn:hover {
  transform: scale(1.2) !important;
}

.k2d-empty-gap {
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.k2d-empty-gap:hover rect {
  fill: rgba(245, 158, 11, 0.12) !important;
  stroke-width: 2.5 !important;
}

/* Visual Add Drawer at Bottom */
.k2d-catalog-drawer {
  background: #090d16 !important;
  border-top: 1px solid rgba(56, 189, 248, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  max-height: 220px !important;
  z-index: 100 !important;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.6) !important;
}

.k2d-catalog-drawer.collapsed {
  max-height: 38px !important;
}

.k2d-catalog-drawer.collapsed .k2d-drawer-body {
  display: none !important;
}

.k2d-drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 14px !important;
  background: #0b1120 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.k2d-drawer-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.k2d-drawer-tab {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #94a3b8 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s !important;
}

.k2d-drawer-tab:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.k2d-drawer-tab.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(37, 99, 235, 0.25)) !important;
  border-color: #0284c7 !important;
  color: #38bdf8 !important;
}

.k2d-drawer-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.k2d-drawer-hint {
  font-size: 11px !important;
  color: #fde68a !important;
  font-weight: 700 !important;
}

.k2d-drawer-toggle-btn {
  background: transparent !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 11px !important;
}

.k2d-drawer-toggle-btn:hover {
  border-color: #38bdf8 !important;
  color: #fff !important;
}

.k2d-drawer-body {
  overflow-x: auto !important;
  padding: 10px 14px !important;
  display: flex !important;
}

.k2d-catalog-grid {
  display: flex !important;
  gap: 10px !important;
}

.k2d-catalog-card {
  min-width: 170px !important;
  max-width: 170px !important;
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.k2d-catalog-card:hover {
  border-color: #38bdf8 !important;
  background: #131d36 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3) !important;
}

.k2d-catalog-card .cc-icon {
  font-size: 20px !important;
  margin-bottom: 4px !important;
}

.k2d-catalog-card .cc-title {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  line-height: 1.3 !important;
  display: block !important;
  margin-bottom: 4px !important;
}

.k2d-catalog-card .cc-meta {
  display: flex !important;
  gap: 8px !important;
  font-size: 10px !important;
  color: #94a3b8 !important;
  margin-bottom: 6px !important;
}

.k2d-catalog-card .cc-add-btn {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  padding: 4px 8px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  width: 100% !important;
  transition: all 0.15s !important;
}

.k2d-catalog-card .cc-add-btn:hover {
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.5) !important;
}

/* Plan View in 2D Designer */
.k2d-plan-view-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1100px !important;
  margin: auto !important;
}

.k2d-plan-hint {
  background: rgba(2, 132, 199, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  color: #38bdf8 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  margin-bottom: 14px !important;
  text-align: center !important;
}

.k2d-plan-svg-wrap {
  width: 100% !important;
  background: #0f172a !important;
  border: 2px solid #334155 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}
