/* 
 * Text-to-Website Dashboard Style Sheet
 * Elite Glassmorphism & Cyberpunk Accent Themes
 */

:root {
  /* Color System */
  --bg-primary: #0a0b16;
  --bg-secondary: #111329;
  --bg-panel: rgba(17, 19, 41, 0.45);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  /* Accent System */
  --accent-purple: #6366f1;
  --accent-purple-glow: rgba(99, 102, 241, 0.4);
  --accent-cyan: #06b6d4;
  --accent-magenta: #d946ef;
  
  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-code: 'Fira Code', 'Courier New', monospace;
  
  /* Borders and Blurs */
  --glass-blur: blur(20px);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(217, 70, 239, 0.04) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 30px 30px, 30px 30px;
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow: hidden; /* IDE style workspace layout, no body scroll */
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

/* Glassmorphism Class utility */
.glass-card {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Header Styles */
.app-header {
  height: 70px;
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  margin: 10px 15px 0 15px;
  border-radius: var(--radius-lg);
}

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

.logo-orb {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-purple-glow);
  position: relative;
}

.logo-orb::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.header-logo h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-v1 {
  font-size: 0.75rem;
  font-family: var(--font-code);
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

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

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-dot.yellow {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.status-dot.red {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.animate-pulse {
  animation: pulseDot 2s infinite;
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

.btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(15deg);
}

.btn-glowing {
  background: linear-gradient(90deg, #6366f1, #06b6d4, #d946ef);
  background-size: 200% auto;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  animation: bgGlowSwipe 5s linear infinite;
  padding: 14px 20px;
}

.btn-glowing:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.55);
}

.btn-link {
  background: transparent;
  color: var(--accent-cyan);
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
}

.btn-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.btn-close:hover {
  color: #fff;
  transform: scale(1.1);
}

/* Main Workspace Grid */
.workspace-container {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 70px 360px 1fr 480px;
  gap: 15px;
  padding: 15px;
  height: calc(100vh - 85px);
  overflow: hidden;
  transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.workspace-container.crm-active {
  grid-template-columns: 70px 1fr;
}

/* Sidebars Common */
.sidebar-left, .sidebar-right {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Sidebar Left: Generator Configurations */
.sidebar-left {
  padding: 24px;
  overflow-y: auto;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  margin-top: 10px;
}

.section-title:first-of-type {
  margin-top: 0;
}

.sec-num {
  font-family: var(--font-code);
  font-weight: bold;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 2px 6px;
  font-size: 0.75rem;
  border-radius: 4px;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

/* Prompt Panel Input styles */
.prompt-panel {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#promptInput {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  transition: var(--transition-smooth);
}

#promptInput:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px var(--border-glow);
  background: rgba(0, 0, 0, 0.4);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.tag-item:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.3);
}

/* Configurations Select Styles */
.style-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: var(--transition-fast);
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.select-wrapper::after {
  content: '▼';
  font-size: 0.65rem;
  color: var(--text-muted);
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Generation trigger layout */
.generation-trigger {
  margin-bottom: 24px;
}

/* History block */
.session-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  flex-grow: 1;
}

.session-history h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 180px;
}

.empty-history {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  padding: 20px 0;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.history-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.history-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-radius: 4px;
}

/* Center Panel: Live Resizer Canvas */
.canvas-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 15px;
}

.canvas-header {
  height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.device-toggles {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 2px;
}

.btn-device {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-device:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.btn-device.active {
  color: #fff;
  background: var(--accent-purple);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.device-label {
  display: inline-block;
}

@media (max-width: 1400px) {
  .device-label {
    display: none;
  }
}

.canvas-dimensions {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.canvas-frame-container {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Responsive Frame Wrapper animates resizing beautifully */
.preview-frame-wrapper {
  height: 96%;
  width: 96%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #fff; /* Standard webpage background in frame */
  transition: width 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), height 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.preview-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

/* Sidebar Right: Code Editors & Tabs */
.sidebar-right {
  height: 100%;
}

.editor-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 12px 0 12px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
}

.tab-btn.chat-tab {
  margin-left: auto;
  color: var(--accent-cyan);
}

.tab-btn.chat-tab.active::after {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

/* Editor display panels */
.editor-container {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

.editor-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.editor-panel.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-code);
}

.editor-badge {
  font-size: 0.65rem;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.editor-wrapper-inner {
  flex-grow: 1;
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 0;
  overflow: hidden;
}

.line-numbers {
  width: 42px;
  min-width: 42px;
  text-align: right;
  padding-right: 12px;
  color: rgba(255, 255, 255, 0.15);
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.5;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.code-textarea {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #c7d2fe;
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0 16px;
  resize: none;
  overflow-y: auto;
  white-space: pre;
  tab-size: 2;
}

.code-textarea:focus {
  outline: none;
}

/* AI Chat Refinement Interface styles */
#panel-chat {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.chat-header {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.chat-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.chat-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-messages {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.chat-msg.system {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  max-width: 100%;
}

.chat-msg.system ul {
  padding-left: 20px;
  margin: 10px 0;
}

.chat-msg.system li {
  margin-bottom: 6px;
  color: var(--text-muted);
}

.chat-msg.user {
  background: var(--accent-purple);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.chat-msg.assistant {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.warning-offline {
  font-size: 0.75rem;
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  margin-top: 10px;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

#chatInput {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  resize: none;
  max-height: 80px;
  line-height: 1.4;
}

#chatInput:focus {
  outline: none;
}

.btn-chat-send {
  background: var(--accent-cyan);
  color: #000;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  padding: 0;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.btn-chat-send:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.5);
}

/* Modals Overlay layouts */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 4, 10, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  padding: 30px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

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

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.modal-body a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

.modal-body .form-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  color: #fff;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.modal-body .form-group input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.input-helper {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
  display: inline-block;
}

.api-key-status {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-main);
}

.key-get-helper {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Deploy Specific styles */
.deploy-dialog {
  max-width: 480px;
}

.deploy-link-box {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 6px 6px 6px 14px;
  border-radius: var(--radius-md);
  align-items: center;
  margin: 10px 0;
}

.deploy-link-box input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-code);
  font-size: 0.82rem;
  outline: none;
}

.deploy-link-box .btn {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.deploy-actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 15px;
}

.deploy-actions-row .btn {
  flex-grow: 1;
  text-decoration: none;
}

/* Toast Notifications styling */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 24px;
  background: rgba(17, 19, 41, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--accent-purple);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px var(--accent-purple-glow);
  color: #fff;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-display);
  pointer-events: auto;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  border-color: #ef4444;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(239, 68, 68, 0.2);
}

.toast.success {
  border-color: #10b981;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Loader Screen Overlay */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 8, 20, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loader-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loader-content {
  text-align: center;
  max-width: 400px;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(99, 102, 241, 0.15);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px auto;
  box-shadow: 0 0 20px var(--accent-purple-glow);
}

.loader-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.loader-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive Dashboard Breakpoints */
@media (max-width: 1200px) {
  .workspace-container {
    grid-template-columns: 320px 1fr;
    grid-template-rows: 1fr 1fr;
    height: auto;
    overflow-y: auto;
  }
  
  body {
    overflow-y: auto;
    height: auto;
  }
  
  .sidebar-right {
    grid-column: 1 / span 2;
    height: 500px;
  }
}

/* Keyframe Key Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bgGlowSwipe {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* User Profile Header styles */
.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}
.user-profile:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px var(--accent-purple-glow);
}
.user-profile .avatar {
  font-size: 1.1rem;
}
.user-profile .username {
  white-space: nowrap;
}

/* Left Navigation Dock */
.sidebar-dock {
  width: 70px;
  min-width: 70px;
  height: 100%;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 50;
}
.dock-logo-mini {
  font-size: 1.5rem;
  margin-bottom: 30px;
  animation: pulseDot 3s infinite;
}
.dock-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
  width: 100%;
  align-items: center;
}
.btn-dock {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}
.btn-dock .dock-lbl {
  font-size: 0.6rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.7;
  font-family: var(--font-display);
}
.btn-dock:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  transform: scale(1.05);
}
.btn-dock.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}
.btn-dock.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  bottom: 15px;
  width: 3px;
  background: var(--accent-purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: 0 0 8px var(--accent-purple);
}
.dock-footer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}
.dock-footer-avatar:hover {
  border-color: var(--accent-purple);
  transform: scale(1.08);
}

