@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');._button_x68si_1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
  color: var(--heading);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--line-height-tight);
  cursor: pointer;
  transition: all var(--motion-fast) ease;
}

._button_x68si_1:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

._button_x68si_1:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

._button--default_x68si_28:hover {
  border-color: var(--color-border-strong);
}

._button--primary_x68si_32 {
  background: var(--primary);
  color: var(--card-bg);
  border-color: var(--color-transparent);
}

._button--primary_x68si_32:hover {
  background: var(--primary-dark);
}

._button--ghost_x68si_42 {
  background: var(--color-primary-ghost-soft);
}

._button--ghost_x68si_42:hover {
  background: var(--color-primary-ghost);
}

._button--outline_x68si_50 {
  background: var(--color-transparent);
}

._button--outline_x68si_50:hover {
  border-color: var(--color-border-strong);
  background: var(--color-primary-ghost-soft);
}

._button--sm_x68si_59 {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

._button--md_x68si_64 {
  padding: var(--space-2) var(--space-4);
}

._button--lg_x68si_68 {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-md);
}
._sidebar_1fpzd_1 {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px;
  gap: 12px;
  width: 100%;
  min-width: 0;
  background: #F2F4F7;
  border-right: var(--border-width-1) solid var(--color-border-subtle);
  box-shadow: none;
  position: sticky;
  top: 0;
  align-self: stretch;
  transition: padding var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
  overflow: hidden;
}

._sidebar--collapsed_1fpzd_19 {
  padding: 12px;
  overflow: visible;
}

._sidebar--collapsed_1fpzd_19 ._sidebar__item-label_1fpzd_27,
._sidebar--collapsed_1fpzd_19 ._sidebar__section-title_1fpzd_28,
._sidebar--collapsed_1fpzd_19 ._sidebar__chat-item__title_1fpzd_29,
._sidebar--collapsed_1fpzd_19 ._sidebar__chat-item__meta_1fpzd_30,
._sidebar--collapsed_1fpzd_19 ._sidebar__user-info_1fpzd_31 {
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
}

._sidebar--collapsed_1fpzd_19 ._sidebar__item_1fpzd_27 {
  justify-content: center;
  padding-inline: 10px;
}

._sidebar--collapsed_1fpzd_19 ._sidebar__section-title--chats_1fpzd_43,
._sidebar--collapsed_1fpzd_19 ._sidebar__chat-list_1fpzd_44,
._sidebar--collapsed_1fpzd_19 ._sidebar__chat-popover_1fpzd_45 {
  display: none;
}

._sidebar--collapsed_1fpzd_19 ._sidebar__user_1fpzd_31 {
  justify-content: center;
}

._sidebar--collapsed_1fpzd_19 ._sidebar__user-button_1fpzd_53 {
  justify-content: center;
}

._sidebar--collapsed_1fpzd_19 ._sidebar__logo-full_1fpzd_57 {
  display: none;
}

._sidebar--collapsed_1fpzd_19 ._sidebar__collapse-btn_1fpzd_61 {
  background: var(--surface-bg);
}

._sidebar__top_1fpzd_65,
._top_1fpzd_66 {
  flex: 0 0 auto;
}

._sidebar__nav_1fpzd_70,
._nav_1fpzd_71 {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

._sidebar__cta_1fpzd_78,
._cta_1fpzd_79 {
  flex: 0 0 auto;
}

._sidebar__recents_1fpzd_83,
._recents_1fpzd_84 {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

._sidebar-backdrop_1fpzd_93 {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: var(--z-overlay);
}

._sidebar__open-btn_1fpzd_100 {
  position: fixed;
  left: var(--space-3);
  top: var(--space-3);
  z-index: var(--z-overlay);
  width: var(--size-button);
  height: var(--size-button);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: var(--border-width-1) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

._sidebar__header_1fpzd_117 {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

._sidebar__logo_1fpzd_57 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
  flex: 1;
}

._sidebar__logo-mark_1fpzd_134 {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-primary-ghost-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

._sidebar__logo-full_1fpzd_57 {
  display: inline-flex;
}

._sidebar__collapse-btn_1fpzd_61 {
  margin-left: auto;
  background: var(--color-primary-ghost-soft);
  border: var(--border-width-1) solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  width: var(--space-8);
  height: var(--space-8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}

._sidebar__collapse-btn_1fpzd_61:hover {
  color: var(--heading);
  border-color: var(--color-border-strong);
}

._sidebar__close-btn_1fpzd_168 {
  background: var(--color-transparent);
  border: var(--border-width-1) solid var(--color-border-subtle);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

._sidebar__nav_1fpzd_70 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

._nav_1fpzd_71 {
  margin: 0;
}

._sidebar__section_1fpzd_28 {
  width: 100%;
}

._sidebar__section-title_1fpzd_28 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

._sidebar__section-title--chats_1fpzd_43 {
  margin-top: 24px;
  margin-bottom: 6px;
}

._sidebar__item_1fpzd_27 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  transition: all var(--motion-fast) ease;
  font-size: 14px;
  width: 100%;
  justify-content: flex-start;
  height: 40px;
}

._sidebar__item_1fpzd_27:hover {
  background: var(--color-primary-ghost);
  color: var(--heading);
}

._sidebar__item--active_1fpzd_228 {
  background: var(--color-primary-ghost-strong);
  color: var(--primary);
  font-weight: 600;
}

._sidebar__item-icon_1fpzd_234 {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

._sidebar__item-label_1fpzd_27 {
  transition: opacity var(--motion-fast) ease;
}

._sidebar__primaryAction_1fpzd_245 {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

._sidebar__primaryActionCollapsed_1fpzd_256 {
  width: 40px;
  justify-content: center;
  padding: 0;
}

._sidebar__recents_1fpzd_83 {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

._sidebar__chat-list_1fpzd_44 {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

._sidebar__chat-item_1fpzd_29 {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  width: 100%;
  background: var(--color-transparent);
  border-radius: 10px;
  border: 1px solid var(--color-transparent);
  cursor: pointer;
  text-align: left;
  transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease;
  min-height: 30px;
}

._sidebar__chat-item__title_1fpzd_29 {
  font-size: 14px;
  font-weight: 400;
  color: var(--heading);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

._sidebar__chat-item__meta_1fpzd_30 {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

._sidebar__chat-item_1fpzd_29:hover {
  background: var(--color-primary-ghost-soft);
}

._sidebar__chat-item_1fpzd_29:active,
._sidebar__chat-item_1fpzd_29:focus-visible {
  border-color: var(--color-primary-ghost-strong);
  outline: none;
  background: var(--color-primary-ghost);
}

._sidebar__chat-item--active_1fpzd_324 {
  background: var(--color-primary-ghost);
  border-color: var(--color-transparent);
  box-shadow: none;
}

._sidebar__chat-item--active_1fpzd_324 ._sidebar__chat-item__title_1fpzd_29 {
  color: var(--primary);
  font-weight: 600;
}
._sidebar__item--chat-toggle_1fpzd_334 {
  justify-content: center;
}

._sidebar__chat-popover_1fpzd_45 {
  position: fixed;
  z-index: var(--z-popover);
  width: 250px;
  background: var(--card-bg);
  border: var(--border-width-1) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

._sidebar__chat-popover-header_1fpzd_348 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 12px;
  border-bottom: var(--border-width-1) solid rgba(148, 163, 184, 0.2);
  color: var(--muted);
}

._sidebar__chat-popover-list_1fpzd_357 {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

._sidebar__chat-popover-empty_1fpzd_364 {
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
}

._sidebar__chat-popover-item_1fpzd_370 {
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

._sidebar__chat-popover-item_1fpzd_370:hover {
  background: var(--color-primary-ghost);
}

._sidebar__chat-popover-item--active_1fpzd_386 {
  background: var(--color-primary-ghost);
  border-radius: 10px;
  border: none;
  box-shadow: none;
}

._sidebar__chat-popover-title_1fpzd_393 {
  font-weight: 600;
  color: var(--text);
}

._sidebar__chat-popover-meta_1fpzd_398 {
  font-size: 11px;
  color: var(--muted);
}

._sidebar__user_1fpzd_31 {
  position: relative;
}

._sidebar__user-button_1fpzd_53 {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: var(--border-width-1) solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface-bg);
  cursor: pointer;
}

._sidebar__user-button_1fpzd_53:hover {
  border-color: var(--color-border-subtle);
}

._sidebar__user-avatar_1fpzd_423 {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-primary-ghost-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

._sidebar__user-info_1fpzd_31 {
  display: flex;
  flex-direction: column;
}

._sidebar__user-name_1fpzd_439 {
  font-size: 14px;
  color: var(--heading);
}

._sidebar__user-menu_1fpzd_444 {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border: var(--border-width-1) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: var(--z-popover);
}

._sidebar--collapsed_1fpzd_19 ._sidebar__user-menu_1fpzd_444 {
  left: 100%;
  min-width: 200px;
  width: -moz-max-content;
  width: max-content;
}

._sidebar__signout_1fpzd_463 {
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

._sidebar__signout_1fpzd_463 svg {
  flex-shrink: 0;
}

._sidebar__footer_1fpzd_481 {
  margin-top: auto;
}

._user_1fpzd_485 {
  flex: 0 0 auto;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-subtle);
}

@media (max-width: 768px) {
  ._sidebar_1fpzd_1 {
    position: fixed;
    transform: translateX(0);
    width: calc(var(--sidebar-width) + var(--space-5));
    left: 0;
    top: 0;
    transition: transform var(--motion-medium) ease-in-out;
    z-index: var(--z-overlay);
  }

  ._sidebar--closed_1fpzd_502 {
    transform: translateX(-110%);
  }
}
._appShell_6gh0u_1 {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--app-sidebar-width) 1fr;
  background: var(--surface-bg);
  gap: 0;
  overflow: hidden;
}

._appShellNoSidebar_6gh0u_11 {
  grid-template-columns: 1fr;
}

._appShellSidebar_6gh0u_15 {
  height: 100vh;
}

._appShellMain_6gh0u_19 {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
}

._appShellMainHeader_6gh0u_26 {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-bg);
  border-bottom: var(--border-width-1) solid var(--color-border-subtle);
}

._appShellMainContent_6gh0u_34 {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-5);
}
._card_1ckbi_1 {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: none;
}

._header_1ckbi_12 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

._heading_1ckbi_19 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

._icon_1ckbi_25 {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--color-primary-ghost-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

._title_1ckbi_36 {
  font-weight: 700;
  color: var(--heading);
  font-size: 15px;
}

._status_1ckbi_42 {
  display: none;
}

._description_1ckbi_46 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

._action_1ckbi_53 {
  margin-top: 2px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

._action_1ckbi_53::after {
  content: '→';
  font-size: 14px;
}

._action_1ckbi_53:hover {
  text-decoration: underline;
}
._badge_ooqsp_1 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xxs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  line-height: var(--line-height-tight);
  background: var(--color-primary-ghost-soft);
  color: var(--primary);
}

._badge--neutral_ooqsp_16 {
  background: var(--color-primary-ghost-soft);
  color: var(--muted);
}

._badge--success_ooqsp_21 {
  background: var(--color-success-ghost);
  color: var(--mint);
}

._badge--warning_ooqsp_26 {
  background: var(--color-warning-ghost);
  color: var(--amber);
}

._badge--danger_ooqsp_31 {
  background: var(--color-danger-ghost);
  color: var(--error);
}

._badge--info_ooqsp_36 {
  background: var(--color-primary-ghost);
  color: var(--primary);
}
._card_7h46e_1 {
  background: var(--card-background, var(--card-bg));
  border-radius: var(--radius-lg);
  border: var(--border-width-1) solid var(--card-border, var(--color-border-subtle));
  padding: var(--card-padding, var(--space-6));
  box-shadow: var(--card-shadow, var(--shadow-sm));
}

._card--surface_7h46e_9 {
  background: var(--card-bg);
}

._card--flat_7h46e_13 {
  --card-shadow: none;
}
._header_1ipmu_1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

._headerText_1ipmu_8 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

._titleRow_1ipmu_14 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

._title_1ipmu_14 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  line-height: var(--line-height-tight);
}

._subtitle_1ipmu_28 {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--line-height-base);
}

._meta_1ipmu_34 {
  font-size: var(--text-xs);
  color: var(--muted);
}

._actions_1ipmu_39 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

@media (max-width: 900px) {
  ._header_1ipmu_1 {
    flex-direction: column;
    align-items: flex-start;
  }

  ._actions_1ipmu_39 {
    width: 100%;
    justify-content: flex-start;
  }
}
._listLayout_oq17l_1 {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: #F7F8FA;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
}

._headerCard_oq17l_10 {
  --card-padding: var(--space-5);
}

._headerActions_oq17l_14 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

._refreshing_oq17l_21 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--muted);
}

._banner_oq17l_29 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-primary-ghost-soft);
  color: var(--heading);
  font-size: 13px;
}

._listCard_oq17l_42 {
  --card-padding: var(--space-0);
  background: transparent;
  border: none;
  box-shadow: none;
}

._list_oq17l_1 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

._row_oq17l_55 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  border: 1px solid #E6E8EC;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: all var(--motion-fast) ease;
  text-align: left;
}

._row_oq17l_55:hover {
  border-color: #DBE0E7;
  background: #FFFFFF;
}

._rowMain_oq17l_76 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

._rowType_oq17l_83 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

._rowTitle_oq17l_89 {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

._rowMeta_oq17l_98 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  font-size: 12px;
  color: var(--muted);
  justify-self: end;
}

._rowStatus_oq17l_108 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

._rowError_oq17l_114 {
  grid-column: 1 / -1;
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-danger-ghost);
  background: var(--color-danger-ghost);
  color: var(--error);
  font-size: 12px;
}

._stateContainer_oq17l_125 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

._stateContainerStrong_oq17l_135 {
  color: var(--heading);
}

._stateLinkButton_oq17l_139 {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
}

@media (max-width: 1100px) {
  ._row_oq17l_55 {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  ._rowMeta_oq17l_98 {
    align-items: flex-start;
  }
}
._callout_5igyd_1 {
  border-radius: var(--radius-md);
  border: var(--border-width-1) solid var(--color-border-subtle);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-ghost-soft);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

._callout--info_5igyd_12 {
  background: var(--color-primary-ghost-soft);
  border-color: var(--color-primary-ghost);
}

._callout--warn_5igyd_17 {
  background: var(--color-warning-ghost);
  border-color: var(--color-warning-ghost);
  color: var(--heading);
}

._callout--error_5igyd_23 {
  background: var(--color-danger-ghost);
  border-color: var(--color-danger-ghost);
  color: var(--heading);
}

._title_5igyd_29 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: inherit;
}

._body_5igyd_37 {
  font-size: var(--text-sm);
  line-height: var(--line-height-base);
  color: inherit;
}
._header_1nz0j_1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

._main_1nz0j_13 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

._breadcrumbs_1nz0j_20 {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--muted);
}

._breadcrumbItem_1nz0j_28 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

._breadcrumbLink_1nz0j_34 {
  background: var(--color-transparent);
  border: var(--border-width-1) solid var(--color-transparent);
  padding: 0;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
}

._breadcrumbLink_1nz0j_34:hover {
  color: var(--primary-dark);
}

._breadcrumbLink_1nz0j_34:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

._breadcrumbText_1nz0j_53 {
  color: var(--muted);
}

._breadcrumbSeparator_1nz0j_57 {
  color: var(--muted);
}

._titleRow_1nz0j_61 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

._title_1nz0j_61 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--heading);
  margin: 0;
  line-height: var(--line-height-tight);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

._subtitleRow_1nz0j_80 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

._subtitle_1nz0j_80 {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--line-height-base);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

._metaRow_1nz0j_97 {
  font-size: var(--text-xs);
  color: var(--muted);
}

._subtitleAction_1nz0j_102 {
  display: inline-flex;
  align-items: center;
}

._actions_1nz0j_107 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  ._header_1nz0j_1 {
    flex-direction: column;
  }

  ._actions_1nz0j_107 {
    width: 100%;
    justify-content: flex-start;
  }

  ._subtitle_1nz0j_80 {
    white-space: normal;
  }
}
._navWrapper_lg4d3_1 {
  position: sticky;
  top: var(--space-6);
}

