/* ═══════════════════════════════════════════════════════════════
   styles.css  —  Vitara Alde
   Sections:
     1. CSS Variables (light + dark themes)
     2. Reset & Base
     3. Layout
     4. Header
     5. Left Panel
     6. Resize Handle
     7. Center Canvas & Glass Card
     8. Step 1  — Intent pills, Chart grid, Style buttons
     9. Step 2  — Data Config: chips, drop-zones
    10. Right Panel — AI Copilot
    11. Shared Buttons & Utilities
    12. Animations
═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────
   1. CSS VARIABLES
───────────────────────────────────────────────── */
:root {
  --bg: hsl(230 20% 97%);
  --fg: hsl(230 25% 10%);
  --card: hsl(240 10% 100%);
  --primary: hsl(250 65% 58%);
  --primary-fg: hsl(0 0% 100%);
  --muted: hsl(230 14% 95%);
  --muted-fg: hsl(230 14% 46%);
  --border: hsl(230 20% 90%);

  --vitara-cyan: hsl(190 75% 48%);
  --vitara-amber: hsl(40 90% 52%);
  --vitara-teal-subtle: hsl(170 30% 94%);

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0/.04);
  --shadow-sm: 0 2px 8px -2px rgb(0 0 0/.06), 0 1px 3px rgb(0 0 0/.04);
  --shadow-xl: 0 16px 64px -12px rgb(0 0 0/.12), 0 8px 24px rgb(0 0 0/.06);
  --shadow-glow: 0 0 32px -4px hsl(250 65% 58% / 0.18);

  --grad-surface: linear-gradient(135deg, hsl(240 20% 98%) 0%, hsl(250 16% 96%) 100%);
  --grad-card: linear-gradient(145deg, hsl(240 10% 100%) 0%, hsl(250 18% 98%) 100%);
}
::-webkit-scrollbar {
  width: 3px !important;  /* was 6px — controls vertical scrollbar width */
  height: 3px !important; /* was 6px — controls horizontal scrollbar height */
}
[data-theme="dark"] {
  --bg: hsl(240 20% 6%);
  --fg: hsl(230 20% 93%);
  --card: hsl(240 18% 9%);
  --primary: hsl(260 60% 65%);
  --primary-fg: hsl(240 20% 6%);
  --muted: hsl(240 14% 13%);
  --muted-fg: hsl(230 14% 52%);
  --border: hsl(240 14% 15%);

  --vitara-cyan: hsl(190 65% 52%);
  --vitara-amber: hsl(40 80% 55%);
  --vitara-teal-subtle: hsl(170 25% 13%);

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0/.25);
  --shadow-sm: 0 2px 10px -2px rgb(0 0 0/.35), 0 1px 4px rgb(0 0 0/.2);
  --shadow-xl: 0 16px 72px -12px rgb(0 0 0/.5), 0 8px 28px rgb(0 0 0/.35);
  --shadow-glow: 0 0 32px -4px hsl(260 60% 65% / 0.30);

  --grad-surface: linear-gradient(135deg, hsl(240 20% 7%) 0%, hsl(250 18% 10%) 100%);
  --grad-card: linear-gradient(145deg, hsl(240 18% 10%) 0%, hsl(250 16% 12%) 100%);
}


/* ─────────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--grad-surface);
  color: var(--fg);
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input {
  font-family: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────
   3. LAYOUT
───────────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}


/* ─────────────────────────────────────────────────
   4. HEADER
───────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 100;
  background: hsl(240 10% 100% / .72);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .app-header {
  background: hsl(240 18% 9% / .72);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 8px;
}

.logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-text {
  font-size: 13px;
  font-weight: 600;
}

.logo-text span {
  font-weight: 400;
  color: var(--muted-fg);
}

/* Icon button (header toolbar) */
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-fg);
  transition: background .15s, color .15s;
}

