﻿/* ============================================
   HOROS — IA · Intelligence Center styles
   ============================================ */

.ia-content {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

.ia-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
  background: var(--bg);
}

/* ============ AI Orb (signature element) ============ */
.ia-orb {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #1F93FF);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.4), 0 4px 14px -2px rgba(168, 85, 247, 0.45);
}
.ia-orb-glow {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.ia-orb-lg {
  position: relative;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #1F93FF 100%);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(168, 85, 247, 0.4),
    0 6px 20px -4px rgba(168, 85, 247, 0.55);
}
.ia-orb-aura {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.32), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.ia-orb-aura.two { inset: -8px; opacity: 0.5; }
.ia-orb-lg.animated .ia-orb-aura      { animation: orbPulse 3.2s ease-in-out infinite; }
.ia-orb-lg.animated .ia-orb-aura.two  { animation: orbPulse 3.2s ease-in-out infinite 1s; }
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* ============ LEFT ============ */
.ia-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--card-grad);
  overflow: hidden;
}
[data-theme="dark"] .ia-left { background: linear-gradient(180deg, #1b1d22 0%, #141519 100%); }

.ia-left-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
[data-theme="dark"] .ia-left-head { background: rgba(168,85,247,0.025); }

.ia-left-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ia-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ia-brand h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #a855f7, #1F93FF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ia-search { flex: 1; padding: 7px 11px; }
.ia-search input { font-size: 12.5px; }

.ia-left-body {
  overflow-y: auto;
  flex: 1;
  padding: 6px 10px 14px;
}

.ia-hist-group { margin-bottom: 8px; }
.ia-hist-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-4);
  font-weight: 600;
  padding: 10px 6px 6px;
}
.ia-hist-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}
.ia-hist-item:hover { background: var(--icon-btn-hover-bg); }
.ia-hist-item.active {
  background: var(--accent-tint, rgba(168, 85, 247, 0.12));
  color: #c084fc;
}
[data-theme="light"] .ia-hist-item.active { background: #faf5ff; color: #7c3aed; }
.ia-hist-item.active::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #a855f7, #1F93FF);
  border-radius: 2px;
  margin-left: -3px;
  margin-right: 3px;
}
.ia-hist-title {
  flex: 1;
  font-size: 12.5px;
  font-weight: 450;
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ia-hist-item.active .ia-hist-title { font-weight: 550; color: var(--fg); }
.ia-hist-time {
  font-size: 10.5px;
  color: var(--fg-4);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.ia-hist-fav {
  color: var(--warm);
  flex-shrink: 0;
}

.ia-shortcuts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-4);
  font-weight: 600;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.ia-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ia-shortcut {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 11px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--ai-insight-border);
  border-radius: 8px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ia-shortcut::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80px 60px at 100% 0%, var(--sc-glow), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 220ms ease;
}
.ia-shortcut:hover {
  background: var(--card);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.ia-shortcut:hover::before { opacity: 1; }
.ia-shortcut-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--sc-color);
  background: color-mix(in srgb, var(--sc-color) 14%, transparent);
}
.ia-shortcut-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ia-shortcut-label {
  font-size: 11.5px;
  font-weight: 550;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.ia-shortcut-desc {
  font-size: 10px;
  color: var(--fg-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ============ CENTER ============ */
.ia-center {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
[data-theme="dark"] .ia-center::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 50% -10%, rgba(168, 85, 247, 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.ia-center > * { position: relative; z-index: 1; }

.ia-chat-head {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ia-chat-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ia-chat-head-meta { display: flex; flex-direction: column; gap: 2px; }
.ia-chat-head-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ia-chat-head-name h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.ia-chat-head-desc {
  font-size: 11.5px;
  color: var(--fg-4);
}
.ia-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Chat body */
.ia-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ia-turn {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ia-turn-body { flex: 1; min-width: 0; }
.ia-turn-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ia-turn-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.from-ai .ia-turn-name {
  background: linear-gradient(90deg, #a855f7, #1F93FF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ia-turn-time {
  font-size: 10.5px;
  color: var(--fg-4);
  font-family: var(--mono);
}
.ia-turn-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.10);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.22);
  letter-spacing: 0.02em;
}
[data-theme="light"] .ia-turn-badge { background: #faf5ff; color: #7c3aed; border-color: #e9d5ff; }

.ia-turn-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* User turn — simple */
.from-user .ia-turn-content { font-size: 14px; color: var(--fg); }
.from-user .ia-text { font-size: 14px; line-height: 1.55; color: var(--fg); margin: 0; }

/* AI text */
.ia-text-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ia-text-gap { height: 6px; }
.ia-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-2);
}
.ia-text b { color: var(--fg); font-weight: 600; }
.ia-text-li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-2);
}
.ia-text-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}
/* Bullet items inside user bubble */
.ia-msg__bubble .ia-text-li  { color: rgba(255,255,255,0.92); }
.ia-msg__bubble .ia-text-dot { background: rgba(255,255,255,0.7); }

/* Opportunity cards */
.ia-opp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ia-opp {
  position: relative;
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
  isolation: isolate;
}
[data-theme="dark"] .ia-opp { background: linear-gradient(180deg, #131826, #0f1422); }
.ia-opp::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 90px at 100% 0%, var(--opp-bg), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.ia-opp:hover {
  transform: translateY(-1px);
  border-color: var(--opp-border);
  box-shadow: var(--shadow-md);
}
.ia-opp-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ia-opp-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--opp-color);
  background: var(--opp-bg);
}
.ia-opp-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ia-opp-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ia-opp-headline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--opp-color);
  font-weight: 500;
}
.ia-opp-detail {
  font-size: 11.5px;
  color: var(--fg-4);
  padding-left: 1px;
  line-height: 1.4;
}
.ia-opp-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.ia-opp-actions .btn-soft {
  background: var(--opp-bg);
  border-color: var(--opp-border);
  color: var(--opp-color);
}

