/* ============================================================================
   VANGUARD INTELLIGENCE - PORTAL & EMBED UNIFIED PREMIUM THEME
   ============================================================================ */

/* Design Tokens & Theme Variables */
:root {
  --bg-widget: #090e17;
  --bg-header: #0b1320;
  --bg-canvas: #0c1524;
  --bg-context: #090f19;
  --bg-sidebar: #070a10;
  --bg-card: rgba(25, 20, 50, 0.15);
  --bg-card-hover: rgba(234, 179, 8, 0.05);
  
  /* Bot Message Golden/Green theme matching screenshot */
  --bg-bot-bubble: #1b2413;
  --border-bot-bubble: rgba(234, 179, 8, 0.45);
  --text-bot-bubble: #e2e8f0;
  
  /* User Message */
  --bg-user-bubble: #14213d;
  --text-user-bubble: #f8fafc;
  
  /* Accent Gold & Blue */
  --color-gold: #eab308;
  --color-gold-hover: #ca8a04;
  --color-blue: #38bdf8;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: #070a0f;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* ============================================================================
   CHATGPT-STYLE FULLPAGE LAYOUT
   ============================================================================ */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(234, 179, 8, 0.03) 0%, transparent 40%),
              radial-gradient(circle at 10% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 45%);
}

/* Left Sidebar */
.app-sidebar {
  width: 300px;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-left: 8px;
}

.sidebar-brand .brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name h1 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.brand-name span {
  font-size: 11px;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  display: block;
}

.btn-new-chat {
  background: linear-gradient(135deg, var(--color-gold), #b45309);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.25);
  transition: all var(--transition-fast);
  margin-bottom: 24px;
}

.btn-new-chat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4);
}