.icon-btn:hover {
  background: var(--muted);
  color: var(--fg);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn.rotated svg {
  transform: rotate(180deg);
}


/* ─────────────────────────────────────────────────
   5. LEFT PANEL
───────────────────────────────────────────────── */
.left-panel {
  position: fixed;
  left: 0;
  top: 48px;
  bottom: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--grad-card);
  backdrop-filter: blur(20px) saturate(1.5);
  border-right: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  z-index: 200;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.left-panel.panel-hidden {
  transform: translateX(-100%);
}

/* Panel overlay backdrop */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.panel-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .panel-overlay {
    display: none;
  }

  .left-panel {
    /* position: relative; */
    /* top: 80; */
    z-index: 10;
  }

  .left-panel.panel-hidden {
    transform: translateX(-100%);
    position: absolute;
  }
}

.panel-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-fg);
  padding: 12px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

.left-panel-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.data-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
  background: hsl(240 10% 100% / .50);
  color: var(--fg);
  transition: box-shadow .25s, border-color .25s;
}

[data-theme="dark"] .data-btn {
  background: hsl(240 18% 9% / .50);
}

.data-btn:hover {
  box-shadow: var(--shadow-glow);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
}

.data-btn svg {
  width: 14px;
  height: 14px;
  color: var(--muted-fg);
  flex-shrink: 0;
}

.data-btn.expandable {
  justify-content: space-between;
}

.data-btn.expandable .dbtn-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chevron-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--muted-fg);
  transition: transform .15s;
}

.data-btn.open .chevron-icon {
  transform: rotate(180deg);
}

.sample-submenu {
  margin-left: 8px;
  padding: 2px 0 4px 12px;
  border-left: 1px solid var(--border);
  display: none;
}

.sample-submenu.open {
  display: block;
}

.sample-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 5px 8px 5px 10px;
  font-size: 12.5px;
  color: var(--muted-fg);
  border-radius: 0 6px 6px 0;
  border-left: 2px solid transparent;
  margin-left: -12px;
  transition: background .12s, color .12s, border-color .12s;
}

.sample-item:hover {
  background: var(--muted);
  color: var(--fg);
}

.sample-item.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

.sample-item.active:hover {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}

/* Uploaded data (session) items */
.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  margin-left: -12px;
  padding-left: 10px;
}

.session-item:hover {
  background: var(--muted);
  color: var(--fg);
}

.session-item.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

.session-item.active:hover {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}

.session-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.session-item-source {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  color: var(--muted-fg);
}

.session-item-source[data-src="csv"] {
  background: hsl(220 60% 93%);
  color: hsl(220 60% 40%);
}

[data-theme="dark"] .session-item-source[data-src="csv"] {
  background: hsl(220 40% 18%);
  color: hsl(220 60% 65%);
}

.session-item-source[data-src="mosaic"] {
  background: hsl(270 55% 92%);
  color: hsl(270 55% 40%);
}

[data-theme="dark"] .session-item-source[data-src="mosaic"] {
  background: hsl(270 35% 18%);
  color: hsl(270 55% 65%);
}

.session-item.active .session-item-source {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
}


/* ─────────────────────────────────────────────────
   6. RESIZE HANDLE
───────────────────────────────────────────────── */
.resize-handle {
  width: 5px;
  cursor: col-resize;
  flex-shrink: 0;
  background: transparent;
  position: relative;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.resize-handle.panel-hidden {
  opacity: 0;
  pointer-events: none;
}

.resize-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 36px;
  border-radius: 2px;
  background: var(--border);
  opacity: 0;
  transition: opacity .2s;
}

.resize-handle:hover::after,
.resize-handle.dragging::after {
  opacity: 1;
}



/* ─────────────────────────────────────────────────
   10. RIGHT PANEL — AI Copilot
───────────────────────────────────────────────── */
.right-panel {
  width: 400px;
  min-width: 260px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--grad-card);
  backdrop-filter: blur(20px) saturate(1.5);
  border-left: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

.rp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

.rp-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rp-header-left svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.rp-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-fg);
}

/* Quick actions */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--vitara-teal-subtle);
  color: var(--primary);
  transition: background .2s, box-shadow .2s;
}