/* Priority table */
.ia-table-wrap {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
}
[data-theme="dark"] .ia-table-wrap { background: linear-gradient(180deg, #131826, #0f1422); }

.ia-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ia-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-4);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--ai-insight-bg);
}
.ia-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft, var(--line));
  vertical-align: middle;
}
.ia-table tbody tr:last-child td { border-bottom: none; }
.ia-table tbody tr:hover { background: var(--ai-insight-bg); }
.ia-rank {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-tint, rgba(31,147,255,0.16));
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 600;
}
[data-theme="light"] .ia-rank { background: #E8F4FF; color: var(--accent-hover); }
.ia-table tbody tr:first-child .ia-rank {
  background: linear-gradient(135deg, #1F93FF, #1060B3);
  color: #fff;
}
.ia-reason { color: var(--fg-3); font-size: 11.5px; }

/* Callout */
.ia-callout {
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  border-radius: 8px;
  padding: 12px 14px;
}
.ia-callout-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ia-callout-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--c-color) 18%, transparent);
  color: var(--c-color);
  display: grid;
  place-items: center;
}
.ia-callout-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-color);
}
.ia-callout-body {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
}
.ia-callout-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--c-color), color-mix(in srgb, var(--c-color) 80%, black));
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 4px 12px -4px color-mix(in srgb, var(--c-color) 50%, transparent);
  transition: transform 140ms ease, filter 140ms ease;
}
.ia-callout-action:hover { transform: translateY(-0.5px); filter: brightness(1.05); }