/* CRM Submissions Hub Styles */
.crm-panel {
  grid-column: 2 / span 3;
  height: 100%;
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(17, 19, 41, 0.35);
}
.workspace-container.crm-active .crm-panel {
  grid-column: 2;
}
.crm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}
.crm-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}
.crm-title-group p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.crm-badge {
  font-size: 0.65rem;
  font-family: var(--font-code);
  font-weight: bold;
  text-transform: uppercase;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}
.crm-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.metric-card {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius-lg);
}
.metric-icon {
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.metric-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metric-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.metric-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.crm-table-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
}
.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
.crm-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.crm-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  line-height: 1.5;
  vertical-align: middle;
}
.crm-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}
.crm-empty-state {
  text-align: center !important;
  padding: 60px 0 !important;
  color: rgba(255, 255, 255, 0.25) !important;
  font-size: 0.9rem;
}
.td-id {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--accent-cyan);
}
.td-name {
  font-weight: 600;
  color: #fff;
}
.td-email {
  font-family: var(--font-code);
  font-size: 0.8rem;
}
.td-badge {
  font-size: 0.72rem;
  font-family: var(--font-code);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: inline-block;
}
.crm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.btn-crm-del {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-crm-del:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}
.btn-crm-copy {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-crm-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ==========================================
   PREMIUM SAAS DESIGN SYSTEM UPGRADES 
   ========================================== */

/* Unified SVG Icon System */
.svg-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  transition: var(--transition-smooth);
}