.btn-new-chat i {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Sidebar Sections */
.sidebar-section {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  margin-bottom: 20px;
}

.section-header {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 12px;
  padding-left: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-count {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

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

.chat-item.active {
  background: rgba(234, 179, 8, 0.07);
  border-color: rgba(234, 179, 8, 0.25);
}

.chat-item.active i {
  color: var(--color-gold);
}

.chat-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex-grow: 1;
}

.chat-item i {
  color: var(--text-secondary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.chat-title {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

.chat-item.active .chat-title {
  color: #fff;
}

.btn-delete-chat {
  background: transparent;
  border: none;
  color: #475569;
  cursor: pointer;
  padding: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.chat-item:hover .btn-delete-chat {
  opacity: 1;
}

.btn-delete-chat:hover {
  color: #f43f5e;
}

/* Sidebar Status Strips */
.sidebar-status-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 20px;
}

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

.status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.status-dot.offline {
  background-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.status-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Sidebar Footer Buttons */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.btn-footer {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-footer:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--color-gold);
  color: #fff;
}

.btn-footer i {
  width: 16px;
  height: 16px;
}

/* Main Area Layout */
.app-main {
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-canvas);
}

.main-header {
  height: 72px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-header);
  display: flex;
  align-items: center;
  padding: 0 32px;
  z-index: 5;
}

.btn-toggle-sidebar {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  margin-right: 16px;
}

.active-persona-display h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-gold);
}

.active-context-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.active-context-label i {
  width: 13px;
  height: 13px;
  color: var(--color-gold);
}

.context-editable-input {
  background: transparent;
  border: 1px solid transparent;
  outline: none;
  color: var(--color-gold);
  font-weight: 600;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  width: 140px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.context-editable-input:focus, .context-editable-input:hover {
  border-color: rgba(234, 179, 8, 0.3);
  background-color: rgba(255, 255, 255, 0.02);
}

/* ============================================================================
   WELCOME SCREEN (FULLPAGE ONLY)
   ============================================================================ */
.welcome-container {
  max-width: 800px;
  margin: 80px auto 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.welcome-icon-glow {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(234, 179, 8, 0.05);
  border: 1px solid rgba(234, 179, 8, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.1);
}

.welcome-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.welcome-header p {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 32px auto;
  line-height: 1.5;
}

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

.suggestion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.suggestion-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(234, 179, 8, 0.3);
  transform: translateY(-2px);
}

.card-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.suggestion-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.suggestion-card p {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

/* ============================================================================
   CHAT CANVAS & MESSAGES (SHARED)
   ============================================================================ */
.chat-canvas {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.messages-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 40px;
}

.message-wrapper {
  display: flex;
  width: 100%;
  animation: slide-in 0.25s ease-out forwards;
}

.message-wrapper.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 85%;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
}

/* Bot Message Golden/Green matching image */
.message-wrapper.bot .message-bubble {
  background-color: var(--bg-bot-bubble);
  border: 1px solid var(--border-bot-bubble);
  color: var(--text-bot-bubble);
  border-top-left-radius: 2px;
}

/* User Message */
.message-wrapper.user .message-bubble {
  background-color: var(--bg-user-bubble);
  color: var(--text-user-bubble);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-top-right-radius: 2px;
}

/* Markdown parsing output inside bubbles */
.message-bubble p {
  margin-bottom: 10px;
}
.message-bubble p:last-child {
  margin-bottom: 0;
}
.message-bubble strong {
  color: #fff;
  font-weight: 600;
}
.message-bubble code {
  font-family: 'Consolas', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: #fca5a5;
}
.message-bubble pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.message-bubble pre code {
  background: transparent;
  padding: 0;
  color: #a5f3fc;
}

/* Citations display in chat bubbles */
.citations-area {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.citations-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.citations-title i {
  width: 12px;
  height: 12px;
}

.citations-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.citation-pill {
  font-size: 11px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.citation-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
}

.citation-pill i {
  width: 10px;
  height: 10px;
}

/* Typing indicator style */
.typing-indicator {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 14px auto 0 auto;
  max-width: 800px;
  width: 100%;
  padding-left: 4px;
}

.typing-indicator.visible {
  display: flex;
}

.typing-indicator span {
  font-size: 12px;
  color: var(--text-secondary);
}

.dots-wrapper {
  display: flex;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-gold);
  opacity: 0.3;
  animation: pulse-dot 1.2s infinite alternate;
}

.dot:nth-child(2) {
  animation-delay: 0.4s;
}

.dot:nth-child(3) {
  animation-delay: 0.8s;
}

/* ============================================================================
   INPUT SYSTEM (SHARED)
   ============================================================================ */
.input-dock-wrapper {
  padding: 16px 24px;
  background-color: var(--bg-header);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-dock {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 6px 6px 6px 18px;
  max-width: 800px;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-dock:focus-within {
  border-color: rgba(234, 179, 8, 0.4);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.15);
}

.input-dock textarea {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  resize: none;
  height: 24px;
  line-height: 24px;
  max-height: 120px;
  padding-right: 8px;
}

.input-dock textarea::placeholder {
  color: #4b5563;
}

.btn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-gold);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  flex-shrink: 0;
}

.btn-send:hover {
  background-color: var(--color-gold-hover);
  transform: scale(1.05);
}

.btn-send svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.input-disclaimer {
  font-size: 11px;
  color: #475569;
  margin-top: 8px;
  text-align: center;
}

/* ============================================================================
   EMBED SPECIFIC FLOATING DRAWER MODE
   ============================================================================ */
.vanguard-chat-widget {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 420px;
  height: calc(100vh - 120px);
  max-height: 800px;
  background-color: var(--bg-widget);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  transform-origin: bottom right;
}

.vanguard-chat-widget.hidden {
  opacity: 0;
  transform: scale(0.9) translateY(40px);
  pointer-events: none;
}

/* Header Inside Widget Drawer */
.widget-header {
  height: 72px;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.brand-logo svg {
  filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.2));
}

.brand-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-gold);
}

.brand-info p {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.btn-close-header {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-close-header:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-gold);
}

.btn-close-header i {
  width: 16px;
  height: 16px;
}

/* Context Strip */
.context-strip {
  height: 38px;
  background-color: var(--bg-context);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.context-strip i {
  width: 14px;
  height: 14px;
  color: var(--color-gold);
}

.context-strip strong {
  color: var(--color-gold);
  font-weight: 500;
}

.vanguard-floating-close {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--color-gold);
  color: #000;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  z-index: 1001;
}

.vanguard-floating-close:hover {
  background-color: var(--color-gold-hover);
  transform: scale(1.05);
}

.vanguard-floating-close i {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

/* ============================================================================
   MODALS AND SLIDE-OVERS (SHARED)
   ============================================================================ */
.dashboard-panel-overlay, .modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.dashboard-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 550px;
  background: #090e17;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  animation: slide-over 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-header, .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-header);
}

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