/* Mini chart */
.ia-chart {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 14px 16px 12px;
}
[data-theme="dark"] .ia-chart { background: linear-gradient(180deg, #131826, #0f1422); }
.ia-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ia-chart-title {
  font-size: 12px;
  font-weight: 550;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.ia-chart-peak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--success);
  background: rgba(52,211,153,0.12);
  padding: 2px 7px;
  border-radius: 5px;
}
.ia-chart-body {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 110px;
  padding-bottom: 18px;
  position: relative;
}
.ia-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  position: relative;
  height: 100%;
}
.ia-bar {
  width: 100%;
  background: linear-gradient(180deg, rgba(31,147,255,0.45), rgba(31,147,255,0.18));
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: filter 140ms ease;
}
.ia-bar-col:hover .ia-bar { filter: brightness(1.15); }
.ia-bar.peak {
  background: linear-gradient(180deg, #34d399, #059669);
  box-shadow: 0 0 0 1px rgba(52,211,153,0.45), 0 0 18px -4px rgba(52,211,153,0.45);
}
.ia-bar-value {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}
.ia-bar-label {
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9.5px;
  color: var(--fg-4);
  font-family: var(--mono);
}
.ia-chart-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--fg-3);
}
.ia-chart-note .ico { color: #c084fc; }

/* Input area */
.ia-input-wrap {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 12px 22px 14px;
}
[data-theme="dark"] .ia-input-wrap { background: linear-gradient(180deg, #1b1d22, #141519); }

.ia-quicks {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.ia-quicks::-webkit-scrollbar { display: none; }
.ia-quick {
  flex-shrink: 0;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-3);
  background: var(--ai-insight-bg);
  border: 1px solid var(--ai-insight-border);
  border-radius: 8px;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.ia-quick:hover {
  background: var(--accent-tint, rgba(168, 85, 247, 0.10));
  border-color: rgba(168, 85, 247, 0.32);
  color: #c084fc;
}
[data-theme="light"] .ia-quick:hover { background: #faf5ff; color: #7c3aed; border-color: #e9d5ff; }

.ia-input {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 5px 4px;
  background: var(--search-bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.ia-input:focus-within {
  border-color: rgba(168, 85, 247, 0.35);
  background: var(--search-bg-focus);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.08);
}
.ia-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 6px;
  font-size: 13.5px;
  color: var(--fg);
  min-width: 0;
}
.ia-input input::placeholder { color: var(--placeholder); }

/* Input action buttons */
.ia-inp-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  flex-shrink: 0;
  transition: color 120ms ease, background 120ms ease;
}
.ia-inp-plus:hover:not(:disabled) { color: var(--fg); background: var(--icon-btn-hover-bg); }
.ia-inp-plus:disabled { opacity: 0.4; cursor: not-allowed; }

.ia-inp-think {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
  background: var(--ai-insight-bg);
  border: 1px solid var(--line);
  flex-shrink: 0;
  white-space: nowrap;
  cursor: not-allowed;
  opacity: 0.65;
}

.ia-inp-mic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  flex-shrink: 0;
  transition: color 120ms ease;
}
.ia-inp-mic:hover:not(:disabled) { color: var(--fg); }
.ia-inp-mic:disabled { opacity: 0.4; cursor: not-allowed; }

.ia-inp-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.32;
  transition: opacity 160ms var(--ease-ui, cubic-bezier(0.4,0,0.2,1)), transform 180ms var(--ease-spring, cubic-bezier(0.16,1,0.3,1));
  cursor: not-allowed;
}
.ia-inp-send--on {
  opacity: 1;
  cursor: pointer;
}
.ia-inp-send--on:hover { transform: scale(1.09); }
.ia-inp-send--on:active { transform: scale(0.91); transition-duration: 80ms; }
.ia-input-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--fg-4);
}
.ia-input-foot .ico { color: #c084fc; }

/* ============ RIGHT ============ */
.ia-right {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--card-grad);
  overflow-y: auto;
  padding: 14px 14px 16px;
  gap: 14px;
}
[data-theme="dark"] .ia-right { background: linear-gradient(180deg, #1b1d22 0%, #141519 100%); }

.ia-right-section {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
[data-theme="dark"] .ia-right-section { background: rgba(255,255,255,0.02); }

.ia-right-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--ai-insight-bg);
}
.ia-right-head h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.ia-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--success);
  background: rgba(52,211,153,0.14);
  padding: 2px 7px;
  border-radius: 4px;
}
.ia-live .pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: blink 1.6s ease-in-out infinite;
}
.ia-right-date {
  font-size: 10.5px;
  color: var(--fg-4);
  font-family: var(--mono);
}

.ia-insights-stack {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ia-insight-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--ai-insight-border);
  border-radius: 8px;
  transition: background 140ms ease, border-color 140ms ease;
}
.ia-insight-card:hover {
  background: var(--ai-insight-bg-hover);
  border-color: var(--ai-insight-border-hover);
}
.ia-insight-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ia-insight-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ia-insight-title {
  font-size: 11.5px;
  color: var(--fg-3);
  font-weight: 450;
  line-height: 1.3;
}
.ia-insight-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.ia-insight-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ia-insight-sub {
  font-size: 10.5px;
  color: var(--fg-4);
}