.quick-action-btn:hover {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  box-shadow: var(--shadow-glow);
}

.quick-action-btn svg {
  width: 11px;
  height: 11px;
}

/* Chat messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
}

.chat-msg.user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 90%;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.chat-bubble.ai {
  background: var(--muted);
  color: var(--fg);
}

.chat-bubble.user {
  background: var(--primary);
  color: white;
}

.chat-bubble-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.btn-apply {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: var(--primary);
  color: white;
}

.btn-apply:hover {
  opacity: .85;
}

.btn-copy {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-fg);
}

.btn-copy:hover {
  background: color-mix(in srgb, var(--border) 80%, transparent);
  color: var(--fg);
}

.btn-copy svg {
  width: 12px;
  height: 12px;
}

/* Chat input */
.chat-input-area {
  padding: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  flex-shrink: 0;
}

.chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: 12px;
  padding: 8px 12px;
  background: hsl(240 10% 100% / .65);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .25s, border-color .25s;
}

[data-theme="dark"] .chat-input-wrap {
  background: hsl(240 18% 9% / .65);
}

.chat-input-wrap:focus-within {
  box-shadow: var(--shadow-glow);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
}

.chat-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--fg);
}

.chat-input-wrap input::placeholder {
  color: var(--muted-fg);
}

.btn-send {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-send:hover {
  opacity: .85;
}

.btn-send svg {
  width: 14px;
  height: 14px;
}

.kbd-hint {
  text-align: center;
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted-fg);
}

.kbd {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--muted);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 9px;
  font-family: monospace;
}


/* ─────────────────────────────────────────────────
   11. SHARED BUTTONS & UTILITIES
───────────────────────────────────────────────── */
.card-footer {
  display: flex;
  align-items: center;
  margin-top: 0;
}

.card-footer.justify-end {
  justify-content: flex-end;
}

.card-footer.justify-between {
  justify-content: space-between;
}

.card-footer.justify-start {
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  border: 1px solid transparent;
}

.btn svg {
  width: 13px;
  height: 13px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 48px -4px hsl(250 65% 58% / .3);
  transform: scale(1.02);
}

.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn-ghost {
  color: var(--muted-fg);
}

.btn-ghost:hover {
  color: var(--fg);
  background: var(--muted);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 3px;
}

.hidden {
  display: none !important;
}


/* ─────────────────────────────────────────────────
   12. ANIMATIONS
───────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-in {
  animation: fadeUp .22s ease forwards;
}



/* ─────────────────────────────────────────────────
   13. SETTINGS POPUP
───────────────────────────────────────────────── */
.settings-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  overflow: hidden;
  animation: popIn .15s ease;
}

.settings-popup.hidden {
  display: none;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-popup-inner {
  padding: 16px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted-fg);
}

.settings-key-row {
  display: flex;
  gap: 6px;
}

.settings-input {
  flex: 1;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--muted);
  color: var(--fg);
  outline: none;
  transition: border-color .2s;
}

.settings-input:focus {
  border-color: var(--primary);
}

.settings-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
  cursor: pointer;
  transition: opacity .2s;
}

.settings-submit-btn:hover {
  opacity: .85;
}

.settings-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-fg);
  cursor: pointer;
}

.settings-remember input {
  accent-color: var(--primary);
}

.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.settings-label {
  color: var(--muted-fg);
  font-weight: 500;
}

.settings-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  background: var(--muted);
  border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
}

.settings-theme-btn:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, var(--muted));
}

.settings-theme-btn svg {
  width: 13px;
  height: 13px;
}