.btn-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.btn:hover .svg-icon {
  transform: scale(1.1) translateY(-0.5px);
}

.btn-dock .svg-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.btn-device .svg-icon {
  width: 15px;
  height: 15px;
}

/* Ambient Cursor Spotlight Glow */
.cursor-glow-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(550px circle at var(--mouseX, 50%) var(--mouseY, 50%), rgba(99, 102, 241, 0.035), rgba(6, 182, 212, 0.015) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.workspace-container, .app-header {
  position: relative;
  z-index: 2; /* Render above ambient glow */
}

/* 3D Portal Slide-Up transition for Workspace */
.workspace-container {
  transform: translateY(0) scale(1);
  opacity: 1;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s ease;
}

.workspace-container.portal-loading {
  transform: translateY(40px) scale(0.97);
  opacity: 0;
}

/* Welcome Portal Overlay Styles */
.welcome-portal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, #08091a 0%, #020207 100%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.05);
}

.welcome-portal-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.welcome-portal-overlay.zoom-out {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.93) translateY(-20px);
}

.portal-content {
  width: 100%;
  max-width: 900px;
  padding: 50px;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 30px;
}

.logo-orb.large {
  width: 48px;
  height: 48px;
  box-shadow: 0 0 25px var(--accent-purple-glow), 0 0 10px rgba(6, 182, 212, 0.3);
}

.logo-orb.large::after {
  top: 6px;
  left: 6px;
  width: 12px;
  height: 12px;
}

.portal-logo-text {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff 30%, #a5b4fc 70%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-hero {
  margin-bottom: 40px;
}

.portal-hero h2 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 12px;
}

.portal-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Glowing Prompt Input in Welcome Portal */
.portal-prompt-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 45px;
  position: relative;
  transition: var(--transition-smooth);
}

.portal-prompt-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.25), inset 0 0 15px rgba(99, 102, 241, 0.1);
  background: rgba(0, 0, 0, 0.55);
}

#welcomePromptInput {
  width: 100%;
  background: transparent;
  border: none;
  resize: none;
  padding: 16px 20px 8px 20px;
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.5;
  outline: none;
}