._navList_lg4d3_6 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
}

._title_lg4d3_16 {
  font-size: var(--text-xxs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

._item_lg4d3_25 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: var(--border-width-1) solid var(--color-transparent);
  background: var(--color-transparent);
  color: var(--muted);
  font-size: var(--text-sm);
  cursor: pointer;
  text-align: left;
}

._item_lg4d3_25:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

._item_lg4d3_25:disabled {
  cursor: not-allowed;
}

._itemDisabled_lg4d3_48 {
  opacity: 0.5;
}

._itemActive_lg4d3_52 {
  background: var(--color-primary-ghost);
  color: var(--heading);
  border-color: var(--color-primary-ghost-strong);
  font-weight: 600;
}

._itemLabel_lg4d3_59 {
  flex: 1;
}

._itemMeta_lg4d3_63 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

._warningDot_lg4d3_69 {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-warning);
  box-shadow: 0 0 0 var(--space-0-5) var(--color-warning-ghost);
}

._countBadge_lg4d3_77 {
  min-width: var(--space-5);
  padding: var(--space-0-5) var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-primary-ghost-soft);
  color: var(--heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
}

._navSelect_lg4d3_88 {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
}

._selectLabel_lg4d3_98 {
  font-size: var(--text-xxs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--muted);
}

._select_lg4d3_98 {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
  color: var(--heading);
  font-size: var(--text-sm);
}

._select_lg4d3_98:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (max-width: 960px) {
  ._navList_lg4d3_6 {
    display: none;
  }

  ._navSelect_lg4d3_88 {
    display: flex;
  }
}
._reportLayout_1rm1w_1 {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-4);
  height: 100%;
  min-height: 0;
  flex: 1;
}

._reportHeader_1rm1w_10 {
  position: sticky;
  top: 0;
  z-index: 8;
}

._headerActions_1rm1w_16 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

._menu_1rm1w_23 {
  position: relative;
  display: inline-flex;
}

._menuPanel_1rm1w_28 {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  min-width: var(--size-menu);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
  box-shadow: var(--shadow-floating);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  z-index: var(--z-popover);
}

._menuItem_1rm1w_44 {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: var(--border-width-1) solid var(--color-transparent);
  background: var(--color-transparent);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--heading);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--motion-fast) ease;
}

._menuItem_1rm1w_44:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

._menuItem_1rm1w_44:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

._menuItem_1rm1w_44:hover {
  background: var(--color-primary-ghost-soft);
}

._menuItemActive_1rm1w_72 {
  background: var(--color-primary-ghost);
  border: var(--border-width-1) solid var(--color-primary-ghost-strong);
  font-weight: 600;
}

._menuSectionLabel_1rm1w_78 {
  font-size: var(--text-xxs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--muted);
  padding: var(--space-1) var(--space-3);
}

._menuDivider_1rm1w_87 {
  height: var(--border-width-2);
  background: var(--color-border-subtle);
  margin: var(--space-1) 0;
}

._reportBody_1rm1w_93 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--report-toc-width);
  gap: var(--space-6);
  align-items: start;
  min-height: 0;
  width: 100%;
  height: auto;
  overflow: visible;
}

._reportNav_1rm1w_104 {
  height: -moz-fit-content;
  height: fit-content;
}

._reportContent_1rm1w_108 {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  scroll-behavior: smooth;
  max-height: calc(100vh - 180px);
}

._reportContentInner_1rm1w_118 {
  width: 100%;
  max-width: var(--report-content-max);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  padding: 0 var(--space-5) var(--space-10);
}

._reportContent_1rm1w_108[data-density='compact'] ._reportContentInner_1rm1w_118 {
  gap: var(--space-8);
}

._reportSection_1rm1w_132 {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-8);
  border-bottom: var(--border-width-1) solid var(--color-border-subtle);
  scroll-margin-top: var(--space-10);
}

._reportSection--cardWrapper_1rm1w_141 {
  border-bottom: none;
  padding-bottom: 0;
  gap: var(--space-2);
}

._reportSectionCard_1rm1w_147 {
  border-radius: var(--radius-lg);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

._reportContent_1rm1w_108[data-density='compact'] ._reportSection_1rm1w_132 {
  padding-bottom: var(--space-6);
}

._sectionBody_1rm1w_163 {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-md);
  line-height: var(--line-height-base);
  color: var(--text);
}

._reportContent_1rm1w_108[data-density='compact'] ._sectionBody_1rm1w_163 {
  gap: var(--space-2);
  line-height: var(--line-height-tight);
}

._sectionBody_1rm1w_163 p {
  margin: 0;
}

._sectionBody_1rm1w_163 ul,
._sectionBody_1rm1w_163 ol {
  margin: 0 0 var(--space-2) 0;
  padding-left: var(--space-6);
  list-style: disc;
}

._sectionBody_1rm1w_163 ul ul,
._sectionBody_1rm1w_163 ol ol {
  margin-top: var(--space-1);
  padding-left: var(--space-5);
  list-style: circle;
}

._sectionBody_1rm1w_163 ul li,
._sectionBody_1rm1w_163 ol li {
  padding-left: var(--space-2);
}

._sectionBody_1rm1w_163 .report-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

._sectionBody_1rm1w_163 .report-list__item {
  padding-left: 0;
}

._sectionBody_1rm1w_163 .report-list__item strong:only-child {
  display: block;
  margin-top: var(--space-2);
}

._sectionBody_1rm1w_163 li {
  margin: var(--space-1) 0;
}

._sectionBody_1rm1w_163 h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-lg);
  color: var(--heading);
}

._sectionBody_1rm1w_163 h4 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: var(--text-md);
  color: var(--heading);
}

._sectionBody_1rm1w_163 strong {
  color: var(--heading);
  font-weight: 600;
}

._sectionBody_1rm1w_163 code {
  font-family: var(--font-mono);
}

._sectionBody_1rm1w_163 code.report-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--color-primary-ghost-soft);
  color: var(--heading);
  font-size: var(--text-xs);
  font-weight: 500;
}

._sectionBody_1rm1w_163 a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: var(--border-width-2);
  text-underline-offset: var(--space-1);
}

._sectionBody_1rm1w_163 a:hover {
  color: var(--primary-dark);
}

._sectionBody_1rm1w_163 a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

._sectionBody_1rm1w_163 pre {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--color-surface-muted);
  overflow: auto;
}