.header-title h3 {
  font-size: 16px;
  color: #fff;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

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

.panel-scroll-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Dashboard Cards */
.dashboard-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
}

.db-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.es-badge { background: rgba(56, 189, 248, 0.1); color: #38bdf8; }
.pg-badge { background: rgba(234, 179, 8, 0.1); color: var(--color-gold); }

.led-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.led-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.led-dot.online { background-color: #10b981; box-shadow: 0 0 8px #10b981; }
.led-dot.offline { background-color: #ef4444; box-shadow: 0 0 8px #ef4444; }

.db-host-label {
  font-size: 11.5px;
  font-family: monospace;
  color: var(--text-secondary);
}

.card-body {
  padding: 20px;
}

.metric-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.metric-box {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.metric-val {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-gold);
}

.metric-lbl {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.table-badge {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 6px;
  color: #cbd5e1;
  font-family: monospace;
}

.table-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.index-list-section h4, .table-list-section h4, .sql-executor-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.custom-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.dashboard-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 14px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.dashboard-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: #cbd5e1;
}

/* SQL query box */
.sql-editor-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.sql-editor-container textarea {
  width: 100%;
  height: 80px;
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  color: #38bdf8;
  font-family: monospace;
  font-size: 12px;
  outline: none;
  resize: none;
}

.btn-execute-sql {
  background: var(--color-gold);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-execute-sql:hover {
  background: var(--color-gold-hover);
}

.sql-error-message {
  display: none;
  color: #ef4444;
  font-size: 11.5px;
  margin-top: 8px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
}

.sql-results-wrapper {
  margin-top: 14px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}

.empty-results-placeholder {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
}

/* Settings Modal styling */
.modal-box {
  width: 500px;
  background: #090e17;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group textarea {
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: none;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex-grow: 1;
}

.form-group input[type="range"] {
  accent-color: var(--color-gold);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-header);
}

.btn-pri {
  background: var(--color-gold);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-pri:hover {
  background: var(--color-gold-hover);
}

/* Wizard-specific CSS */
.wizard-select {
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  width: 100%;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.wizard-select:hover:not(:disabled) {
  border-color: var(--color-gold);
}

.wizard-select:focus:not(:disabled) {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

.wizard-select:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Wizard Preview Card */
.wizard-preview-card {
  background: rgba(234, 179, 8, 0.03);
  border: 1px dashed rgba(234, 179, 8, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slide-in 0.25s ease-out;
}

.wizard-preview-card h4 {
  font-size: 13px;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 2px;
}

.preview-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

#previewQuery {
  font-family: monospace;
  font-size: 11.5px;
  color: #38bdf8;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  word-break: break-all;
}

#previewDescription {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Priority Badges */
.priority-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.05em;
}

.priority-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-medium {
  background: rgba(234, 179, 8, 0.15);
  color: var(--color-gold);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.priority-low {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Disabled Start Button override */
.btn-pri:disabled {
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.2) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Secondary/Skip Button */
.btn-sec {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sec:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Wizard Search Box & Search Button */
.wizard-search-box {
  display: flex;
  gap: 8px;
  width: 100%;
}

.wizard-search-box input {
  flex-grow: 1;
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.wizard-search-box input:focus {
  border-color: var(--color-gold);
}

.btn-search-wizard {
  background: var(--color-gold);
  color: #000;
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.btn-search-wizard:hover {
  background: var(--color-gold-hover);
}

.btn-search-wizard i {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Prompting Wizard Inputs Focus */
.wizard-search-input:focus {
  border-color: var(--color-gold) !important;
}

#wizardPromptInput:focus {
  border-color: var(--color-gold) !important;
}

/* Clickable wizard pills */
.wizard-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wizard-pill:hover {
  background: rgba(234, 179, 8, 0.05);
  border-color: rgba(234, 179, 8, 0.4);
  color: var(--color-gold);
}

.wizard-pill.active {
  background: rgba(234, 179, 8, 0.15);
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.1);
}

/* ============================================================================
   RESPONSIVE DESIGN (ChatGPT-Style View)
   ============================================================================ */
@media (max-width: 768px) {
  .app-sidebar {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }

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

  .dashboard-panel {
    width: 100vw;
  }
}

/* ============================================================================
   KEYFRAMES
   ============================================================================ */
@keyframes slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-over {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes pulse-dot {
  from { opacity: 0.3; }
  to { opacity: 0.9; }
}