.ia-actions-stack {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ia-action-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  transition: background 140ms ease;
}
.ia-action-row:hover { background: var(--ai-insight-bg); }
.ia-action-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--accent-soft);
  background: var(--accent-tint, rgba(31,147,255,0.14));
  flex-shrink: 0;
}
[data-theme="light"] .ia-action-icon { color: var(--accent); background: #E8F4FF; }
.ia-action-label {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
}
.ia-action-meta {
  font-size: 10.5px;
  color: var(--fg-4);
  font-family: var(--mono);
}
.ia-action-row .ico { color: var(--fg-4); transition: transform 140ms ease, color 140ms ease; }
.ia-action-row:hover .ico { transform: translateX(2px); color: var(--accent); }

.ia-day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
}
.ia-day-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--ai-insight-border);
  border-radius: 8px;
  transition: transform 140ms ease, border-color 140ms ease;
}
.ia-day-card:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.ia-day-card.tone-brand   { background: linear-gradient(135deg, rgba(31,147,255,0.10), rgba(168,85,247,0.06)); border-color: rgba(31,147,255,0.22); }
.ia-day-card.tone-ok      { background: linear-gradient(135deg, rgba(52,211,153,0.10), rgba(20,184,166,0.06)); border-color: rgba(52,211,153,0.22); }
[data-theme="light"] .ia-day-card.tone-brand { background: linear-gradient(135deg, #E8F4FF, #faf5ff); border-color: #B3DEFF; }
[data-theme="light"] .ia-day-card.tone-ok    { background: linear-gradient(135deg, #ecfdf5, #f0fdfa); border-color: #a7f3d0; }

.ia-day-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tone-brand .ia-day-value { color: var(--accent-soft); }
[data-theme="light"] .tone-brand .ia-day-value { color: var(--accent-hover); }
.tone-ok .ia-day-value { color: #34d399; }
[data-theme="light"] .tone-ok .ia-day-value { color: var(--success); }
.ia-day-label {
  font-size: 11px;
  color: var(--fg-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ── Typing indicator ──────────────────────────────────────────── */
.ia-typing-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
}
.ia-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-3);
  animation: ia-bounce 1.2s ease-in-out infinite;
}
.ia-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ia-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ia-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── Horos logo in ChatHead ────────────────────────────────────── */
.ia-horos-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
}

/* ── Sidebar close bar (right) + close btn (left) ──────────────── */
.ia-right-close-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ia-close-btn { opacity: 0.55; }
.ia-close-btn:hover { opacity: 1; }

/* ── Simplified message bubbles ────────────────────────────────── */
.ia-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ia-msg--ai {
  align-self: flex-start;
  align-items: flex-start;
  width: 100%;
}
.ia-msg--user {
  align-self: flex-end;
  align-items: flex-end;
  max-width: 70%;
}
.ia-msg__ai {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-2);
  width: 100%;
}
.ia-msg__ai .ia-text { font-size: 14px; }
.ia-msg__bubble {
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px 8px 4px 8px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.ia-msg__bubble .ia-text { color: #fff; margin: 0; font-size: 14px; }
.ia-msg__time {
  font-size: 10px;
  color: var(--fg-4);
  font-family: var(--mono);
  padding: 0 2px;
}

/* ── History empty state (left sidebar) ───────────────────────── */
.ia-hist-empty {
  padding: 16px 14px 8px;
  text-align: center;
}
.ia-hist-empty p {
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.5;
  margin: 0;
}

/* ── Day summary additional tones ─────────────────────────────── */
.ia-day-card.tone-hot  { background: linear-gradient(135deg, rgba(255,90,78,0.10), rgba(245,181,68,0.06)); border-color: rgba(255,90,78,0.22); }
.ia-day-card.tone-warn { background: linear-gradient(135deg, rgba(245,181,68,0.10), rgba(245,181,68,0.06)); border-color: rgba(245,181,68,0.22); }
[data-theme="light"] .ia-day-card.tone-hot  { background: linear-gradient(135deg, #fff1f0, #fff7ed); border-color: #fca5a5; }
[data-theme="light"] .ia-day-card.tone-warn { background: linear-gradient(135deg, #fffbeb, #fef9c3); border-color: #fcd34d; }
.tone-hot  .ia-day-value { color: #ff5a4e; }
.tone-warn .ia-day-value { color: #f5b544; }

/* ── Chat empty state ──────────────────────────────────────────── */
.ia-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
  text-align: center;
}
.ia-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
  letter-spacing: -0.01em;
}
.ia-empty-sub {
  font-size: 13px;
  color: var(--fg-3);
  margin: -8px 0 0;
  max-width: 320px;
  line-height: 1.5;
}

/* ── Nebulosa de Hélix (empty state) ───────────────────────────── */
.ia-blob-wrap {
  position: relative;
  width: 144px;
  height: 144px;
  flex-shrink: 0;
}
.ia-blob-wrap > * {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
}

/* Halo externo difuso — roxo/azul profundo */
.ia-neb-bg {
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    transparent 34%,
    rgba(110, 50, 230, 0.05) 48%,
    rgba(180, 45, 210, 0.04) 62%,
    rgba(55, 25, 160, 0.03) 78%,
    transparent 92%
  );
  filter: blur(6px);
  animation: nebGlow 7s ease-in-out infinite;
}

/* Blob central morfante — cores da Nebulosa de Hélix */
.ia-neb-core {
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(240, 252, 255, 0.95) 0%,
    rgba(55, 205, 255, 0.85) 18%,
    rgba(28, 158, 255, 0.75) 36%,
    rgba(255, 100, 30, 0.38) 62%,
    rgba(130, 30, 200, 0.22) 80%,
    transparent 96%
  );
  filter: blur(2px);
  animation: blobMorph 6s ease-in-out infinite;
}


/* Estrela central */
.ia-neb-star {
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  background: #e6f4ff;
  box-shadow:
    0 0 5px 2px rgba(210, 238, 255, 0.95),
    0 0 14px 5px rgba(110, 190, 255, 0.65),
    0 0 30px 11px rgba(50, 132, 255, 0.32);
  animation: nebStarPulse 3.8s ease-in-out infinite;
}

@keyframes blobMorph {
  0%   { border-radius: 58% 42% 62% 38% / 52% 48% 68% 32%; transform: translate(-50%,-50%) scale(1.00) rotate(0deg);   }
  20%  { border-radius: 32% 68% 44% 56% / 74% 26% 60% 40%; transform: translate(-50%,-50%) scale(1.12) rotate(10deg);  }
  40%  { border-radius: 70% 30% 36% 64% / 36% 64% 40% 60%; transform: translate(-50%,-50%) scale(0.90) rotate(0deg);   }
  60%  { border-radius: 40% 60% 74% 26% / 62% 38% 28% 72%; transform: translate(-50%,-50%) scale(1.10) rotate(-10deg); }
  80%  { border-radius: 64% 36% 52% 48% / 44% 56% 64% 36%; transform: translate(-50%,-50%) scale(0.94) rotate(5deg);   }
  100% { border-radius: 58% 42% 62% 38% / 52% 48% 68% 32%; transform: translate(-50%,-50%) scale(1.00) rotate(0deg);  }
}

@keyframes nebGlow {
  0%,100% { opacity: 0.70; transform: translate(-50%,-50%) scale(0.98); }
  50%      { opacity: 1.00; transform: translate(-50%,-50%) scale(1.07); }
}
@keyframes nebStarPulse {
  0%,100% {
    box-shadow:
      0 0 5px 2px rgba(210,238,255,.95),
      0 0 14px 5px rgba(110,190,255,.65),
      0 0 30px 11px rgba(50,132,255,.32);
  }
  50% {
    box-shadow:
      0 0 9px 4px rgba(225,245,255,1),
      0 0 22px 8px rgba(130,205,255,.80),
      0 0 44px 16px rgba(60,148,255,.44);
  }
}

/* ── Mídia nas mensagens ────────────────────────────────────────── */
.ia-msg-img, .ia-msg-video {
  max-width: 280px;
  max-height: 220px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}
.ia-msg--user .ia-msg-img,
.ia-msg--user .ia-msg-video {
  margin-left: auto;
}
.ia-msg-audio {
  width: 100%;
  max-width: 280px;
}
.ia-msg-audio audio { width: 100%; border-radius: 8px; }
.ia-msg-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  max-width: 260px;
}
.ia-msg--ai .ia-msg-file { background: var(--ai-insight-bg); border: 1px solid var(--line); }
.ia-msg-file-icon { color: var(--accent); flex-shrink: 0; }
.ia-msg-file-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ia-msg-file-name { font-size: 12.5px; font-weight: 500; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-msg-file-ext  { font-size: 10px; opacity: 0.6; text-transform: uppercase; }

/* ── Preview de arquivo antes de enviar ─────────────────────────── */
.ia-pending-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  position: relative;
}
.ia-pending-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
}
.ia-pending-file {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--fg-2);
}
.ia-pending-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fg-4);
  color: var(--bg);
  display: grid;
  place-items: center;
  opacity: 0.7;
  transition: opacity 120ms ease;
}
.ia-pending-remove:hover { opacity: 1; }

/* ── Custom audio player (WhatsApp-style) ───────────────────────── */
.ia-audio-player {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  background: rgba(255,255,255,0.14);
  border-radius: 8px;
  max-width: 280px;
  width: 100%;
}
.ia-msg--ai .ia-audio-player {
  background: var(--ai-insight-bg);
  border: 1px solid var(--line);
}
.ia-audio-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 120ms ease, filter 120ms ease;
}
.ia-msg--ai .ia-audio-play { background: var(--accent); color: #fff; }
.ia-audio-play:hover { transform: scale(1.08); filter: brightness(1.06); }
.ia-audio-wave {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 26px;
}
.ia-audio-bar {
  flex: 1;
  min-width: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,0.32);
  transition: background 80ms;
}
.ia-msg--ai .ia-audio-bar { background: rgba(31,147,255,0.22); }
.ia-audio-bar.played { background: rgba(255,255,255,0.88); }
.ia-msg--ai .ia-audio-bar.played { background: var(--accent); }
.ia-audio-time {
  font-size: 11px;
  font-family: var(--mono);
  color: rgba(255,255,255,0.72);
  flex-shrink: 0;
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ia-msg--ai .ia-audio-time { color: var(--fg-4); }

/* ── Recording bar (pill — igual ao input normal) ───────────────── */
.ia-rec-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 6px 4px;
  background: var(--search-bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.ia-rec-bar:focus-within {
  border-color: rgba(168,85,247,0.35);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.08);
}
.ia-rec-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  flex-shrink: 0;
  transition: color 120ms ease;
}
.ia-rec-plus:hover { color: var(--fg); }
.ia-rec-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  padding: 0 2px;
}
.ia-rec-dots {
  flex: 1;
  height: 2px;
  background-image: radial-gradient(circle, var(--fg-3) 1.2px, transparent 1.2px);
  background-size: 9px 2px;
  background-repeat: repeat-x;
  background-position: 0 50%;
  opacity: 0.38;
}
.ia-rec-transcript {
  flex: 1;
  font-size: 13.5px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 8px 0;
}
.ia-rec-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  flex-shrink: 0;
}
.ia-rec-wbar {
  width: 2.5px;
  border-radius: 2px;
  background: var(--fg-3);
  animation: recWave 0.65s ease-in-out infinite alternate;
  min-height: 4px;
}
@keyframes recWave { from { height: 4px; } to { height: 22px; } }
.ia-rec-x {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  flex-shrink: 0;
  transition: color 120ms ease, background 120ms ease;
}
.ia-rec-x:hover { color: #ff5a4e; background: rgba(255,90,78,0.10); }
.ia-rec-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: filter 120ms ease, transform 120ms ease;
}
.ia-rec-check:hover:not(:disabled) { filter: brightness(0.85); transform: scale(1.05); }
.ia-rec-check:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Attach dropdown menu ───────────────────────────────────────── */
.ia-attach-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #fff;
  color: #111;
  border-radius: 8px;
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.07);
  padding: 4px;
  min-width: 162px;
  z-index: 200;
  animation: iaSlideUp 140ms cubic-bezier(0.22,1,0.36,1) both;
}
.ia-attach-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 7px;
  width: 100%;
  font-size: 13px;
  font-weight: 450;
  color: #111;
  text-align: left;
  transition: background 120ms ease;
}
.ia-attach-opt:hover { background: #f3f4f6; }
[data-theme="dark"] .ia-attach-menu {
  background: #1e2028;
  color: var(--fg);
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.07);
}
[data-theme="dark"] .ia-attach-opt { color: var(--fg); }
[data-theme="dark"] .ia-attach-opt:hover { background: rgba(255,255,255,0.06); }
.ia-attach-opt-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ── ChatGPT-style left sidebar ─────────────────────────────────── */
.ia-left-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px;
  flex-shrink: 0;
}
.ia-left-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.ia-left-topbar-icons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ia-left-search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 10px 8px;
  padding: 7px 10px;
  background: var(--search-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg-4);
  flex-shrink: 0;
}
.ia-left-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--fg);
}
.ia-left-search input::placeholder { color: var(--placeholder); }