._sectionBody_1rm1w_163 pre code {
  display: block;
  font-size: var(--text-xs);
  line-height: var(--line-height-tight);
}

._sectionBody_1rm1w_163 .report-qa {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3) var(--space-3);
  border: var(--border-width-1) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}

._sectionBody_1rm1w_163 .report-qa__question {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--heading);
}

._sectionBody_1rm1w_163 .report-qa__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--muted);
}

._sectionBody_1rm1w_163 .report-qa__block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

._sectionBody_1rm1w_163 .report-qa__evidence-media {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

._sectionBody_1rm1w_163 .report-qa__details {
  border: var(--border-width-1) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  padding: var(--space-2) var(--space-3);
  margin: 0;
}

._sectionBody_1rm1w_163 .report-qa__details-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--heading);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  position: relative;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  margin-bottom: 0;
}

._sectionBody_1rm1w_163 .report-qa__details-summary::-webkit-details-marker {
  display: none;
}

._sectionBody_1rm1w_163 .report-qa__details-summary::after {
  content: '▾';
  font-size: var(--text-xs);
  color: var(--muted);
  transition: transform var(--motion-fast) ease;
}

._sectionBody_1rm1w_163 details.report-qa__details[open] .report-qa__details-summary::after {
  transform: rotate(-180deg);
}

._sectionBody_1rm1w_163 .report-qa__details-body {
  margin-top: var(--space-2);
  color: var(--text);
}

._sectionBody_1rm1w_163 .report-qa__chart,
._sectionBody_1rm1w_163 .report-qa__table {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

._sectionBody_1rm1w_163 .report-qa__table {
  overflow: auto;
}

._sectionBody_1rm1w_163 .report-qa__table-scroll {
  max-height: calc(var(--space-6) * 10);
  overflow-y: auto;
}

._sectionBody_1rm1w_163 .report-qa__table table {
  width: 100%;
}

._sectionBody_1rm1w_163 .report-qa__table table thead th {
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1;
}

._sectionBody_1rm1w_163 .report-qa__table table thead {
  background: var(--card-bg);
}

._sectionBody_1rm1w_163 .report-sql-block {
  display: block;
}

._sectionBody_1rm1w_163 .report-qa__details-reasoning {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

._sectionBody_1rm1w_163 .report-qa__details-sql {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-top: var(--border-width-1) solid var(--color-border-subtle);
  padding-top: var(--space-3);
}

._sectionBody_1rm1w_163 .report-qa__details-sql-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--muted);
}

._sectionBody_1rm1w_163 .report-qa__details-sql pre {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: var(--border-width-1) solid var(--color-border-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--line-height-tight);
  white-space: pre-wrap;
  word-break: break-word;
}

._sectionBody_1rm1w_163 blockquote {
  margin: 0;
  padding: var(--space-3);
  border-left: var(--border-width-2) solid var(--color-border-strong);
  background: var(--color-surface-muted);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

._reportContent_1rm1w_108 .echarts-embed {
  margin-top: var(--space-3);
  min-height: var(--report-chart-min);
  border: var(--border-width-1) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--color-surface-muted);
}

._reportContent_1rm1w_108 .echarts-embed__chart {
  width: 100%;
  height: var(--report-chart-height);
}

._reportContent_1rm1w_108[data-hide-charts='true'] .echarts-embed {
  display: none;
}

._reportContent_1rm1w_108[data-hide-charts='true'] [data-report-chart-label='true'] {
  display: none;
}

._reportContent_1rm1w_108[data-hide-sql='true'] [data-report-sql='true'] {
  opacity: 0.7;
}

._reportContent_1rm1w_108[data-hide-sql='true'][data-sql-expanded='true'] [data-report-sql='true'] {
  opacity: 1;
}

._reportContent_1rm1w_108[data-hide-sql='false'] [data-report-sql='true'] {
  opacity: 1;
}

._sectionBody_1rm1w_163 details.report-sql {
  border-radius: var(--radius-md);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--color-surface-muted);
  overflow: hidden;
}

._sectionBody_1rm1w_163 details.report-sql summary {
  list-style: none;
}

._sectionBody_1rm1w_163 details.report-sql summary::-webkit-details-marker {
  display: none;
}

._sectionBody_1rm1w_163 .report-sql__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--heading);
  cursor: pointer;
}

._sectionBody_1rm1w_163 .report-sql__summary::after {
  content: '▾';
  font-size: var(--text-xs);
  color: var(--muted);
  transition: transform var(--motion-fast) ease;
}

._sectionBody_1rm1w_163 details.report-sql[open] .report-sql__summary::after {
  transform: rotate(-180deg);
}

._sectionBody_1rm1w_163 .report-sql__summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

._sectionBody_1rm1w_163 .report-sql__body {
  padding: 0 var(--space-4) var(--space-4);
}

._sectionBody_1rm1w_163 details.report-sql pre {
  margin: 0;
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--line-height-tight);
  white-space: pre-wrap;
  word-break: break-word;
}

._takeawaysCard_1rm1w_538 {
  --card-padding: var(--space-4);
  --card-shadow: none;
  border-color: var(--color-primary-ghost);
  background: var(--color-primary-ghost-soft);
}

._takeawaysTitle_1rm1w_545 {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--heading);
  margin-bottom: var(--space-2);
}

._takeawaysList_1rm1w_554 {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-md);
  line-height: var(--line-height-base);
  color: var(--text);
}

._tableGrid_1rm1w_566 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--report-table-min), 1fr));
  gap: var(--space-4);
}

._tableCard_1rm1w_572 {
  --card-shadow: none;
  --card-padding: var(--space-4);
}

._tableCard_1rm1w_572 ul,
._tableCard_1rm1w_572 ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

._tableCard_1rm1w_572 li {
  padding-left: 0;
  margin: 0 0 var(--space-1) 0;
}

._tableName_1rm1w_589 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: var(--space-3);
}

._tableMetaGrid_1rm1w_596 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

._tableMetaLabel_1rm1w_603 {
  font-size: var(--text-xxs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--muted);
  margin-bottom: var(--space-1);
}

._tableMetaValue_1rm1w_611 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--heading);
}