.settings-status {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.settings-status.valid {
  color: hsl(155 65% 35%);
  background: hsl(155 50% 93%);
}

.settings-status.invalid {
  color: hsl(0 65% 50%);
  background: hsl(0 50% 95%);
}

[data-theme="dark"] .settings-status.valid {
  color: hsl(155 65% 60%);
  background: hsl(155 30% 15%);
}

[data-theme="dark"] .settings-status.invalid {
  color: hsl(0 65% 65%);
  background: hsl(0 30% 15%);
}


/* ─────────────────────────────────────────────────
   14. DATASET GATING OVERLAY
───────────────────────────────────────────────── */
.dataset-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  backdrop-filter: blur(4px);
  border-radius: 12px;
}

.dataset-gate-overlay.hidden {
  display: none;
}

.gate-message {
  text-align: center;
  padding: 32px;
  max-width: 360px;
}

.gate-message svg {
  color: var(--primary);
  margin-bottom: 12px;
}

.gate-message span {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg);
}

.gate-message p {
  font-size: 13px;
  color: var(--muted-fg);
  line-height: 1.5;
}


/* ─────────────────────────────────────────────────
   15. DATASET INDICATOR
───────────────────────────────────────────────── */
.dataset-indicator {
  padding: 6px 12px 2px;
}

.dataset-indicator.hidden {
  display: none;
}

.dataset-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: hsl(155 50% 93%);
  color: hsl(155 65% 28%);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  width: 100%;
  border: 1px solid hsl(155 50% 83%);
}

.dataset-badge svg {
  flex-shrink: 0;
  color: hsl(155 65% 35%);
}

[data-theme="dark"] .dataset-badge {
  background: hsl(155 30% 13%);
  color: hsl(155 65% 58%);
  border-color: hsl(155 30% 22%);
}

[data-theme="dark"] .dataset-badge svg {
  color: hsl(155 65% 55%);
}

.dataset-badge-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataset-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
  color: hsl(155 50% 45%);
  transition: all .15s;
}

.dataset-clear-btn:hover {
  color: hsl(0 65% 50%);
  background: hsl(0 50% 93%);
}


/* ─────────────────────────────────────────────────
   16. COLUMN CONFIG MODAL
───────────────────────────────────────────────── */
.col-config-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.col-config-modal--open {
  opacity: 1;
}

.col-config-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.col-config-dialog {
  position: relative;
  z-index: 1;
  width: 500px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(10px);
  transition: transform 0.15s;
}

.col-config-modal--open .col-config-dialog {
  transform: translateY(0);
}

.col-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border, hsl(220 13% 88%));
  flex-shrink: 0;
}

.col-config-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg, hsl(220 13% 13%));
}

.col-config-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-fg, hsl(220 13% 50%));
  padding: 4px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: background 0.12s, color 0.12s;
}

.col-config-close:hover {
  background: var(--hover-bg, hsl(220 13% 94%));
  color: var(--fg, hsl(220 13% 13%));
}

.col-config-hint {
  padding: 10px 18px 2px;
  font-size: 12px;
  color: var(--muted-fg, hsl(220 13% 55%));
  margin: 0;
  flex-shrink: 0;
}

.col-config-body {
  display: flex;
  flex-direction: row;
  padding: 12px 18px 16px;
  overflow-y: auto;
  flex: 1;
  gap: 0;
}

.col-config-group {
  flex: 1;
  min-width: 0;
}

.col-config-divider {
  width: 1px;
  background: var(--border, hsl(220 13% 88%));
  margin: 0 14px;
  flex-shrink: 0;
}

.col-config-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-fg, hsl(220 13% 55%));
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.col-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.col-label-dot--attr   { background: hsl(155 55% 38%); }
.col-label-dot--metric { background: hsl(240 55% 52%); }

.col-config-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 28px;
}

.col-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  user-select: none;
  border: 1px solid transparent;
}

.col-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.col-chip--attr {
  background: hsl(155 40% 92%);
  color: hsl(155 55% 25%);
  border-color: hsl(155 40% 80%);
}

.col-chip--attr:hover {
  background: hsl(240 60% 92%);
  color: hsl(240 55% 32%);
  border-color: hsl(240 60% 78%);
}

.col-chip--metric {
  background: hsl(240 60% 92%);
  color: hsl(240 55% 32%);
  border-color: hsl(240 60% 78%);
}