.ia-new-conv-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 20px);
  margin: 0 10px 4px;
  padding: 9px 14px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease;
  flex-shrink: 0;
}
.ia-new-conv-btn:hover {
  background: var(--accent-tint, rgba(31,147,255,0.12));
  border-color: var(--accent, #1F93FF);
  color: var(--accent, #1F93FF);
}
[data-theme="dark"] .ia-new-conv-btn {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.09);
}
[data-theme="dark"] .ia-new-conv-btn:hover {
  background: rgba(31,147,255,0.14);
  border-color: rgba(31,147,255,0.4);
  color: #60b8ff;
}

.ia-left-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.ia-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  width: 100%;
  text-align: left;
  color: var(--fg-2);
  transition: background 120ms ease, color 120ms ease;
}
.ia-nav-item:hover {
  background: var(--icon-btn-hover-bg);
  color: var(--fg);
}
[data-theme="dark"] .ia-nav-item:hover {
  background: rgba(255,255,255,0.07);
}
.ia-nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--fg-3);
}
.ia-nav-item:hover .ia-nav-icon { color: var(--accent, #1F93FF); }
.ia-nav-label {
  font-size: 13px;
  font-weight: 450;
}

.ia-left-hist-section {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 14px;
  display: flex;
  flex-direction: column;
}
.ia-hist-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--fg-4);
  padding: 8px 10px 6px;
  flex-shrink: 0;
}
.ia-hist-empty-msg {
  font-size: 12px;
  color: var(--fg-4);
  padding: 8px 10px;
  margin: 0;
  line-height: 1.5;
}