._tableMetaBlock_1rm1w_617 {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

._pillRow_1rm1w_624 {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

._toastRegion_1rm1w_630 {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: var(--z-popover);
}

._toast_1rm1w_630 {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
  color: var(--heading);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1200px) {
  ._reportBody_1rm1w_93 {
    gap: var(--space-4);
  }
}

@media (max-width: 1100px) {
  ._reportBody_1rm1w_93 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  ._reportNav_1rm1w_104 {
    order: -1;
  }

  ._reportContent_1rm1w_108 {
    padding-right: 0;
  }

  ._reportContentInner_1rm1w_118 {
    gap: var(--space-8);
  }
}
._progressLayout_1sryl_1 {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

._headerCard_1sryl_7 {
  --card-padding: var(--space-5);
}

._metaLine_1sryl_11 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

._metaNotice_1sryl_20 {
  color: var(--amber);
}

._progressCard_1sryl_24 {
  --card-padding: var(--space-5);
}

._stageList_1sryl_28 {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

._stageRow_1sryl_34 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-primary-ghost-soft);
}

._stageIndicator_1sryl_45 {
  width: var(--space-6);
  height: var(--space-6);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-subtle);
  background: var(--card-bg);
  font-size: 12px;
  font-weight: 600;
}

._stageIndicator--completed_1sryl_58 {
  border-color: var(--color-success-ghost);
  color: var(--mint);
}

._stageIndicator--active_1sryl_63 {
  border-color: var(--color-warning-ghost);
  color: var(--amber);
}

._stageIndicator--error_1sryl_68 {
  border-color: var(--color-danger-ghost);
  color: var(--error);
}

._stageContent_1sryl_73 {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

._stageName_1sryl_79 {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

._stageTime_1sryl_85 {
  font-size: 12px;
  color: var(--muted);
}

._forceCard_1sryl_90 {
  --card-padding: var(--space-4);
}

._forceRow_1sryl_94 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

._forceNote_1sryl_101 {
  font-size: 12px;
  color: var(--muted);
}

._errorCard_1sryl_106 {
  --card-padding: var(--space-4);
  border-color: var(--color-danger-ghost);
  background: var(--color-danger-ghost);
}

._errorText_1sryl_112 {
  color: var(--error);
  font-size: 13px;
}

._emptyState_1sryl_117 {
  font-size: 13px;
  color: var(--muted);
}


:root {
  --font-sans: 'Inter', 'Geist', 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --space-0: 0px;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-18: 72px;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --text-xxs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 22px;

  --line-height-tight: 1.3;
  --line-height-base: 1.6;
  --line-height-loose: 1.75;
  --tracking-wide: 0.08em;
  --tracking-wider: 0.1em;

  --color-surface: #ffffff;
  --color-surface-muted: #F7F8FA;
  --color-border: #E6E8EC;
  --color-border-subtle: #E6E8EC;
  --color-border-strong: #ECEEF2;
  --color-text: #0f172a;
  --color-heading: #0b1220;
  --color-muted: #64748b;
  --color-primary: #2563eb;
  --color-primary-strong: #1d4ed8;
  --color-accent: #0ea5e9;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-success-ghost: rgba(34, 197, 94, 0.12);
  --color-warning-ghost: rgba(245, 158, 11, 0.16);
  --color-danger-ghost: rgba(239, 68, 68, 0.16);
  --color-primary-ghost: #E8EDFF;
  --color-primary-ghost-strong: #DBE7FF;
  --color-primary-ghost-soft: #F2F5FF;
  --color-overlay: rgba(15, 23, 42, 0.35);
  --color-transparent: transparent;

  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 24px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 6px 14px rgba(15, 23, 42, 0.06);
  --shadow-sidebar: 8px 0 24px rgba(15, 23, 42, 0.04);
  --shadow-floating: 0 18px 40px rgba(15, 23, 42, 0.16);

  --blur-lg: 10px;

  --content-max: 1120px;
  --content-inner: calc(var(--content-max) - var(--space-12));

  --sidebar-width: 240px;
  --sidebar-width-collapsed: 72px;
  --sidebar-padding: var(--space-6);
  --sidebar-padding-collapsed: var(--space-4);

  --report-nav-width: 200px;
  --report-content-max: 1120px;
  --report-toc-width: 220px;
  --report-table-min: 240px;
  --report-sql-max: 220px;
  --report-chart-min: 320px;
  --report-chart-height: 280px;

  --motion-fast: 200ms;
  --motion-medium: 240ms;

  --z-sidebar: 100;
  --z-overlay: 120;
  --z-popover: 220;

  --size-icon: var(--space-4);
  --size-button: var(--space-11);
  --size-avatar: var(--space-8);
  --size-menu: 200px;
  --size-popover: 280px;
  --border-width-1: 1px;
  --border-width-2: 2px;

  --app-sidebar-width: var(--sidebar-width);
  --focus-ring: 0 0 0 3px var(--color-primary-ghost-strong);

  --gradient-start: var(--color-surface);
  --gradient-mid: var(--color-surface);
  --gradient-end: var(--color-surface);
  --card-bg: var(--color-surface);
  --surface-bg: var(--color-surface-muted);
  --border-color: var(--color-border);
  --primary: var(--color-primary);
  --primary-dark: var(--color-primary-strong);
  --accent: var(--color-accent);
  --mint: var(--color-success);
  --amber: var(--color-warning);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --heading: var(--color-heading);
  --error: var(--color-danger);
}

[data-theme="dark"] {
  --color-surface: #0f172a;
  --color-surface-muted: #0b1220;
  --color-border: rgba(148, 163, 184, 0.18);
  --color-border-subtle: rgba(148, 163, 184, 0.18);
  --color-border-strong: rgba(148, 163, 184, 0.3);
  --color-text: #e2e8f0;
  --color-heading: #f8fafc;
  --color-muted: #94a3b8;
  --color-primary: #7c8cff;
  --color-primary-strong: #5b6cff;
  --color-accent: #38bdf8;
  --color-danger: #f87171;
  --color-success-ghost: rgba(34, 197, 94, 0.18);
  --color-warning-ghost: rgba(245, 158, 11, 0.22);
  --color-danger-ghost: rgba(248, 113, 113, 0.2);
  --color-primary-ghost: rgba(124, 140, 255, 0.18);
  --color-primary-ghost-strong: rgba(124, 140, 255, 0.28);
  --color-primary-ghost-soft: rgba(124, 140, 255, 0.08);
  --shadow-lg: 0 24px 48px rgba(2, 6, 23, 0.6);
  --shadow-md: 0 14px 30px rgba(2, 6, 23, 0.5);
  --shadow-sm: 0 8px 18px rgba(2, 6, 23, 0.45);
  --shadow-sidebar: 8px 0 24px rgba(2, 6, 23, 0.4);
  --shadow-floating: 0 18px 40px rgba(2, 6, 23, 0.6);

  --gradient-start: var(--color-surface-muted);
  --gradient-mid: var(--color-surface-muted);
  --gradient-end: var(--color-surface-muted);
  --card-bg: var(--color-surface);
  --surface-bg: var(--color-surface-muted);
  --border-color: var(--color-border);
  --primary: var(--color-primary);
  --primary-dark: var(--color-primary-strong);
  --accent: var(--color-accent);
  --mint: var(--color-success);
  --amber: var(--color-warning);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --heading: var(--color-heading);
  --error: var(--color-danger);
}
:root {
  --color-surface-muted: #f8fafc;
  --color-border: #d9e2ef;
  --color-border-subtle: rgba(15, 23, 42, 0.06);
  --color-primary: #1d4ed8;
  --color-primary-strong: #1e40af;
  --color-muted: #5b6b7f;
  --shadow-sm: 0 6px 14px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 14px 28px rgba(15, 23, 42, 0.08);
  --shadow-sidebar: 8px 0 24px rgba(15, 23, 42, 0.03);
}
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .chat-card--right {
  background: #e8edff;
  border-color: #c5d2ff;
  color: #1f2a44;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface-bg);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}

#root {
  height: 100vh;
}

:root[data-sidebar-collapsed="true"] {
  --app-sidebar-width: var(--sidebar-width-collapsed);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(18px, 3vw, 36px);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 10;
}

.header--chat {
  padding: 18px clamp(18px, 3vw, 32px);
}

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

.logo {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.tagline {
  margin: 0;
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--muted);
}

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

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.landing-hero__icon {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(139, 92, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 32px;
}

.landing-hero__title {
  font-size: 36px;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.landing-hero__subtitle {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 40px 0;
}

.landing-hero__features {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-hero__feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
}

.landing-hero__feature-icon {
  font-size: 20px;
}

.landing-hero__cta {
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.landing-hero__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-5) var(--space-8) var(--space-6);
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-left: 0;
}

.app-main--no-scroll {
  overflow: hidden;
}


.insights-page,
.data-sources-page,
.knowledge-sources-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
}

.page-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  padding: 4px 0 12px;
  border-bottom: none;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.page-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-header__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.page-header__action {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  border: var(--border-width-1) solid var(--color-border-subtle);
  background: var(--card-bg);
  color: var(--heading);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--motion-fast) ease;
}

.page-header__action:hover {
  border-color: var(--color-border-strong);
}
.page-header__subtitle,
.page-header p {
  margin: 6px 0 0 0;
  font-size: 14px;
  color: var(--muted);
}

.page-header--compact {
  padding-top: 2px;
}

.page-content {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.page-content--chat {
  flex: 1;
  min-height: 0;
}

.insights-top-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.export-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-menu__ghost {
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  filter: none;
}

.export-menu__ghost:hover {
  background: rgba(248, 250, 252, 1);
}

.export-menu__label {
  white-space: nowrap;
}

.export-menu__ghost[data-tooltip]::after,
.export-menu__ghost[data-tooltip]::before {
  position: absolute;
  left: 100%;
  transform: translate(-100%, -6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, transform 0.12s ease;
  transition-delay: 0.1s;
  pointer-events: none;
  z-index: 50;
}

.export-menu__ghost[data-tooltip]::after {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  background: #1f2937;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: none;
}

.export-menu__ghost:hover::after,
.export-menu__ghost:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-100%, -2px);
}

.export-menu--open .export-menu__ghost::after {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s;
}


.export-menu__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
  padding: 6px;
  min-width: 210px;
  z-index: 60;
}

.export-menu__item {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.export-menu__item-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-menu__item:hover:not(:disabled) {
  background: #f8fafc;
}

.export-menu__item--disabled,
.export-menu__item:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.export-menu__item--disabled:hover {
  background: transparent;
}

.export-menu__lock {
  color: #94a3b8;
  margin-right: 6px;
}

.export-menu__note {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.insights-page--contained {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.insights-header {
  margin-bottom: 24px;
}

.insights-header h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--heading);
}

.data-sources-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 4px;
  margin-bottom: 6px;
}

.data-sources-header h2 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}

.connectors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.knowledge-header {
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.knowledge-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.knowledge-header p {
  margin: 6px 0 0 0;
  font-size: 14px;
  color: var(--muted);
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.knowledge-card {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 208px;
  box-shadow: var(--shadow-sm);
}

.knowledge-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.knowledge-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.knowledge-card__icon--slack {
  color: #7c3aed;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(217, 70, 239, 0.16));
}

.knowledge-card__icon--jira {
  color: #2563eb;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.12));
}

.knowledge-card__icon--csv {
  color: #16a34a;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
}

.knowledge-card__icon--mysql {
  color: #2563eb;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.12));
}

.knowledge-card__icon--postgres {
  color: #1d4ed8;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.18), rgba(59, 130, 246, 0.12));
}

.knowledge-card__status {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.knowledge-card__status--connected {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.24);
}

.knowledge-card__status--available {
  color: #334155;
  background: rgba(148, 163, 184, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.knowledge-card__body {
  flex: 1;
}

.knowledge-card__body h3 {
  margin: 0 0 8px 0;
  font-size: 26px;
  color: var(--heading);
}

.knowledge-card__body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 900px) {
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
}

.connectors-list__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.connectors-list__column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.connector-form-section {
  margin-bottom: 32px;
  padding: 0;
  background: transparent;
  border: none;
}

.chat-layout {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.chat-sidebars {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 200px);
}

.chat-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.chat-main--contained {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  gap: 0;
  position: relative;
  padding-bottom: 0;
}

.chat-sidebar {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 42vh;
  position: relative;
  overflow: visible;
}

.chat-sidebar--connectors .connector-list,
.chat-sidebar--dashboards .dashboard-list {
  max-height: 32vh;
}
.chat-main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.chat-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 140px;
}

.chat-stage--contained {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  margin: 0;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-md);
  padding-bottom: 96px;
}

.chat-composer {
  position: sticky;
  bottom: 16px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 14px;
}

.chat-panel + .chat-composer {
  margin-top: 12px;
}

.chat-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-sidebar__head h3 {
  margin: 0;
  font-size: 16px;
}

.chat-sidebar__section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.dashboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  overflow: auto;
}

.dashboard-list__item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dashboard-list__item:hover {
  border-color: rgba(79, 70, 229, 0.3);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.dashboard-list__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.dashboard-list__meta {
  font-size: 12px;
  color: var(--muted);
}

.empty-state--compact {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.4);
}

.chat-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-panel {
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-sm);
}

.chat-panel.connector-hub {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
}

.chat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.chat-panel__head h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
}

.chat-panel--preview {
  padding: clamp(16px, 2.4vw, 22px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 520px;
}

.chat-panel--preview .iframe-shell {
  min-height: 460px;
}

.empty-state--chat {
  padding: clamp(32px, 6vw, 48px);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
}

.chat-composer {
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid #E6E8EC;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* New chat input design */
.chat-composer--new {
  padding: 12px 0 18px;
  background: transparent;
  border: none;
  box-shadow: none;
  position: sticky;
  bottom: 0;
  left: auto;
  right: auto;
  z-index: 20;
  width: 100%;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  max-width: 100%;
  box-sizing: border-box;
}

.composer-form--new {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.file-attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  max-width: -moz-fit-content;
  max-width: fit-content;
  margin: 0 auto 0 0;
}

.file-attachment__name {
  font-size: 13px;
  color: #0f172a;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-attachment__remove {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.file-attachment__remove:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.chat-input-wrapper-new {
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
  transition: all 0.2s ease;
  box-sizing: border-box;
  position: relative;
}

.chat-input-wrapper-new:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 10px 15px -3px rgba(15, 23, 42, 0.1);
}

.chat-input-new {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 220px 10px 6px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  min-height: 48px;
}

.chat-input-new::-moz-placeholder {
  color: var(--muted);
}

.chat-input-new::placeholder {
  color: var(--muted);
}

.chat-input-new:focus {
  border-color: transparent;
  background: transparent;
}

.chat-input-new:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input__attach-btn,
.chat-input__send-btn,
.chat-input__options-btn {
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.chat-input__options {
  position: relative;
  flex-shrink: 0;
}

.chat-input__send-btn {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
}

.chat-input__send-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.chat-input__send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-input__attach-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.chat-input__options-btn:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
}

.chat-input__options-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input__options-btn--labeled {
  width: auto;
  padding: 8px 14px;
  gap: 8px;
  border-radius: 12px;
}

.chat-input__options-icon {
  flex-shrink: 0;
}

.chat-input__options-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.chat-action-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.chat-input__send-group {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
}

.chat-input__action-btn {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.chat-input__action-btn--primary {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
}

.chat-input__action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-input__action-label {
  white-space: nowrap;
}

.chat-input__action-btn[data-tooltip] {
  position: relative;
}

.chat-input__action-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
}

.chat-input__action-btn[data-tooltip]:hover::after,
.chat-input__action-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chat-input__caret-btn {
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #1f2937;
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  border-radius: 999px;
  transition: all 0.2s ease;
  min-height: 32px;
}

.chat-input__caret-btn span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.chat-input__caret-btn:hover:not(:disabled) {
  background: #e2e8f0;
  color: #111827;
}

.chat-input__caret-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input__send-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  padding: 6px 0;
  min-width: 200px;
  z-index: 100;
}

.chat-input__send-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text, #0f172a);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-input__send-dropdown-item:hover:not(:disabled) {
  background: rgba(79, 70, 229, 0.2);
}

.chat-input__send-dropdown-item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-input__options-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--card-bg, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 6px 0;
  min-width: 160px;
  z-index: 100;
}

.chat-input__options-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text, #e2e8f0);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-input__options-item:hover {
  background: rgba(79, 70, 229, 0.2);
}