.btn-portal-launch {
  align-self: flex-end;
  padding: 14px 28px;
  border-radius: 12px;
}

.button-launch-icon {
  width: 16px;
  height: 16px;
}

/* Shimmer border animation */
.shimmers::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  background-size: 200% 100%;
  animation: shineBorder 4s infinite linear;
  pointer-events: none;
  z-index: -1;
}

@keyframes shineBorder {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Presets Showcase Slider */
.portal-presets-area {
  text-align: left;
  margin-bottom: 45px;
}

.portal-presets-area h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  padding-left: 5px;
}

.presets-carousel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

.preset-card {
  padding: 24px;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.preset-card:hover {
  transform: translateY(-6px) scale(1.02);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.preset-accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent-purple);
}

.preset-accent-bar.glassmorphic { background: linear-gradient(90deg, #6366f1, #06b6d4); }
.preset-accent-bar.emerald { background: linear-gradient(90deg, #10b981, #fbbf24); }
.preset-accent-bar.minimalist { background: #1c1917; }
.preset-accent-bar.cyberpunk { background: linear-gradient(90deg, #ff007f, #d946ef); }

.preset-icon {
  font-size: 1.8rem;
  margin-top: 5px;
}

.preset-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.preset-tag {
  font-size: 0.72rem;
  font-family: var(--font-code);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 8px;
  border-radius: 12px;
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.preset-card:hover .preset-tag {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Welcome Portal Stats */
.portal-footer-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 30px;
}

.stat-unit {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.08);
}

/* Accordion Custom Styling */
.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.accordion-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.accordion-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.12);
}

.accordion-item.active {
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  text-align: left;
}

.accordion-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: var(--transition-smooth);
}

.accordion-item.active .accordion-chevron {
  transform: rotate(-135deg);
  border-color: var(--accent-cyan);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s;
  padding: 0 18px;
}

.accordion-item.active .accordion-content {
  max-height: 380px;
  padding: 0 18px 18px 18px;
}

/* Custom Premium Checkbox Toggles */
.toggle-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 5px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  user-select: none;
  position: relative;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0; width: 0;
}

.checkbox-checkmark {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: var(--transition-fast);
}

.checkbox-container:hover input ~ .checkbox-checkmark {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.03);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.checkbox-checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px; top: 2px;
  width: 4px; height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkbox-checkmark::after {
  display: block;
}

.checkbox-lbl {
  transition: var(--transition-fast);
}

.checkbox-container input:checked ~ .checkbox-lbl {
  color: #fff;
}

/* Code Editor Utilities Bar */
.editor-actions-controls {
  display: flex;
  gap: 8px;
}

.btn-editor-action {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-editor-action:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-editor-action .svg-icon {
  width: 12px;
  height: 12px;
}

/* Editor highlight cursor line */
.code-textarea {
  position: relative;
}

.code-textarea::selection {
  background: rgba(99, 102, 241, 0.25);
}

/* CRM Upgraded Layout Elements */
.crm-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crm-search-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  width: 320px;
  gap: 8px;
  transition: var(--transition-smooth);
}

.crm-search-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
  background: rgba(0, 0, 0, 0.4);
  width: 380px;
}

.search-icon-svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

#txtCrmSearch {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  width: 100%;
}

#txtCrmSearch::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

/* Mini sparklines in metrics cards */
.mini-chart-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  margin-left: auto;
  padding-left: 20px;
}

.spark-bar {
  width: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
}

.metric-card:hover .spark-bar {
  background: rgba(99, 102, 241, 0.2);
}

.metric-card:first-of-type .spark-bar {
  background: rgba(6, 182, 212, 0.2);
}

.metric-card:first-of-type:hover .spark-bar {
  background: rgba(6, 182, 212, 0.45);
}

.metric-card:hover .spark-bar:nth-child(even) {
  height: calc(100% - 10px) !important;
}

.spark-bar.active {
  background: rgba(16, 185, 129, 0.45) !important;
}

@media (max-width: 1400px) {
  .presets-carousel {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .presets-carousel {
    grid-template-columns: 1fr;
  }
}