.ia-hist-item-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ia-hist-item-wrap .ia-hist-item {
  flex: 1;
  padding-right: 28px;
}
.ia-hist-del {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #ff5a4e;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease;
  flex-shrink: 0;
}
.ia-hist-item-wrap:hover .ia-hist-del { opacity: 1; }
.ia-hist-del:hover { background: rgba(255,90,78,0.14); }

/* ── Modal de confirmação de exclusão ──────────────────────────── */
.ia-del-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: grid;
  place-items: center;
  z-index: 9999;
  animation: iaFadeIn 140ms ease both;
}
@keyframes iaFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ia-del-modal {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 28px 24px;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  box-shadow: 0 16px 48px -8px rgba(0,0,0,0.3);
  animation: iaSlideUp 180ms cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes iaSlideUp { from { opacity:0; transform:translateY(10px) scale(0.97); } to { opacity:1; transform:none; } }
.ia-del-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(255,90,78,0.10);
  color: #ff5a4e;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.ia-del-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}
.ia-del-sub {
  font-size: 12.5px;
  color: var(--fg-3);
  margin: 0 0 12px;
}
.ia-del-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.ia-del-cancel {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-2);
  color: var(--fg-2);
  border: 1px solid var(--line);
  transition: background 120ms ease;
}
.ia-del-cancel:hover { background: color-mix(in srgb, var(--fg) 8%, var(--bg-2)); }
.ia-del-confirm {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: #ff5a4e;
  color: #fff;
  transition: filter 120ms ease;
}
.ia-del-confirm:hover { filter: brightness(1.08); }