.chat-input__attach-btn:hover:not(:disabled),
.chat-input__send-btn:hover:not(:disabled) {
  background: rgba(74, 80, 99, 0.3);
  color: #e2e8f0;
}

.chat-input__send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input__send-btn:not(:disabled) {
  color: #94a3b8;
}

.chat-input__send-btn:not(:disabled):hover {
  background: rgba(74, 80, 99, 0.3);
  color: #e2e8f0;
}

.composer-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.composer-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.composer-actions {
  display: grid;
  gap: 12px;
}

.composer-details {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  padding: 12px 16px;
}

.composer-details > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text);
}

.composer-details > summary::-webkit-details-marker {
  display: none;
}

.composer-details__body {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-button:hover {
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(15, 23, 42, 0.65);
}

.menu-button__bar {
  width: 18px;
  height: 2px;
  background: #cbd5f5;
  border-radius: 999px;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 16px;
  display: grid;
  gap: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
  z-index: 40;
  pointer-events: auto;
}

.menu-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-meta__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.menu-meta__value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.workspace {
  width: calc(100% - clamp(32px, 6vw, 80px));
  margin: 0 auto;
  display: flex;
  gap: clamp(24px, 3vw, 40px);
  flex: 1;
  min-height: 0;
}

.workspace--split {
  align-items: stretch;
}

.sidebar {
  flex: 0 0 clamp(320px, 28vw, 380px);
  display: flex;
  flex-direction: column;
}

.sidebar-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 4vw, 32px);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(26px);
  box-shadow: var(--shadow-lg);
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-header h2 {
  margin: 0;
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--heading);
}

.sidebar-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(99, 102, 241, 0.14);
  color: var(--primary);
}

.badge--mint {
  background: rgba(52, 211, 153, 0.14);
  color: var(--mint);
}

.badge--amber {
  background: rgba(251, 191, 36, 0.16);
  color: var(--amber);
}

.chip-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chip {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.chip:hover {
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

.chip--active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.35));
  border-color: rgba(129, 140, 248, 0.6);
  color: #fff;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-stack__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Add visual separation for materialize button groups */
.form-stack__group--materialize {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.form-stack__group--materialize:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.input-label {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.input-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.connector-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.connector-list__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
}

.connector-list__item--detailed {
  padding: 20px;
  align-items: flex-start;
}

.connector-list__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.connector-list__name {
  font-weight: 600;
  font-size: 15px;
  color: var(--heading);
  margin-bottom: 4px;
}

.connector-list__meta-line {
  font-size: 12px;
  color: var(--muted);
}

.connector-list__details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.connector-list__details-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.connector-list__details-label {
  font-weight: 600;
  color: var(--muted);
  min-width: 80px;
  font-size: 12px;
}

.connector-list__details-value {
  color: var(--text);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
}

.connector-list__tables-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.connector-list__tables-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.connector-list__tables-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.connector-list__table-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
}

.connector-list__table-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(79, 70, 229, 0.3);
}

.connector-list__table-more {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}

.connector-list__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  justify-self: end;
  align-self: center;
}

.connector-menu__button {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: center;
}

.connector-menu__button:hover {
  background: transparent;
  color: var(--text);
}

.connector-menu__button--disabled,
.connector-menu__button:disabled {
  color: var(--muted);
  opacity: 0.5;
  cursor: not-allowed;
}

.connector-menu__button--disabled:hover,
.connector-menu__button:disabled:hover {
  background: transparent;
  color: var(--muted);
}

.connector-menu {
  position: absolute;
  right: 0;
  top: 32px;
  bottom: auto;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  z-index: 600;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.connector-menu--portal {
  position: fixed;
  z-index: 10000;
}

.connector-menu--portal.connector-menu--up {
  transform: translateY(-100%);
}

.connector-menu__item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.connector-menu__item:hover {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
}

.connector-menu__item--danger {
  color: #ef4444;
}

.connector-menu__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.details-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(248, 249, 251, 0.98);
  z-index: 150;
  display: flex;
}

.details-modal {
  width: 100%;
  height: 100%;
  margin-left: 0;
  background: #f8f9fb;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
}

.details-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 50;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.details-modal__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: -1;
}

.details-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.details-modal__subtitle {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.details-modal__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}

.details-modal__header-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.details-modal__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.details-modal__breadcrumb-sep {
  opacity: 0.6;
}

.details-modal__breadcrumb-strong {
  color: var(--heading);
  font-weight: 600;
}

.details-modal__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.details-modal__header-actions button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--heading);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.details-modal__type {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

.details-modal__loading {
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.details-modal__body {
  flex: 1;
  position: relative;
}

.details-modal__content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  padding: 24px 32px 32px;
}

.details-modal__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  height: 100%;
  min-height: 0;
}

.details-modal__sidebar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  overflow-y: auto;
}

.details-modal__sidebar-header {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.details-modal__sidebar-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.details-modal__search {
  width: 100%;
}

.details-modal__panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.details-modal__tabs {
  display: flex;
  gap: 12px;
  padding: 16px 20px 8px;
  border-bottom: 1px solid #e5e7eb;
}

.details-modal__tab {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.details-modal__tab--active {
  color: #111827;
  border-bottom-color: #2563eb;
}

.details-modal__panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.details-modal__columns-tab,
.details-modal__diagram-tab {
  display: grid;
  gap: 16px;
}

.details-modal__table-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.details-modal__table-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.details-modal__grid table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.details-modal__grid th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 8px;
}

.details-modal__grid td {
  padding: 12px 8px;
  border-bottom: 1px solid #eef2f7;
  color: #111827;
}

.details-modal__grid tr {
  height: 48px;
}

.details-modal__type-cell {
  color: #64748b;
}

.details-modal__diagram-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
}

.details-modal__diagram-toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.details-modal__diagram-toolbar button {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.details-modal__diagram-canvas {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  min-height: 320px;
  max-height: calc(100vh - 320px);
  overflow: auto;
}

.details-modal__diagram-zoom {
  transform-origin: top left;
  width: -moz-max-content;
  width: max-content;
  display: inline-block;
  min-height: 100%;
}

.details-modal__relationships-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
}

.relationships-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.details-modal__relationships-title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.details-modal__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 0 0 12px 12px;
}

.details-modal__section--diagram {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  z-index: 1;
}

.details-modal__section h3,
.details-modal__section h4 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.details-modal__list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 8px;
}

.details-modal__tables {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.details-modal__table-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.details-modal__table-list ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 6px;
}

.details-modal__table-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.details-modal__table-item:hover {
  border-color: #cbd5f5;
  background: #f8fafc;
}

.details-modal__table-item--active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #1f2a5a;
}

.details-modal__table-detail {
  overflow-y: auto;
  max-height: 100%;
  min-height: 0;
}

.details-modal__table-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.details-modal__table-head > div {
  flex: 1;
  min-width: 0;
}

.details-modal__table-head .textarea-control {
  width: 100%;
  max-width: 100%;
}

.details-modal__table-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.details-modal__table-actions--footer {
  justify-content: flex-end;
  margin-top: 20px;
}

.details-modal__columns-grid {
  display: grid;
  gap: 10px;
}

.details-modal__column-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 10px;
  color: var(--text);
}

.details-modal__column-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}

.details-modal__column-type {
  font-size: 12px;
  color: var(--muted);
}

.details-modal__column-role {
  font-size: 12px;
  color: #0f172a;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  font-weight: 600;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.details-modal__column-role[data-role="dimension"] {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.25);
}

.details-modal__column-role[data-role="measure"] {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.28);
}

.details-modal__relationship-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.details-modal__badge--schema {
  background: rgba(148, 163, 184, 0.18);
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-weight: 600;
  text-transform: none;
}

.details-modal__relationship-dot {
  color: #94a3b8;
  font-weight: 600;
}

.details-modal__relationship-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.details-modal__joins {
  margin-top: 24px;
}

.details-modal__join-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-modal__joins-header {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.details-modal__joins-header h4 {
  margin: 0;
}

.details-modal__joins-subtitle {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}

.details-modal__join-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.details-modal__join-dot {
  color: #94a3b8;
  font-weight: 600;
}

.details-modal__join-keys {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.details-modal__join-key {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 12px;
  color: #0f172a;
  font-weight: 600;
}

.details-modal__close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.details-modal__close-btn:hover {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.05);
  color: var(--heading);
}

.details-modal__close-btn svg {
  width: 14px;
  height: 14px;
}

/* Schema Review Modal */
.schema-review-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(248, 249, 251, 0.98);
  z-index: 150;
  display: flex;
}

.schema-review-modal {
  width: 100%;
  height: 100%;
  margin-left: 0;
  background: #f8f9fb !important;
  display: flex;
  flex-direction: column;
  padding: 32px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.schema-review-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.schema-review-modal__header h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
}

.schema-review-modal__header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.schema-review-modal__progress {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.schema-review-modal__close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.schema-review-modal__close-btn:hover {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.05);
  color: var(--heading);
}

.schema-review-modal__close-btn svg {
  width: 14px;
  height: 14px;
}

.schema-review-modal__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  min-height: 0;
  height: 100%;
}

.schema-review-modal__tables {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  overflow-y: auto;
}

.schema-review-modal__tables h3 {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.schema-review-modal__tables ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.schema-review-modal__table-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.schema-review-modal__table-btn:hover {
  border-color: #cbd5f5;
  background: #f8fafc;
}

.schema-review-modal__table-btn--active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #1f2a5a;
}

.schema-review-modal__panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.schema-review-modal__tabs {
  display: flex;
  gap: 12px;
  padding: 16px 20px 8px;
  border-bottom: 1px solid #e5e7eb;
}

