/* XALEN Studio — IDE-grade workspace layout
   Design: Editorial Premium theme (light, orange accents)
   Panels: file explorer | chat | preview + terminal */

*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html, body { height:100%; overflow:hidden; }
body { font-family:Inter,system-ui,sans-serif; background:#FAFAFA; color:#111827; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#D1D5DB; border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:#9CA3AF; }

/* ═══ TOP BAR ═══ */
.studio-topbar {
  height:48px; background:#fff; border-bottom:1px solid #E5E7EB;
  display:flex; align-items:center; padding:0 12px; gap:8px;
  position:fixed; top:0; left:0; right:0; z-index:100;
}
.studio-topbar-logo {
  display:flex; align-items:center; gap:7px;
  font-family:Newsreader,serif; font-size:16px; font-weight:500;
  letter-spacing:-0.03em; color:#111827; text-decoration:none; flex-shrink:0;
  padding-right:12px; border-right:1px solid #E5E7EB; margin-right:4px;
}
.logo-badge {
  font-family:Inter,sans-serif; font-size:9px; font-weight:700;
  background:linear-gradient(135deg,#F97316,#FB923C); color:#fff;
  padding:1px 5px; border-radius:4px; letter-spacing:0.06em; text-transform:uppercase;
}

/* ── Project Selector ── */
.project-selector {
  display:flex; align-items:center; gap:6px; padding:5px 10px;
  border:1px solid #E5E7EB; border-radius:8px; cursor:pointer;
  font-size:13px; font-weight:500; color:#374151; background:#fff;
  transition:all 150ms; flex-shrink:0;
}
.project-selector:hover { border-color:#D1D5DB; background:#F9FAFB; }
.project-dot { width:7px; height:7px; border-radius:50%; background:#10B981; flex-shrink:0; }

/* ── Wallet ── */
.wallet-badge {
  display:flex; align-items:center; gap:5px; padding:5px 10px;
  border:1px solid #E5E7EB; border-radius:8px; font-size:12px; font-weight:600;
  color:#374151; cursor:pointer; transition:all 150ms; background:#fff;
}
.wallet-badge:hover { border-color:#F97316; color:#F97316; }

/* ── Deploy Button ── */
.deploy-btn {
  display:flex; align-items:center; gap:5px; padding:6px 14px;
  background:#F97316; color:#fff; border:none; border-radius:8px;
  font-size:12px; font-weight:600; cursor:pointer; transition:all 150ms;
  font-family:Inter,sans-serif;
}
.deploy-btn:hover { background:#EA580C; transform:translateY(-1px); box-shadow:0 4px 12px rgba(249,115,22,0.3); }
.deploy-btn:active { transform:translateY(0); }

/* ── Avatar ── */
.studio-avatar {
  width:30px; height:30px; border-radius:50%;
  background:linear-gradient(135deg,#F97316,#FB923C);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:11px; font-weight:700; cursor:pointer; flex-shrink:0;
}
.studio-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }

/* ── Icon Button ── */
.icon-btn {
  width:28px; height:28px; border:none; background:none; cursor:pointer;
  color:#9CA3AF; border-radius:6px; display:flex; align-items:center; justify-content:center;
  transition:all 150ms;
}
.icon-btn:hover { background:#F3F4F6; color:#374151; }

/* ═══ MAIN LAYOUT ═══ */
.studio-main {
  position:fixed; top:48px; left:0; right:0; bottom:0;
  display:flex; flex-direction:column;
}
.studio-panels { flex:1; display:flex; min-height:0; }

/* ═══ FILE EXPLORER ═══ */
.file-explorer {
  width:220px; min-width:180px; max-width:300px;
  background:#fff; border-right:1px solid #E5E7EB;
  display:flex; flex-direction:column; flex-shrink:0;
  transition:width 200ms, opacity 200ms;
}
.file-explorer.collapsed { width:0; min-width:0; overflow:hidden; opacity:0; border-right:none; }
.fe-header {
  height:36px; padding:0 12px; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid #F3F4F6; flex-shrink:0;
}
.fe-header span { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.06em; color:#9CA3AF; }
.fe-actions { display:flex; gap:2px; }
.fe-actions button {
  width:22px; height:22px; border:none; background:none; cursor:pointer;
  color:#9CA3AF; border-radius:4px; display:flex; align-items:center; justify-content:center;
  transition:all 150ms;
}
.fe-actions button:hover { background:#F3F4F6; color:#374151; }
.fe-tree { flex:1; overflow-y:auto; padding:6px 0; }
.fe-item {
  display:flex; align-items:center; gap:6px; padding:4px 12px;
  font-size:12px; color:#374151; cursor:pointer; transition:background 100ms;
  user-select:none; white-space:nowrap;
}
.fe-item:hover { background:#F3F4F6; }
.fe-item.active { background:#FFF7ED; color:#F97316; }
.fe-item.dir { font-weight:500; }
.fe-icon { width:14px; height:14px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; font-size:12px; }
.fe-icon.html { color:#E34F26; }
.fe-icon.css { color:#1572B6; }
.fe-icon.js { color:#F7DF1E; }
.fe-icon.jsx { color:#61DAFB; }
.fe-icon.json { color:#6B7280; }
.fe-icon.img { color:#10B981; }
.fe-icon.folder { color:#FB923C; }
.fe-storage {
  padding:8px 12px; border-top:1px solid #F3F4F6; flex-shrink:0; font-size:10px; color:#9CA3AF;
}
.fe-storage-bar { height:3px; background:#F3F4F6; border-radius:2px; margin-top:4px; overflow:hidden; }
.fe-storage-fill { height:100%; background:#F97316; border-radius:2px; transition:width 300ms; }

/* Sidebar toggle */
.sidebar-toggle {
  position:absolute; top:56px; left:8px; z-index:20;
  width:28px; height:28px; border:1px solid #E5E7EB; border-radius:6px;
  background:#fff; cursor:pointer; display:none; align-items:center; justify-content:center;
  color:#6B7280; box-shadow:0 1px 3px rgba(0,0,0,0.06); transition:all 150ms;
}
.sidebar-toggle:hover { border-color:#F97316; color:#F97316; }
.file-explorer.collapsed ~ .sidebar-toggle { display:flex; }

/* ═══ CHAT PANEL ═══ */
.chat-panel {
  flex:1; min-width:300px; max-width:50%;
  display:flex; flex-direction:column; background:#fff;
  border-right:1px solid #E5E7EB;
}

/* Mode bar */
.mode-bar {
  height:40px; padding:0 12px; display:flex; align-items:center; gap:4px;
  border-bottom:1px solid #F3F4F6; flex-shrink:0;
}
.mode-btn {
  display:flex; align-items:center; gap:5px; padding:5px 10px;
  border:1px solid transparent; border-radius:7px; font-size:12px; font-weight:500;
  color:#6B7280; cursor:pointer; transition:all 150ms; background:none;
  font-family:Inter,sans-serif; position:relative;
}
.mode-btn:hover { background:#F9FAFB; color:#374151; }
.mode-btn.active { background:#FFF7ED; border-color:#FDBA74; color:#C2410C; }
.mode-icon { font-size:13px; line-height:1; }
.pro-badge {
  font-size:8px; font-weight:700; background:#F97316; color:#fff;
  padding:1px 4px; border-radius:3px; text-transform:uppercase; letter-spacing:0.05em;
}
.cost-hint { font-size:10px; color:#9CA3AF; font-weight:400; margin-left:2px; }
.mode-divider { width:1px; height:20px; background:#F3F4F6; margin:0 2px; flex-shrink:0; }
.instructions-btn {
  display:flex; align-items:center; gap:4px; padding:5px 8px;
  border:1px solid transparent; border-radius:7px; font-size:11px; font-weight:500;
  color:#9CA3AF; cursor:pointer; transition:all 150ms; background:none;
  margin-left:auto; font-family:Inter,sans-serif;
}
.instructions-btn:hover { background:#F9FAFB; color:#374151; border-color:#E5E7EB; }

/* Model dropdown */
.model-dropdown {
  display:none; position:absolute; top:calc(100% + 6px); left:0;
  background:#fff; border:1px solid #E5E7EB; border-radius:10px;
  box-shadow:0 8px 32px rgba(0,0,0,0.12); min-width:260px; padding:6px; z-index:50;
}
.model-dropdown.open { display:block; }
.model-dropdown-header {
  padding:6px 10px 4px; font-size:10px; font-weight:600;
  text-transform:uppercase; letter-spacing:0.06em; color:#9CA3AF;
  display:flex; align-items:center; gap:4px;
}
.model-option {
  display:flex; align-items:center; gap:8px; padding:7px 10px;
  border-radius:7px; cursor:pointer; transition:background 100ms;
}
.model-option:hover { background:#F9FAFB; }
.model-option.selected { background:#FFF7ED; }
.model-option img {
  width:16px; height:16px; border-radius:3px; object-fit:contain; flex-shrink:0;
}
.model-name { font-size:12px; font-weight:500; color:#374151; }
.model-desc { font-size:10px; color:#9CA3AF; }
.model-cost {
  font-size:10px; color:#9CA3AF; margin-left:auto;
  font-family:'JetBrains Mono',monospace;
}

/* Chat messages */
.chat-messages {
  flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:16px;
}
.chat-msg { display:flex; gap:10px; max-width:100%; animation:msgIn 300ms ease; }
@keyframes msgIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.chat-msg-avatar {
  width:28px; height:28px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:12px;
}
.chat-msg-avatar.ai { background:linear-gradient(135deg,#F97316,#FB923C); color:#fff; font-weight:700; }
.chat-msg-avatar.user { background:#E5E7EB; color:#6B7280; font-weight:600; }
.chat-msg-body { flex:1; min-width:0; }
.chat-msg-name { font-size:11px; font-weight:600; color:#9CA3AF; margin-bottom:4px; }
.chat-msg-text { font-size:13px; line-height:1.65; color:#374151; }
.chat-msg-text p { margin-bottom:8px; }
.chat-msg-text code {
  font-family:'JetBrains Mono',monospace; font-size:11px;
  background:#F3F4F6; padding:2px 5px; border-radius:4px; color:#C2410C;
}
.chat-code-block {
  background:#0D1117; color:#C9D1D9; padding:12px 14px; border-radius:8px;
  font-family:'JetBrains Mono',monospace; font-size:11px; line-height:1.6;
  overflow-x:auto; margin:8px 0; position:relative; white-space:pre;
}
.chat-code-block .lang-tag {
  position:absolute; top:6px; right:8px; font-size:9px; color:#6B7280;
  text-transform:uppercase; letter-spacing:0.05em;
}
.code-apply-btn {
  display:inline-flex; align-items:center; gap:4px; margin-top:6px;
  padding:4px 10px; background:#FFF7ED; border:1px solid #FDBA74;
  border-radius:6px; font-size:11px; font-weight:500; color:#C2410C;
  cursor:pointer; transition:all 150ms; font-family:Inter,sans-serif;
}
.code-apply-btn:hover { background:#FFEDD5; }

/* Widget suggestion cards */
.widget-card {
  display:flex; align-items:center; gap:10px; padding:10px 12px;
  background:#FFFAF5; border:1px solid #FDBA74; border-radius:10px;
  margin:8px 0; cursor:pointer; transition:all 150ms;
}
.widget-card:hover { border-color:#F97316; box-shadow:0 2px 8px rgba(249,115,22,0.1); }
.widget-card-icon {
  width:32px; height:32px; border-radius:8px; background:#FFF7ED;
  display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0;
}
.widget-card-info { flex:1; }
.widget-card-info strong { font-size:12px; color:#374151; display:block; }
.widget-card-info span { font-size:10px; color:#9CA3AF; }
.widget-card-add {
  font-size:11px; font-weight:600; color:#F97316; white-space:nowrap;
  padding:4px 8px; border-radius:6px; transition:background 150ms;
}
.widget-card:hover .widget-card-add { background:#FFEDD5; }

/* Chat input */
.chat-input-wrap { padding:10px 12px; border-top:1px solid #F3F4F6; flex-shrink:0; background:#fff; }
.chat-input-box {
  display:flex; align-items:flex-end; gap:8px;
  border:1px solid #E5E7EB; border-radius:10px; padding:8px 10px;
  transition:border-color 150ms, box-shadow 150ms; background:#FAFAFA;
}
.chat-input-box:focus-within { border-color:#F97316; background:#fff; box-shadow:0 0 0 3px rgba(249,115,22,0.08); }
.chat-input-box textarea {
  flex:1; border:none; outline:none; resize:none; font-family:Inter,sans-serif;
  font-size:13px; line-height:1.5; color:#374151; background:transparent;
  min-height:20px; max-height:120px;
}
.chat-input-box textarea::placeholder { color:#D1D5DB; }
.chat-input-actions { display:flex; gap:4px; align-items:center; flex-shrink:0; }
.chat-input-actions button {
  width:28px; height:28px; border:none; background:none; cursor:pointer;
  color:#9CA3AF; border-radius:6px; display:flex; align-items:center; justify-content:center;
  transition:all 150ms;
}
.chat-input-actions button:hover { background:#F3F4F6; color:#374151; }
.chat-send-btn { background:#F97316 !important; color:#fff !important; border-radius:7px !important; }
.chat-send-btn:hover { background:#EA580C !important; }
.chat-input-hint {
  font-size:10px; color:#D1D5DB; margin-top:6px; display:flex; align-items:center; gap:4px;
}

/* ═══ PREVIEW PANEL ═══ */
.preview-panel { flex:1.4; min-width:300px; display:flex; flex-direction:column; background:#FAFAFA; }
.preview-toolbar {
  height:36px; padding:0 10px; display:flex; align-items:center; gap:6px;
  border-bottom:1px solid #E5E7EB; background:#fff; flex-shrink:0;
}
.device-switcher { display:flex; gap:2px; }
.device-btn {
  width:28px; height:26px; border:none; background:none; cursor:pointer;
  color:#9CA3AF; border-radius:5px; display:flex; align-items:center; justify-content:center;
  transition:all 150ms;
}
.device-btn:hover { background:#F3F4F6; color:#374151; }
.device-btn.active { background:#FFF7ED; color:#F97316; }
.preview-url-bar {
  flex:1; display:flex; align-items:center; gap:6px;
  background:#F3F4F6; border-radius:6px; padding:0 8px; height:26px;
}
.preview-url-bar .lock-icon { color:#10B981; flex-shrink:0; }
.preview-url-bar input {
  flex:1; border:none; outline:none; background:none;
  font-family:'JetBrains Mono',monospace; font-size:11px; color:#6B7280;
}
.preview-iframe-wrap {
  flex:1; display:flex; align-items:center; justify-content:center;
  padding:12px; overflow:hidden;
}
.preview-iframe-container {
  background:#fff; border-radius:8px; overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  transition:width 300ms ease, height 300ms ease;
  width:100%; height:100%;
}
.preview-iframe-container.mobile { width:375px; height:100%; border-radius:24px; border:3px solid #1F2937; }
.preview-iframe-container.tablet { width:768px; height:100%; border-radius:16px; border:2px solid #374151; }
.preview-iframe-container iframe { width:100%; height:100%; border:none; background:#fff; }

/* ═══ RESIZE HANDLE ═══ */
.resize-handle {
  width:4px; cursor:col-resize; background:transparent; flex-shrink:0;
  position:relative; z-index:10; transition:background 150ms;
}
.resize-handle:hover, .resize-handle.dragging { background:#F97316; }

/* ═══ TERMINAL ═══ */
.terminal-panel {
  height:180px; min-height:0; background:#0D1117;
  border-top:1px solid #30363D; display:flex; flex-direction:column;
  transition:height 200ms ease;
}
.terminal-panel.collapsed { height:28px; min-height:28px; }
.terminal-header {
  height:28px; padding:0 10px; display:flex; align-items:center; gap:6px;
  background:#161B22; border-bottom:1px solid #30363D; flex-shrink:0; cursor:pointer;
}
.terminal-header span { font-family:'JetBrains Mono',monospace; font-size:11px; color:#8B949E; }
.term-tab {
  padding:2px 8px; border-radius:4px; font-size:10px; font-weight:500;
  color:#C9D1D9; background:#21262D; cursor:pointer;
}
.term-tab.active { background:#30363D; color:#F97316; }
.term-toggle {
  margin-left:auto; width:20px; height:20px; border:none; background:none;
  color:#8B949E; cursor:pointer; display:flex; align-items:center; justify-content:center;
  border-radius:4px; transition:all 150ms;
}
.term-toggle:hover { background:#21262D; color:#C9D1D9; }
.terminal-body {
  flex:1; overflow-y:auto; padding:8px 12px;
  font-family:'JetBrains Mono',monospace; font-size:11px; line-height:1.7; color:#C9D1D9;
}
.terminal-panel.collapsed .terminal-body { display:none; }
.term-prompt { color:#F97316; }
.term-success { color:#3FB950; }
.term-info { color:#58A6FF; }
.term-dim { color:#484F58; }

/* ═══ MODAL ═══ */
.modal-backdrop {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.4);
  z-index:200; align-items:center; justify-content:center;
}
.modal-backdrop.open { display:flex; }
.modal-card {
  background:#fff; border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,0.15);
  max-width:500px; width:100%; margin:20px; animation:modalIn 200ms ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
.modal-header {
  padding:16px 20px; border-bottom:1px solid #F3F4F6;
  display:flex; align-items:center; justify-content:space-between;
}
.modal-header h3 { font-size:15px; font-weight:600; }
.modal-close {
  width:28px; height:28px; border:none; background:none; cursor:pointer;
  color:#9CA3AF; border-radius:6px; display:flex; align-items:center; justify-content:center;
}
.modal-close:hover { background:#F3F4F6; color:#374151; }
.modal-body { padding:20px; }
.modal-footer { padding:12px 20px; border-top:1px solid #F3F4F6; display:flex; justify-content:flex-end; gap:8px; }
.instr-templates { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.instr-chip {
  padding:5px 10px; border:1px solid #E5E7EB; border-radius:7px;
  font-size:11px; font-weight:500; color:#6B7280; cursor:pointer;
  transition:all 150ms; background:#fff;
}
.instr-chip:hover { border-color:#F97316; color:#F97316; background:#FFF7ED; }
.instr-chip.active { border-color:#F97316; color:#C2410C; background:#FFF7ED; }
.form-input {
  width:100%; padding:10px 14px; border:1px solid #E5E7EB; border-radius:8px;
  font-size:13px; font-family:Inter,sans-serif; outline:none; box-sizing:border-box;
  background:#fff; transition:border-color 150ms; resize:vertical; min-height:80px;
}
.form-input:focus { border-color:#F97316; box-shadow:0 0 0 3px rgba(249,115,22,0.1); }
.form-input::placeholder { color:#D1D5DB; }
.btn { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; font-size:13px; font-weight:500; border-radius:8px; cursor:pointer; border:none; transition:all 150ms; font-family:Inter,sans-serif; }
.btn-primary { background:#F97316; color:#fff; }
.btn-primary:hover { background:#EA580C; }
.btn-outline { background:#fff; border:1px solid #E5E7EB; color:#374151; }
.btn-outline:hover { background:#F9FAFB; border-color:#D1D5DB; }
.btn-sm { padding:6px 12px; font-size:12px; }

/* ═══ SECRETS MODAL ═══ */
.secrets-modal-card { max-width:540px; }
.secrets-header-text h3 { font-size:15px; font-weight:600; }
.secrets-desc {
  font-size:12px; color:#6B7280; margin-bottom:14px; line-height:1.5;
}
.secrets-suggestion {
  display:flex; align-items:center; gap:6px; padding:10px 14px;
  background:#FFF7ED; border:1px solid #FED7AA; border-radius:8px;
  font-size:12px; color:#9A3412; margin-bottom:16px;
}
.secrets-suggestion svg { color:#F97316; flex-shrink:0; }
.secrets-link { color:#F97316; text-decoration:underline; font-weight:500; }
.secrets-link:hover { color:#EA580C; }
.secrets-list { min-height:60px; }
.secrets-empty {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:24px 0; color:#9CA3AF; text-align:center;
}
.secrets-empty svg { margin-bottom:8px; }
.secrets-empty p:first-of-type { font-size:13px; font-weight:500; color:#6B7280; }
.secret-row {
  display:flex; align-items:center; gap:8px; padding:8px 0;
  border-bottom:1px solid #F3F4F6;
}
.secret-row:last-child { border-bottom:none; }
.secret-key {
  font-family:'JetBrains Mono',monospace; font-size:12px; font-weight:500;
  color:#111827; background:#F3F4F6; padding:3px 8px; border-radius:4px;
  white-space:nowrap; min-width:100px;
}
.secret-value {
  flex:1; font-family:'JetBrains Mono',monospace; font-size:12px; color:#6B7280;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.secret-actions { display:flex; gap:2px; flex-shrink:0; }
.secret-action { width:26px; height:26px; }
.secret-delete:hover { color:#EF4444; }
.secrets-add-form { margin-top:14px; }
.secrets-add-row { display:flex; gap:8px; margin-bottom:8px; }
.secrets-input {
  min-height:36px; resize:none; font-family:'JetBrains Mono',monospace; font-size:12px;
}
.secrets-add-row .secrets-input:first-child { flex:0 0 40%; }
.secrets-add-row .secrets-input:last-child { flex:1; }
.secrets-add-actions { display:flex; justify-content:flex-end; gap:6px; }

/* ═══ TOAST ═══ */
.toast {
  position:fixed; bottom:24px; right:24px; background:#111827; color:#fff;
  font-size:13px; font-weight:500; padding:10px 18px; border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,0.18); z-index:300;
  opacity:0; transform:translateY(8px); transition:all 250ms; pointer-events:none;
}
.toast.show { opacity:1; transform:translateY(0); }

/* ═══ TYPING ═══ */
.typing-indicator { display:flex; gap:4px; padding:8px 0; }
.typing-indicator span {
  width:6px; height:6px; background:#D1D5DB; border-radius:50%;
  animation:bounce 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay:0.2s; }
.typing-indicator span:nth-child(3) { animation-delay:0.4s; }
@keyframes bounce { 0%,60%,100% { transform:translateY(0); } 30% { transform:translateY(-6px); } }
@keyframes blink { 50% { opacity:0; } }

/* ═══ NEW PROJECT DIALOG ═══ */
.npd-overlay {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.45);
  z-index:250; align-items:center; justify-content:center;
}
.npd-overlay.open { display:flex; }
.npd-dialog {
  background:#fff; border-radius:14px; max-width:520px; width:100%; margin:20px;
  box-shadow:0 20px 60px rgba(0,0,0,0.18); display:flex; flex-direction:column;
  max-height:calc(100vh - 80px); animation:modalIn 200ms ease;
}
.npd-header {
  padding:24px 24px 16px; position:relative;
}
.npd-title {
  font-family:Newsreader,serif; font-size:28px; font-weight:500;
  color:#111827; letter-spacing:-0.02em; margin:0 0 4px;
}
.npd-subtitle {
  font-size:13px; color:#9CA3AF; margin:0;
}
.npd-close {
  position:absolute; top:20px; right:20px;
  width:32px; height:32px; border:none; background:none; cursor:pointer;
  color:#9CA3AF; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition:all 150ms;
}
.npd-close:hover { background:#F3F4F6; color:#374151; }

/* Search */
.npd-search-wrap {
  position:relative; margin:0 24px 12px;
}
.npd-search-icon {
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  color:#9CA3AF; pointer-events:none;
}
.npd-search {
  width:100%; padding:9px 12px 9px 34px;
  border:1px solid #E5E7EB; border-radius:8px;
  font-size:13px; font-family:Inter,sans-serif; outline:none;
  background:#FAFAFA; transition:border-color 150ms, box-shadow 150ms;
}
.npd-search:focus {
  border-color:#F97316; background:#fff;
  box-shadow:0 0 0 3px rgba(249,115,22,0.08);
}
.npd-search::placeholder { color:#D1D5DB; }

/* Tabs */
.npd-tabs {
  display:flex; gap:4px; padding:0 24px 12px;
  border-bottom:1px solid #F3F4F6;
}
.npd-tab {
  display:inline-flex; align-items:center; gap:4px;
  padding:5px 12px; border:1px solid transparent; border-radius:7px;
  font-size:12px; font-weight:500; color:#6B7280; cursor:pointer;
  background:none; font-family:Inter,sans-serif; transition:all 150ms;
}
.npd-tab:hover { background:#F9FAFB; color:#374151; }
.npd-tab.active { background:#FFF7ED; border-color:#FDBA74; color:#C2410C; }
.npd-tab-count {
  font-size:10px; font-weight:600; color:#9CA3AF;
  background:#F3F4F6; padding:1px 5px; border-radius:4px; line-height:1.4;
}
.npd-tab.active .npd-tab-count { background:#FFEDD5; color:#C2410C; }

/* Template list */
.npd-list {
  flex:1; overflow-y:auto; padding:8px 24px 8px;
  min-height:200px; max-height:380px;
}
.npd-card {
  display:flex; align-items:center; gap:12px; padding:10px 12px;
  border:1px solid #F3F4F6; border-radius:8px; cursor:pointer;
  transition:all 150ms; margin-bottom:6px; background:#fff;
}
.npd-card:hover { border-color:#FDBA74; background:#FFFAF5; }
.npd-card.selected { border-color:#F97316; background:#FFF7ED; box-shadow:0 0 0 2px rgba(249,115,22,0.12); }
.npd-card-icon {
  width:40px; height:40px; border-radius:8px; background:#F9FAFB;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; flex-shrink:0;
}
.npd-card.selected .npd-card-icon { background:#FFEDD5; }
.npd-card-info { flex:1; min-width:0; }
.npd-card-name-row {
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
}
.npd-card-name {
  font-size:13px; font-weight:600; color:#111827;
}
.npd-card-desc {
  font-size:11px; color:#9CA3AF; margin:2px 0 0; line-height:1.4;
}
.npd-card-check { flex-shrink:0; }

/* Badges */
.npd-badge-vedika {
  font-size:9px; font-weight:700; letter-spacing:0.03em;
  background:linear-gradient(135deg,#F97316,#FB923C); color:#fff;
  padding:2px 6px; border-radius:4px; white-space:nowrap;
}
.npd-badge-pro {
  font-size:8px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase;
  background:#F97316; color:#fff;
  padding:2px 5px; border-radius:3px; white-space:nowrap;
}
.npd-badge-biz {
  font-size:8px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase;
  background:#7C3AED; color:#fff;
  padding:2px 5px; border-radius:3px; white-space:nowrap;
}

/* Empty state */
.npd-empty {
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; padding:40px 20px; color:#9CA3AF;
}
.npd-empty-icon { font-size:32px; margin-bottom:8px; }
.npd-empty p { font-size:13px; }

/* Footer */
.npd-footer {
  padding:12px 24px 20px; border-top:1px solid #F3F4F6;
  display:flex; align-items:center; gap:8px;
}
.npd-name-input {
  flex:1; padding:9px 12px; border:1px solid #E5E7EB; border-radius:8px;
  font-size:13px; font-family:Inter,sans-serif; outline:none;
  transition:border-color 150ms, box-shadow 150ms;
}
.npd-name-input:focus {
  border-color:#F97316; box-shadow:0 0 0 3px rgba(249,115,22,0.08);
}
.npd-name-input::placeholder { color:#D1D5DB; }
.npd-create-btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 18px; background:#F97316; color:#fff; border:none;
  border-radius:8px; font-size:13px; font-weight:600; cursor:pointer;
  font-family:Inter,sans-serif; transition:all 150ms; white-space:nowrap;
}
.npd-create-btn:hover { background:#EA580C; transform:translateY(-1px); box-shadow:0 4px 12px rgba(249,115,22,0.3); }
.npd-create-btn:active { transform:translateY(0); }