/* ── Slim header (sidebar closed) ─────────────────────────────── */
.ia-chat-head--slim {
  padding: 10px 14px;
  min-height: unset;
}

/* Responsive */
@media (max-width: 900px) {
  .ia-shell { grid-template-columns: 1fr; }
  .ia-left  { display: none; }
}

/* ============================================================
   SUGESTÕES (adaptação do "Suggestions" do nexus-ui, 2026-10-03)
   Chips de tema abaixo do campo; o tema abre um painel que sai de trás do campo
   com as perguntas — escolher uma preenche o campo. Visual do design system (Relatórios).
   ============================================================ */
.ia-input-box { position: relative; }
.ia-input-box .ia-input { position: relative; z-index: 2; }
.ia-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.nx-suggestions { display: flex; flex-direction: column; gap: 8px; }
.nx-sugg-list { display: flex; gap: 8px; }
.nx-sugg-list.horizontal { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; }
.nx-sugg-list.vertical { flex-direction: column; align-items: stretch; gap: 2px; }

.nx-sugg {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px;
  border: 0; font: inherit; font-size: 13px; font-weight: 400; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.nx-sugg:active:not(:disabled) { transform: scale(.99); }
.nx-sugg:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-glow), 0 0 0 1px var(--accent); }
.nx-sugg:disabled { opacity: .5; cursor: not-allowed; }
.nx-sugg svg { flex-shrink: 0; color: var(--fg-3); }

.nx-filled { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg); }
.nx-filled:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 10%, transparent); }
.nx-filled.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.nx-filled.active svg { color: var(--accent); }
.nx-outline { background: transparent; color: var(--fg); border: 1px solid var(--line-strong); }
.nx-outline:hover:not(:disabled) { background: var(--bg-2); }
.nx-ghost { background: transparent; color: var(--fg-2); }
.nx-ghost:hover:not(:disabled), .nx-ghost:focus-visible { background: var(--bg-2); color: var(--fg); }
.nx-hl { color: var(--fg-4); }