.schema-review-modal__tab {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.schema-review-modal__tab--active {
  color: #111827;
  border-bottom-color: #2563eb;
}

.schema-review-modal__panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.schema-review-columns {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 16px;
}

.schema-review-columns__meta {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.schema-review-columns__title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.schema-review-columns__inputs {
  display: grid;
  gap: 10px;
}

.schema-review-grid table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.schema-review-grid th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 8px;
}

.schema-review-grid td {
  padding: 12px 8px;
  border-bottom: 1px solid #eef2f7;
  color: #111827;
}

.schema-review-grid tr {
  height: 48px;
}

.schema-review-diagram__toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.schema-review-diagram__toolbar button {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.schema-review-diagram__canvas {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  min-height: 320px;
  overflow: auto;
}

.schema-review-diagram__relationships {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

.schema-review-diagram__relationships-title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.schema-review-modal__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 0 0 12px 12px;
}

.schema-review-modal__actions-text {
  font-size: 12px;
  color: #6b7280;
}

.schema-review-modal__actions-buttons {
  display: flex;
  gap: 10px;
}

.schema-review-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  background: #f8f9fb;
  width: 100%;
  border-radius: 12px;
}

.schema-review-loader__card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 32px;
  width: min(520px, 90%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.schema-review-loader__logo {
  font-weight: 700;
  font-size: 16px;
  color: #111827;
  margin-bottom: 12px;
}

.schema-review-loader__title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.schema-review-loader__subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.schema-review-loader__steps {
  list-style: none;
  padding: 0;
  margin: 20px 0 12px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.schema-review-loader__step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #9ca3af;
}

.schema-review-loader__step--done {
  color: #111827;
}

.schema-review-loader__step--current {
  color: #2563eb;
}

.schema-review-loader__icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  font-size: 12px;
  font-weight: 700;
  color: inherit;
}

.schema-review-loader__step--current .schema-review-loader__icon {
  background: rgba(37, 99, 235, 0.15);
  animation: schema-review-loader-pulse 1.6s ease-in-out infinite;
}

.schema-review-loader__step--done .schema-review-loader__icon {
  background: rgba(16, 185, 129, 0.15);
  color: #0f766e;
}

.schema-review-loader__progress {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

@keyframes schema-review-loader-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
  70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.schema-review-modal__body {
  flex: 1;
  overflow: hidden;
  background: #f8f9fb;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.details-modal__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.details-modal__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.details-modal__badge--type {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.details-modal__accordion {
  margin-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 12px;
}

.details-modal__accordion summary {
  cursor: pointer;
  font-weight: 600;
}

.er-diagram-panel {
  position: relative;
  margin-bottom: 20px;
  contain: layout paint;
  overflow: hidden;
}

.er-diagram-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  z-index: 2;
}

.er-diagram-toolbar button {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.er-diagram-scroll {
  overflow: auto;
  height: 360px;
  min-height: 280px;
  max-height: calc(100vh - 340px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  background-image:
    radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  position: relative;
  isolation: isolate;
}

.er-diagram-scroll svg {
  max-width: none;
  height: auto;
  position: relative !important;
  display: block;
  top: auto !important;
  left: auto !important;
}

.er-diagram-zoom {
  transform-origin: top left;
  width: -moz-max-content;
  width: max-content;
  position: relative;
  display: inline-block;
  min-height: 100%;
}

.er-diagram-zoom > svg {
  position: static !important;
}

.schema-review-modal__mermaid-fallback {
  margin: 12px 0 0 0;
  padding: 12px;
  font-size: 12px;
  overflow: auto;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.98) !important;
  color: var(--text);
}

/* Ensure legacy dark drawer/content inside schema review appears in light mode */
.schema-review-modal .details-drawer {
  background: rgba(255, 255, 255, 0.98) !important;
  border-left: 1px solid rgba(15, 23, 42, 0.06) !important;
  color: var(--text) !important;
}

.schema-review-modal .details-drawer__body,
.schema-review-modal .details-drawer__section {
  background: transparent !important;
  color: var(--text) !important;
}

.schema-review-modal .details-drawer__table-item {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--heading) !important;
  border: 1px solid rgba(15, 23, 42, 0.04) !important;
}

.schema-review-modal .details-drawer__table-item--active {
  border-color: rgba(79, 70, 229, 0.18) !important;
  background: rgba(79, 70, 229, 0.06) !important;
}

.schema-review-modal .details-drawer__column-row,
.schema-review-modal .details-drawer__loading,
.schema-review-modal .details-drawer__columns-grid {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(15, 23, 42, 0.04) !important;
  color: var(--text) !important;
}

.schema-review-modal .details-drawer__column-type,
.schema-review-modal .details-drawer__column-role,
.schema-review-modal .details-drawer__eyebrow {
  color: var(--muted) !important;
}


.schema-skeleton-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.schema-skeleton-item {
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.6), rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.6));
  background-size: 200% 100%;
  animation: schema-skeleton 1.2s ease-in-out infinite;
}

.er-diagram-toolbar--disabled button {
  opacity: 0.5;
  cursor: not-allowed;
}

.er-diagram-scroll--loading {
  position: relative;
  min-height: 320px;
}

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


.schema-review-modal .details-drawer__panel .details-drawer__header,
.schema-review-modal .details-drawer__panel .details-drawer__footer {
  background: transparent !important;
  color: var(--muted) !important;
}

/* Ensure scrollable lists and card sections are light */
.schema-review-modal .details-drawer__columns-grid,
.schema-review-modal .details-drawer__table-list,
.schema-review-modal .schema-table,
.schema-review-modal .schema-row,
.schema-review-modal .schema-cell {
  background: rgba(255,255,255,0.95) !important;
  color: var(--heading) !important;
}

/* Inputs/textarea checkboxes */
.schema-review-modal input,
.schema-review-modal textarea,
.schema-review-modal select {
  background: #ffffff !important;
  color: var(--heading) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
}

/* If any element uses inline dark rgba, override computed background */
.schema-review-modal [style*="rgba(15, 23, 42"],
.schema-review-modal [style*="rgba(12, 20, 37"],
.schema-review-modal [style*="#0f172a"] {
  background-color: rgba(255,255,255,0.98) !important;
  color: var(--text) !important;
}

/* Legacy support for old class names */
.details-drawer__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 14, 0.6);
  z-index: 40;
  display: flex;
  justify-content: flex-end;
}

.details-drawer {
  width: min(720px, 90vw);
  height: 100%;
  background: #0e111a;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

.details-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.details-drawer__eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.08em;
}

.details-drawer__type {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.12);
  color: #dbe1ff;
}

.details-drawer__loading {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.details-drawer__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.details-drawer__section h3,
.details-drawer__section h4 {
  margin-bottom: 8px;
}

.details-drawer__list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 8px;
}

.details-drawer__tables {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
}

.details-drawer__table-list ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 6px;
}

.details-drawer__table-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: #e1e6ff;
  cursor: pointer;
}

.details-drawer__table-item--active {
  border-color: rgba(100, 140, 255, 0.8);
  background: rgba(78, 117, 247, 0.25);
}

.details-drawer__table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.details-drawer__table-actions {
  display: flex;
  gap: 8px;
}

.details-drawer__columns-grid {
  display: grid;
  gap: 10px;
}

.details-drawer__column-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.details-drawer__column-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}

.details-drawer__column-type {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.details-drawer__column-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.details-drawer__joins {
  margin-top: 16px;
}

.details-drawer__join-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connector-section-title {
  margin-bottom: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.7);
}

.connector-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.connector-hub {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .connector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .connector-grid {
    grid-template-columns: 1fr;
  }
}

.connector-option {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* New connector card design matching connected datasets theme */
.connector-card-new {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

.connector-card-new:hover {
  border-color: rgba(79, 70, 229, 0.15);
  background: rgba(255, 255, 255, 0.5);
}

.connector-card-new--active {
  border-color: rgba(79, 70, 229, 0.3);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.08);
}

.connector-card-new__header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.connector-card-new__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.connector-card-new__icon--csv {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(22, 163, 74, 0.22));
}

.connector-card-new__icon--db {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.22));
}

.connector-card-new__icon--mysql {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.22));
  width: 40px;
  height: 40px;
}

.connector-card-new__icon--mysql svg {
  width: 24px;
  height: 24px;
}

.connector-card-new__icon--postgres {
  background: linear-gradient(135deg, rgba(51, 103, 214, 0.28), rgba(41, 98, 255, 0.22));
  width: 40px;
  height: 40px;
}

.connector-card-new__icon--postgres svg {
  width: 24px;
  height: 24px;
}

.connector-card-new__title-group {
  flex: 1;
  min-width: 0;
}

.connector-card-new__action-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.connector-card-new__action-btn:hover {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.05);
  color: var(--heading);
}

.connector-card-new__action-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.connector-card-new__title {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
}

.connector-card-new__subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}


.connector-card-new__expand-btn {
  width: 100%;
  padding: 40px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 2px dashed rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

.connector-card-new__expand-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.5);
}

.connector-card-new__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.connector-card-new__upload-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.connector-card-new__dropzone {
  border: 2px dashed rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(12, 20, 37, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  flex: 1;
  min-height: 0;
}

.connector-card-new__dropzone:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(12, 20, 37, 0.6);
  color: var(--text);
}

.connector-card-new__dropzone svg {
  color: var(--muted);
}

.connector-card-new__dropzone p {
  margin: 0;
  font-size: 14px;
}

.connector-card-new__file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-sm);
}

.connector-card-new__file-name {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

.upload-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.upload-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 110px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 13px;
}

.upload-list__row--uploading .upload-list__status {
  color: #0b5fff;
}

.upload-list__row--processed .upload-list__status {
  color: #0b7a39;
}

.upload-list__row--failed .upload-list__status {
  color: #b42318;
}

.upload-list__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.upload-list__size,
.upload-list__status {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.upload-list__error {
  color: #b42318;
  font-weight: 500;
}

.connector-card-new__form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.connector-card-new__form-hint {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--muted);
}

.connector-card-new__form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connector-card-new__form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.connector-card-new__form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.connector-card-new__details {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.connector-card-new__details-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.connector-card-new__uploads-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.connector-card-new__upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(12, 20, 37, 0.4);
  border-radius: var(--radius-sm);
}

.connector-card-new__upload-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(34, 197, 94, 0.9);
  flex-shrink: 0;
}

.connector-card-new__upload-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.connector-card-new__upload-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.connector-card-new__upload-meta {
  font-size: 11px;
  color: var(--muted);
}

.connector-card-new__upload-status {
  font-size: 11px;
  font-weight: 600;
  color: rgba(34, 197, 94, 0.9);
  padding: 4px 8px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 4px;
}

.connector-card-new__upload-more {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  cursor: pointer;
  text-align: center;
}

.connector-card-new__db-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connector-card-new__details-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.connector-card-new__details-label {
  font-weight: 600;
  color: var(--muted);
  min-width: 80px;
}

.connector-card-new__details-value {
  color: var(--text);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
}

.connector-card-new__tables-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.connector-card-new__table-btn {
  padding: 6px 12px;
  background: rgba(12, 20, 37, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
}

.connector-card-new__table-btn:hover {
  background: rgba(12, 20, 37, 0.8);
  border-color: rgba(99, 102, 241, 0.4);
}

.connector-card-new__table-more {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
}

.modal-close {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  background: rgba(148, 163, 184, 0.05);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--heading);
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

.modal-body {
  padding: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.connector-card {
  text-align: left;
  background: rgba(12, 20, 37, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.connector-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.5);
}

.connector-card--active {
  border-color: rgba(129, 140, 248, 0.8);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.25);
}

.connector-card__title {
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 6px;
}

.connector-form {
  background: rgba(12, 20, 37, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schema-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  margin-right: -8px;
}

.schema-table::-webkit-scrollbar {
  width: 8px;
}

.schema-table::-webkit-scrollbar-track {
  background: rgba(12, 20, 37, 0.4);
  border-radius: 4px;
}

.schema-table::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

.schema-table::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

.schema-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 2fr 1.2fr 1fr;
  gap: 10px;
  align-items: center;
}

.schema-row--head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.7);
}