.col-chip--metric:hover {
  background: hsl(155 40% 92%);
  color: hsl(155 55% 25%);
  border-color: hsl(155 40% 80%);
}

.col-chip-empty {
  font-size: 12px;
  color: var(--muted-fg, hsl(220 13% 70%));
  font-style: italic;
  padding: 4px 0;
}

.col-config-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border, hsl(220 13% 88%));
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.col-config-cancel-btn {
  padding: 7px 18px;
  background: none;
  color: var(--muted-fg, hsl(220 13% 50%));
  border: 1px solid var(--border, hsl(220 13% 85%));
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.col-config-cancel-btn:hover {
  background: var(--hover-bg, hsl(220 13% 94%));
  color: var(--fg, hsl(220 13% 13%));
}

.col-config-apply-btn {
  padding: 7px 20px;
  background: hsl(240 75% 58%);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.col-config-apply-btn:hover {
  background: hsl(240 75% 50%);
}

/* Settings gear icon on session dataset items */
.ds-config-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 3px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
  color: var(--muted-fg, hsl(220 13% 55%));
  margin-left: auto;
  flex-shrink: 0;
  pointer-events: all;
}

.session-item:hover .ds-config-btn {
  opacity: 1;
}

.ds-config-btn:hover {
  background: var(--hover-bg, hsl(220 13% 88%));
  color: var(--fg, hsl(220 13% 18%));
}

/* Dark mode */
[data-theme="dark"] .col-config-dialog      { background: hsl(220 13% 11%); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
[data-theme="dark"] .col-config-header      { border-color: hsl(220 13% 20%); }
[data-theme="dark"] .col-config-title       { color: hsl(220 13% 90%); }
[data-theme="dark"] .col-config-divider     { background: hsl(220 13% 20%); }
[data-theme="dark"] .col-config-footer      { border-color: hsl(220 13% 20%); }
[data-theme="dark"] .col-config-hint        { color: hsl(220 13% 48%); }
[data-theme="dark"] .col-config-cancel-btn  { border-color: hsl(220 13% 26%); color: hsl(220 13% 60%); }
[data-theme="dark"] .col-config-cancel-btn:hover { background: hsl(220 13% 16%); color: hsl(220 13% 88%); }
[data-theme="dark"] .col-chip--attr         { background: hsl(155 30% 13%); color: hsl(155 55% 55%); border-color: hsl(155 30% 22%); }
[data-theme="dark"] .col-chip--attr:hover   { background: hsl(240 30% 16%); color: hsl(240 60% 72%); border-color: hsl(240 30% 28%); }
[data-theme="dark"] .col-chip--metric       { background: hsl(240 30% 16%); color: hsl(240 60% 72%); border-color: hsl(240 30% 28%); }
[data-theme="dark"] .col-chip--metric:hover { background: hsl(155 30% 13%); color: hsl(155 55% 55%); border-color: hsl(155 30% 22%); }
[data-theme="dark"] .ds-config-btn:hover    { background: hsl(220 13% 22%); color: hsl(220 13% 80%); }


/* ─────────────────────────────────────────────────
   17. MOSAIC MODAL
───────────────────────────────────────────────── */
.mosaic-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mosaic-modal.hidden {
  display: none;
}

.mosaic-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.mosaic-modal-content {
  position: relative;
  width: 70%;
  height: 85%;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.mosaic-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}

.mosaic-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--muted-fg);
  transition: all .15s;
}

.mosaic-modal-close:hover {
  background: var(--muted);
  color: var(--fg);
}

.mosaic-modal-content iframe {
  flex: 1;
}

.center-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 24px;
  width: 100%;
  height: calc(100vh - 50px);
  overflow: auto;
  position: relative;
}

.chart-wrapper {
  width: 100% !important;
  height: 100% !important;
}

.rootContainer.vitara {
  width: 100% !important;
  height: 100% !important;
}

.vitara .glass-card{
  position: relative;
  margin: 20px auto;
}