/* Painel: sai de trás do campo (fica por baixo da metade de cima do campo) */
.nx-panel {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% - 24px); z-index: 1;
  display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 34px;
  background: color-mix(in srgb, var(--fg) 4%, var(--card));
  border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px -16px rgb(0 0 0 / .35);
  animation: nxPanelIn .2s cubic-bezier(.2,.8,.3,1) both;
}
.nx-panel[data-state="closed"] { animation: nxPanelOut .15s ease forwards; pointer-events: none; }
@keyframes nxPanelIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nxPanelOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(8px); } }
.nx-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 0 12px; }
.nx-panel-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.nx-panel-title svg { color: var(--fg-3); }
.nx-panel-close {
  width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: var(--fg-3);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s;
}
.nx-panel-close:hover { background: var(--bg-2); color: var(--fg); }
.nx-panel-content { width: 100%; }
.nx-panel .nx-sugg { height: auto; min-height: 34px; padding: 8px 12px; border-radius: 10px; justify-content: flex-start; text-align: left; white-space: normal; line-height: 1.35; }

/* Fileira de temas abaixo do campo */
.ia-sugg-row { margin-top: 12px; }
@media (max-width: 640px) {
  .ia-sugg-row .nx-sugg-list.horizontal { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .ia-sugg-row .nx-sugg-list.horizontal::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nx-panel, .nx-panel[data-state="closed"] { animation-duration: 0s; } }

/* ============================================================
   PENSANDO — orbe de partículas (porte do "ai-thinking-orb-and-input", 2026-10-03)
   Aparece no lugar dos três pontinhos enquanto a IA responde; ao terminar, onda verde + "Pronto".
   ============================================================ */
.ia-think {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 18px;
  animation: iaThinkIn .3s cubic-bezier(.22,1,.36,1) both;
}
.ia-think.is-done { animation: iaThinkOut .25s ease 0.9s both; }
@keyframes iaThinkIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes iaThinkOut { from { opacity: 1; } to { opacity: 0; } }
.ia-think-stage { position: relative; width: 168px; height: 168px; }
.ia-think-orb { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ia-think-halo {
  position: absolute; left: 50%; top: 50%; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%;
  pointer-events: none; filter: blur(34px); opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(circle, rgba(52, 211, 153, .85), transparent 68%);
}
.ia-think.is-done .ia-think-halo { opacity: .35; }
.ia-think-status { position: relative; width: 240px; height: 22px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.ia-think-lab { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.ia-think-lab.in  { animation: iaLabIn .22s cubic-bezier(.22,1,.36,1) both; }
.ia-think-lab.out { animation: iaLabOut .14s cubic-bezier(.4,0,1,1) both; }
@keyframes iaLabIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes iaLabOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px); } }
.ia-think-t {
  background: linear-gradient(90deg, var(--fg-4), var(--fg), var(--fg-4)); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: iaShimmer 2.4s linear infinite;
}
@keyframes iaShimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.ia-think-done { color: var(--success, #34d399); }
.ia-think-dots { display: inline-flex; gap: 3px; align-items: center; padding-top: 3px; }
.ia-think-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-3); opacity: .25; animation: iaDot 1.2s ease-in-out infinite; }
.ia-think-dots i:nth-child(2) { animation-delay: .16s; }
.ia-think-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes iaDot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
/* resposta nova entra suave depois do orbe */
.ia-msg--fresh { animation: iaThinkIn .35s cubic-bezier(.22,1,.36,1) both; }
@media (prefers-reduced-motion: reduce) {
  .ia-think, .ia-think.is-done, .ia-think-lab.in, .ia-think-lab.out, .ia-msg--fresh { animation-name: none; }
  .ia-think-t { animation: none; background: none; color: var(--fg); -webkit-text-fill-color: currentColor; }
  .ia-think-dots i { animation: none; opacity: .6; }
}

/* ============================================================
   MASCOTE DO HOROS (horos-mascot.js, 2026-10-04) — substitui o orbe e a nebulosa
   ============================================================ */
.ia-think-stage { width: 150px; height: 128px; display: flex; align-items: center; justify-content: center; }
.ia-think-halo { background: radial-gradient(circle, rgba(31,147,255,.7), transparent 68%); }
.ia-think.is-done .ia-think-halo { opacity: .3; }
.ia-mascot-hero {
  background: none; border: 0; padding: 6px 18px 0; cursor: pointer; border-radius: 16px; line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.ia-mascot-hero:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ia-msg__who {
  display: flex; align-items: center; gap: 7px; margin: 0 0 6px -2px;
  font-size: 12.5px; font-weight: 600; color: var(--fg-2); line-height: 1;
}

/* Texto da IA formatado (HorosRichText): bloco normal em vez do flex antigo */
.ia-text-block.ia-rich { display: block; font-size: 14px; color: var(--fg-2); }
.ia-msg__bubble .hrt, .ia-msg__bubble .hrt strong { color: inherit; }