.schema-cell {
  font-size: 13px;
  color: var(--heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schema-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.schema-joins {
  margin: 12px 0;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(79, 70, 229, 0.2);
  background: rgba(79, 70, 229, 0.05);
  font-size: 13px;
  color: var(--heading);
}

.schema-joins__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.schema-joins ul {
  margin: 0;
  padding-left: 18px;
}

.schema-joins li {
  margin: 4px 0;
}


.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.chat-card--welcome {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px 18px;
}

.chat-card__avatar {
  flex-shrink: 0;
}

.chat-card__avatar-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(139, 92, 246, 0.2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.chat-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-card__text--welcome {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.chat-card__reactions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.chat-card__reaction-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.chat-card__reaction-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
}

.chat-card--right {
  max-width: 60ch;
  width: -moz-fit-content;
  width: fit-content;
  margin-left: auto;
  align-items: flex-end;
  text-align: right;
}

.chat-card__title {
  font-weight: 600;
  color: var(--heading);
  font-size: 15px;
}

.chat-card__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--heading);
}

.chat-card__text--md {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-card__text--md h1,
.chat-card__text--md h2,
.chat-card__text--md h3,
.chat-card__text--md h4 {
  margin: 8px 0 6px;
  font-weight: 600;
}

.chat-card__text--md p {
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.chat-card__text--md ul {
  margin: 6px 0 8px 18px;
  padding: 0;
}

.chat-card__text--md li {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.chat-card__text--md code {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
}

.chat-card__text--md pre {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0;
}

.chat-card__text--md pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
}

.chat-card__text--md .echarts-embed {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.9);
  margin: 10px 0;
  max-width: 100%;
  overflow: hidden;
}

.chat-card__text--md .echarts-embed__chart {
  width: 100%;
  height: 280px;
}

.chat-card__text--md .echarts-embed pre {
  margin: 0;
}

.chat-card__text--md a,
.chat-card__text--md .markdown-link {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(99, 102, 241, 0.4);
  transition: color 0.2s, text-decoration-color 0.2s;
}

.chat-card__text--md a:hover,
.chat-card__text--md .markdown-link:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

/* Markdown table styling */
.chat-card__text--md .md-table,
.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
  overflow-x: auto;
  display: block;
}

.md-table thead {
  position: sticky;
  top: 0;
}

.md-table th {
  background: rgba(15, 23, 42, 0.06);
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  white-space: nowrap;
}

.md-table td {
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  white-space: nowrap;
}

.md-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

.md-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

/* Simple Query Response with Tabs */
.simple-query-response {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.simple-query-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 0;
}

.simple-query-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  top: 1px;
}

.simple-query-tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.05);
}

.simple-query-tab--active {
  color: var(--heading);
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.simple-query-content {
  padding: 16px 0;
  min-height: 40px;
}

.simple-query-table {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.9);
  overflow: auto;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.simple-query-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.simple-query-table th,
.simple-query-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

.simple-query-table th {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.95), rgba(226, 232, 240, 0.7));
  color: var(--heading);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.simple-query-table tr:nth-child(even) td {
  background: rgba(241, 245, 249, 0.6);
}

.simple-query-table tr:last-child td {
  border-bottom: none;
}

.simple-query-table__key {
  color: var(--heading);
  font-weight: 600;
  width: 40%;
}

.simple-query-table__value {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.sql-code-block {
  margin: 0;
  padding: 16px;
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre;
  -moz-tab-size: 2;
    -o-tab-size: 2;
       tab-size: 2;
}

.query-meta {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.query-meta strong {
  color: var(--heading);
  font-weight: 600;
}

.sql-code-block code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  font-family: inherit;
}

/* Visualization Response with Tabs */
.visualization-response {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.visualization-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 0;
  flex-wrap: wrap;
}

.visualization-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  top: 1px;
  white-space: nowrap;
}

.visualization-tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.05);
}

.visualization-tab--active {
  color: var(--heading);
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.visualization-content {
  padding: 16px 0;
  min-height: 40px;
}

.visualization-charts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.visualization-response--charts-only .visualization-content {
  padding-top: 12px;
}

.panel-sqls-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-sql-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-sql-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-sql-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.panel-sql-index {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 8px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 4px;
}

/* Multiple Quick Charts with Tabs */
.quick-charts-multi {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.quick-charts-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 0;
  flex-wrap: wrap;
  overflow-x: auto;
}

.quick-charts-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  top: 1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-charts-tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.05);
}

.quick-charts-tab--active {
  color: var(--heading);
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.quick-charts-tab__check {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
}

.quick-charts-content {
  position: relative;
  min-height: 320px;
}

.quick-chart-panel {
  display: none;
  padding: 16px 0;
}

.quick-chart-panel--active {
  display: block;
  overflow: visible;
}

.quick-chart__description {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.05);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text);
}

.quick-chart__meta {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.04);
  border-left: 3px solid rgba(99, 102, 241, 0.4);
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.quick-chart__meta strong {
  color: var(--heading);
  font-weight: 600;
}

.quick-chart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
}

.quick-chart__header--stack {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-chart__header-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
}

.quick-chart__select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.quick-chart__select-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.quick-chart__edit-area {
  margin: 12px 0;
}

.quick-chart__sql-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--heading);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
}

.quick-chart__sql-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.quick-chart__edit-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.quick-chart__apply-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.quick-chart__apply-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.quick-chart__apply-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quick-chart__cancel-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.quick-chart__cancel-btn:hover {
  background: rgba(148, 163, 184, 0.08);
}

/* Export selected charts bar */
.quick-chart-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin: 0 16px 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  flex-wrap: nowrap;
  min-height: 58px;
}

.quick-chart-export-bar__close {
  margin-left: 8px;
  margin-right: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.quick-chart-export-bar__close:hover {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-dark);
}

.quick-chart-export-bar--hidden {
  display: none;
}

.quick-chart-export-bar--visible {
  display: flex;
  visibility: visible;
}

.quick-chart-export-bar__label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--heading);
}

.quick-chart-export-bar__btn {
  margin-left: auto;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.quick-chart-export-bar__btn:hover:not(:disabled) {
  opacity: 0.9;
}

.quick-chart-export-bar__btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Dashboard Link Banner */
.dashboard-link-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
}

.dashboard-link-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--heading);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dashboard-link-button:hover {
  color: var(--primary);
}

.dashboard-link-arrow {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.dashboard-link-button:hover .dashboard-link-arrow {
  transform: translateX(4px);
}

/* Live dashboard result (Grafana link + SQL used + summary) */
.live-dashboard-result {
  margin-bottom: 16px;
}
.live-dashboard-result .dashboard-link-banner {
  margin-bottom: 12px;
}
.live-dashboard-result__summary {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.live-dashboard-result__sql {
  margin-top: 12px;
}
.live-dashboard-result__sql strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--heading);
}
.live-dashboard-result__sql-block {
  margin-bottom: 12px;
}
.live-dashboard-result__sql-block:last-child {
  margin-bottom: 0;
}
.live-dashboard-result__sql-title {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.live-dashboard-result__sql-block .sql-code-block {
  margin: 0;
}

/* Dashboard Workflows Page */
.dashboard-workflows-page {
  padding: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: #f8f9fb;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-workflows-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f8f9fb;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.dashboard-workflows-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.dashboard-workflows-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.dashboard-workflows-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.dashboard-workflows-header__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-workflows-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dashboard-workflows-refreshing {
  color: var(--muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-workflows-cache-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
}

.dashboard-workflows-cache-banner .ghost-button {
  flex-shrink: 0;
}

.dashboard-workflows-loading,
.dashboard-workflows-error,
.dashboard-workflows-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.dashboard-workflows-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 100%;
  padding: 16px 24px 32px;
}

.dashboard-workflow-row {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1.4fr 2fr 1fr;
  align-items: center;
  gap: 12px;
}

.dashboard-workflow-row:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.dashboard-workflow-row:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.6);
  outline-offset: 2px;
}

.dashboard-workflow-row--clickable {
  cursor: pointer;
}

.dashboard-workflow-row__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-workflow-row__type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.dashboard-workflow-row__type--live {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #1d4ed8;
}

.dashboard-workflow-row__type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-workflow-row__title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-workflow-row__middle {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-workflow-row__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-workflow-row__status {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-workflow-row__status--ready {
  color: #166534;
  background: rgba(34, 197, 94, 0.15);
}

.dashboard-workflow-row__status--error {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}

.dashboard-workflow-row__status--processing {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.16);
  position: relative;
  padding-left: 18px;
}

.dashboard-workflow-row__status--processing::before {
  content: '';
  position: absolute;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: statusPulse 1.4s ease-in-out infinite;
}

.dashboard-workflow-row__time {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.dashboard-workflow-row__error {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid var(--error);
  border-radius: 8px;
  font-size: 12px;
  color: var(--error);
}

/* Dashboard Detail Page */
.dashboard-detail-page {
  padding: 0;
  margin: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-detail-page--state {
  flex: 1;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: var(--space-6);
}

.dashboard-detail-page--padded {
  padding: var(--space-6);
  min-height: 100%;
}

.dashboard-detail-header {
  padding: 20px 24px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(12px);
}

.dashboard-detail-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 8px 0;
}

.dashboard-detail-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.dashboard-detail-loading,
.dashboard-detail-error {
  padding: 48px;
  text-align: center;
  color: var(--muted);
}

.dashboard-detail-loading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}

.dashboard-detail-meta {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--muted);
}

.dashboard-detail-actions {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.dashboard-detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0 24px;
  flex-shrink: 0;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(12px);
}

.dashboard-detail-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  top: 1px;
}

.dashboard-detail-tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.05);
}

.dashboard-detail-tab--active {
  color: var(--heading);
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.dashboard-detail-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-6);
  min-height: 0;
}

.dashboard-detail-content--report {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.dashboard-detail-content--fullscreen {
  padding: 0;
  overflow: hidden;
  height: calc(100vh - 120px); /* Subtract header + tabs height */
}

/* DAG Visualization */
.dashboard-dag-visualization {
  margin-top: 32px;
}

.dashboard-dag-visualization h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 24px 0;
}

.dag-stages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dag-stage {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.dag-stage--completed {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
}

.dag-stage--active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.dag-stage__indicator {
  font-size: 24px;
  font-weight: bold;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dag-stage__content {
  flex: 1;
}

.dag-stage__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}

.dag-stage__time {
  font-size: 12px;
  color: var(--muted);
}

.dag-stage__connector {
  width: 2px;
  height: 24px;
  background: rgba(148, 163, 184, 0.2);
  margin-left: 16px;
  transition: background 0.2s ease;
}

.dag-stage__connector--active {
  background: var(--primary);
}

.dashboard-detail-error-message {
  margin-top: 24px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--error);
  border-radius: 4px;
  color: var(--error);
}

.dashboard-detail-empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
}

.dashboard-detail-empty p {
  margin: 0;
  font-size: 14px;
}

.chat-card__meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  line-height: 1.1;
}

.chat-card--right .chat-card__meta {
  justify-content: flex-end;
}

.chat-card__timestamp {
  margin-left: auto;
  white-space: nowrap;
}

.chat-card__timestamp-below {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.1;
  color: var(--muted);
  text-align: right;
}

.chat-card__loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.chat-card .iframe-shell {
  height: min(80vh, 900px);
  min-height: 520px;
}

.mock-chart {
  border-radius: var(--radius-md);
  border: 1px dashed rgba(79, 70, 229, 0.2);
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.mock-chart__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.mock-chart__body {
  height: 180px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.mock-chart__retry {
  margin-top: 12px;
}

.quick-chart {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 0;
  overflow: visible;
  width: 100%;
}

.quick-chart__title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--heading);
}

.quick-chart__viz {
  width: 100%;
  height: min(56vh, 460px) !important;
  min-height: 360px;
}

.quick-chart__sql summary {
  cursor: pointer;
  margin-top: 8px;
  color: var(--text);
}

.quick-chart__sql-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
}

.quick-chart__sql-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-chart__sql-caret {
  color: var(--muted);
  transition: transform 0.2s ease;
}

details[open] .quick-chart__sql-caret {
  transform: rotate(180deg);
}

.quick-chart__sql-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quick-chart__sql-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.quick-chart__sql-btn--icon {
  width: 28px;
  height: 28px;
  padding: 0;
}

.quick-chart__sql-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.quick-chart__sql pre {
  margin-top: 8px;
  white-space: pre-wrap;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--heading);
  padding: 10px;
  border-radius: 10px;
}

.pipeline-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.pipeline-log__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(12, 20, 37, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 13px;
}

.pipeline-log__badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-log__badge--tables {
  background: rgba(99, 102, 241, 0.2);
  color: rgba(129, 140, 248, 0.9);
}

.pipeline-log__badge--views {
  background: rgba(52, 211, 153, 0.2);
  color: rgba(16, 185, 129, 0.9);
}

.section-split-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.input-control,
.textarea-control {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--heading);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
  transition: border-color 0.24s ease, box-shadow 0.24s ease;
  resize: vertical;
  min-height: 120px;
}

.input-control {
  min-height: auto;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 44px;
}

.input-control--text {
  background-image: none;
  padding-right: 16px;
}

.input-control:focus,
.textarea-control:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.22);
}
.textarea-control--condensed {
  min-height: 80px;
}

.file-upload {
  border: 1.5px dashed rgba(129, 140, 248, 0.45);
  border-radius: var(--radius-md);
  padding: 18px;
  background: rgba(12, 20, 37, 0.68);
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
  cursor: pointer;
}

.file-upload:hover {
  border-color: rgba(244, 114, 182, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(244, 114, 182, 0.23);
}

.file-upload.dragover {
  border-color: rgba(99, 102, 241, 0.82);
  box-shadow: 0 20px 42px rgba(99, 102, 241, 0.3);
}

.file-upload__body {
  display: flex;
  align-items: center;
  gap: 18px;
}

.file-icon {
  font-size: 28px;
}

.file-upload__title {
  margin: 0;
  font-weight: 600;
  color: var(--heading);
}

.file-upload__hint {
  margin: 4px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.7);
}

.file-input {
  display: none;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(52, 211, 153, 0.12);
  color: rgba(16, 185, 129, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.inline-error {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.32);
  color: #fecaca;
  font-size: 14px;
}

.inline-warning {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.12);
  color: rgba(245, 158, 11, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.24);
  font-size: 13px;
}

.inline-status {
  padding: 12px;
  font-size: 14px;
  color: var(--muted);
}

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

.progress-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  color: rgba(129, 140, 248, 0.9);
  font-size: 13px;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

.dashboard-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(15, 23, 42, 0.72);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  padding: clamp(20px, 3vw, 26px);
  flex: 1;
  min-height: 0;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
}

.iframe-shell {
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  border: none;
  background: var(--surface-bg);
  min-height: 640px;
}

.dashboard-detail-content--fullscreen .iframe-shell {
  height: 100%;
  border-radius: 0;
}

.dashboard-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.collection {
  background: rgba(15, 23, 42, 0.72);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 28px);
  color: var(--heading);
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.collection-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(15, 23, 42, 0.2);
  background: rgba(255, 255, 255, 0.4);
  display: grid;
  gap: 14px;
}

.empty-state h3 {
  margin: 0;
  font-size: 22px;
  color: var(--heading);
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.surface-card {
  padding: 24px 20px;
  border-radius: var(--radius-md);
  background: rgba(12, 20, 37, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.surface-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.4);
}

.surface-card h3 {
  margin: 8px 0 4px;
  font-size: 18px;
  color: var(--heading);
}

.surface-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.surface-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(244, 114, 182, 0.16);
  color: rgba(244, 114, 182, 0.8);
}

.surface-actions {
  display: flex;
  gap: 10px;
}

.hero {
  display: grid;
  gap: 26px;
  padding: clamp(24px, 4vw, 36px);
  background: rgba(15, 23, 42, 0.72);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  color: var(--heading);
}

.hero p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 16px;
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 20px 18px;
  border-radius: var(--radius-md);
  background: rgba(12, 20, 37, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: var(--shadow-sm);
}

.feature-card h3 {
  margin: 0;
  font-size: 16px;
  color: var(--heading);
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: calc(var(--radius-sm) + 1px);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.primary-button:disabled {
  opacity: 0.4;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.primary-button--full {
  width: 100%;
}

.ghost-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: calc(var(--radius-sm) + 1px);
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.4);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ghost-button:hover {
  border-color: rgba(79, 70, 229, 0.3);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.ghost-button--full {
  width: 100%;
  justify-content: center;
}

.ghost-button--danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: rgba(254, 202, 202, 0.9);
}

.ghost-button--danger:hover {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
  box-shadow: 0 12px 28px rgba(248, 113, 113, 0.2);
}

.secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: calc(var(--radius-sm) + 1px);
  border: 1.5px solid rgba(79, 70, 229, 0.3);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(79, 70, 229, 0.5);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.secondary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: rgba(148, 163, 184, 0.2);
}

.secondary-button--full {
  width: 100%;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

.spinner--inline {
  width: 14px;
  height: 14px;
  border-top-color: var(--mint);
}

/* Login Page - Split Layout */
.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}

.login-panel {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
  min-height: 100vh;
}

.login-panel__content {
  width: 100%;
  max-width: 400px;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--heading);
  margin: 0;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 32px 0;
}

.login-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.login-method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-method-btn:hover {
  border-color: rgba(79, 70, 229, 0.3);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

.login-method-btn svg {
  width: 18px;
  height: 18px;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}

.login-feature-item svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Login Visual Panel */
.login-visual {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.login-visual::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.login-visual::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.login-visual__content {
  width: 100%;
  max-width: 500px;
  position: relative;
  z-index: 2;
}

/* Cubesite Showcase */
.cubesite-showcase {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.showcase-header {
  text-align: center;
}

.showcase-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.showcase-header p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Workflow Diagram */
.workflow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}

.step-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

.step-icon.cubesite {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.15));
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.workflow-arrow {
  display: flex;
  align-items: center;
  height: 40px;
}

/* Use Cases */
.use-cases {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.use-case {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(79, 70, 229, 0.1);
  transition: all 0.2s ease;
}

.use-case:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(79, 70, 229, 0.2);
}

.use-case-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  flex-shrink: 0;
}

.use-case-title {
  margin: 0 0 2px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
}

.use-case-desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Insights Preview */
.insights-preview {
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.badge-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.insights-preview h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
}

.insight-explanation {
  margin: 0 0 10px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.insight-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.metric-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
}

.metric-normal {
  color: #10b981;
}

.metric-success {
  color: #10b981;
}

.workflow-chart {
  width: 100%;
  max-width: 100%;
  padding: 16px 0;
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    height: auto;
    min-height: 100vh;
    padding: 32px 24px;
  }

  .login-panel__content {
    max-width: 380px;
  }
}

@media (max-width: 640px) {
  .login-page {
    grid-template-columns: 1fr;
    height: auto;
  }

  .login-panel {
    padding: 24px 16px;
    min-height: auto;
  }

  .login-panel__content {
    max-width: 100%;
  }

  .login-header {
    margin-bottom: 24px;
  }

  .login-title {
    font-size: 24px;
  }

  .login-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .login-methods {
    margin-bottom: 24px;
  }

  .login-method-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .login-features {
    gap: 12px;
  }

  .login-feature-item {
    font-size: 13px;
    gap: 10px;
  }

  .workflow-diagram {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .workflow-arrow {
    transform: rotate(90deg);
    height: 20px;
  }

  .showcase-header h2 {
    font-size: 20px;
  }

  .insights-preview {
    padding: 12px;
  }

  .insights-preview h4 {
    font-size: 14px;
  }

  .insight-explanation {
    font-size: 12px;
  }

  .insight-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    position: static;
    max-height: none;
  }

  .workspace {
    flex-direction: column;
  }

  .sidebar {
    flex: 1 1 auto;
  }

  .sidebar-card {
    box-shadow: var(--shadow-md);
  }

  .workspace--split {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    position: static;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .workspace {
    gap: 24px;
  }

  .dashboard-stage {
    min-height: 65vh;
  }

  .login-panel {
    padding: 24px;
  }

  .login-panel__content {
    max-width: 100%;
  }

  .login-header {
    margin-bottom: 24px;
  }

  .login-subtitle {
    margin-bottom: 24px;
  }

  .login-methods {
    margin-bottom: 24px;
  }
}

/* Context + data sources layout refinements */
.connector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1100px) {
  .connector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .connector-grid {
    grid-template-columns: 1fr;
  }
}

.connector-card-new {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-sm);
}

.connector-card-new__header {
  justify-content: space-between;
}

.knowledge-card__status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.knowledge-card__status--connected {
  background: #dcfce7;
  color: #166534;
}

.knowledge-card__status--available {
  background: #e2e8f0;
  color: #475569;
}

.knowledge-card__action {
  position: relative;
}

.knowledge-card__action[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.knowledge-card__action[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.knowledge-card__action[data-tooltip]:hover::after,
.knowledge-card__action[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.integration-list {
  display: grid;
  gap: 12px;
}

.integration-list--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .integration-list--grid {
    grid-template-columns: 1fr;
  }
}

.integration-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.integration-row__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  flex-shrink: 0;
}

.integration-row__icon--csv {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.integration-row__icon--mysql,
.integration-row__icon--postgres {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.integration-row__meta h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.integration-row__meta p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.integration-row__action {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: var(--heading);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.integration-row__action:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: #1d4ed8;
}

.connected-table {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow-x: visible;
}

.connected-table__row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 0.8fr 48px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 13px;
  color: var(--text);
}

.connected-table__row:last-child {
  border-bottom: none;
}

.connected-table__row--head {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  position: sticky;
  top: 0;
  z-index: 2;
}

.connected-table__body {
  overflow: visible;
  padding-bottom: 12px;
}

.connected-table--scroll {
  max-height: 320px;
  overflow-y: auto;
}

.connected-table__cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  background: #e2e8f0;
  color: #475569;
  width: -moz-fit-content;
  width: fit-content;
  justify-self: start;
}

.status-pill--active {
  background: #dcfce7;
  color: #166534;
}

.status-pill--synced {
  background: #dcfce7;
  color: #166534;
}

.status-pill--linked {
  background: #e2e8f0;
  color: #475569;
}

.status-pill--syncing {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill--error {
  background: #fee2e2;
  color: #b91c1c;
}

.status-pill__pulse {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: statusPulse 1.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.5;
  }
}

.empty-state--ghost {
  border: 1px dashed rgba(15, 23, 42, 0.2);
  background: #ffffff;
  padding: 28px;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
}

.empty-state--ghost .primary-button {
  margin-top: 12px;
}

.chat-card--right {
  background: #e8edff;
  border-color: #c5d2ff;
  color: #1f2a44;
}

.chat-card--right .chat-card__text,
.chat-card--right .chat-card__title {
  color: #1f2a44;
}

.chat-card--right .chat-card__meta {
  color: rgba(31, 42, 68, 0.7);
}
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
/* ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com */
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}
::before,
::after {
  --tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
  color: inherit;
  text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
  font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
  font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
  text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
  outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
  box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
  vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
  -webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
  display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}
fieldset {
  margin: 0;
  padding: 0;
}
legend {
  padding: 0;
}
ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
  resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
  cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
  max-width: 100%;
  height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
