/* =====================================================================
   Riksii — AI Business Consultant widget.
   Self-contained "Sand & Rose Gold" theme: warm cream glass, blush and
   rose-gold gradients, soft champagne highlights. Deliberately does NOT
   inherit the site's Sand & Gold / Ocean Glass / Midnight theme tokens —
   this panel is its own distinct, premium AI surface sitting on top of
   the CRM, the way a dedicated AI assistant panel should feel regardless
   of which site theme is active underneath.
   ===================================================================== */

.ai-chat-panel,
.ai-chat-panel * { box-sizing: border-box; }

.ai-chat-panel {
    --aria-bg-1: #fbf1e6;
    --aria-bg-2: #f6e2d6;
    --aria-glass: rgba(255, 250, 244, 0.78);
    --aria-glass-soft: rgba(255, 246, 238, 0.6);
    --aria-border: rgba(183, 110, 121, 0.22);
    --aria-rose: #b76e79;      /* rose gold — primary accent */
    --aria-gold: #cf9b5c;      /* sand gold — secondary accent */
    --aria-blush: #e8b4a0;     /* blush highlight */
    --aria-champagne: #f3e0c9;
    --aria-green: #7a9b6e;     /* muted sage — success */
    --aria-amber: #c9974f;     /* deep sand gold — warnings */
    --aria-red: #c1666b;       /* muted terracotta — risk */
    --aria-text: #4a332f;
    --aria-text-soft: #8a6f68;
    --aria-text-faint: #b9a49d;
    --aria-ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Kept as aliases so nothing downstream silently breaks if referenced */
    --aria-cyan: var(--aria-rose);
    --aria-violet: var(--aria-gold);
    --aria-pink: var(--aria-blush);
}

/* ---------- Floating orb (FAB) ---------- */
.ai-shell-fab { position: fixed; }
.ai-shell-fab {
    background: radial-gradient(circle at 35% 30%, #fdf1e4 0%, #f0c9b0 55%, #c98a8f 100%) !important;
    box-shadow: 0 6px 22px rgba(183, 110, 121, 0.35), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}
.ai-shell-fab::after {
    content: '';
    position: absolute; inset: -6px;
    border-radius: 50%;
    border: 2px solid #e3ac93;
    opacity: 0;
    pointer-events: none;
}
.ai-shell-fab:not(.panel-open) {
    animation: shellFloat 4.2s ease-in-out infinite, ariaFabPulseHost 10s linear infinite;
}
.ai-shell-fab:not(.panel-open)::after { animation: aiFabPulseRing 3.2s ease-out infinite; }
@keyframes ariaFabPulseHost { 0%, 100% { transform: none; } }
@keyframes aiFabPulseRing {
    0%   { opacity: 0.55; transform: scale(1); }
    70%  { opacity: 0; transform: scale(1.6); }
    100% { opacity: 0; transform: scale(1.6); }
}
.ai-shell-fab.panel-open { transform: scale(0.9); }
.ai-shell-fab .ai-bulb-icon { width: 27px; height: 27px; filter: drop-shadow(0 1px 3px rgba(120,60,60,0.25)); }
.ai-shell-fab .sparkle-main { }
.ai-shell-fab .sparkle-accent { opacity: 0.9; }

/* Unread proactive-insight badge on the FAB */
.ai-shell-fab .ai-notify-dot {
    position: absolute; top: -2px; right: -2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--aria-rose, #b76e79);
    border: 2px solid #fff;
    opacity: 0; transform: scale(0);
    transition: transform 0.25s var(--ease-spring, cubic-bezier(0.22,1,0.36,1)), opacity 0.25s;
}
.ai-shell-fab .ai-notify-dot.show { opacity: 1; transform: scale(1); animation: ariaNotifyPop 0.6s ease; }
@keyframes ariaNotifyPop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
    .ai-shell-fab, .ai-shell-fab::after { animation: none !important; }
}

/* ---------- Panel shell ---------- */
.ai-chat-panel {
    position: fixed; right: 26px; bottom: 98px; z-index: 71;
    width: 430px; height: 680px;
    max-height: calc(100vh - 130px);
    display: flex; flex-direction: column;
    background:
        radial-gradient(1200px 400px at 0% 0%, rgba(232, 180, 160, 0.28), transparent 60%),
        radial-gradient(1000px 400px at 100% 100%, rgba(207, 155, 92, 0.20), transparent 55%),
        linear-gradient(180deg, var(--aria-bg-1), var(--aria-bg-2));
    border: 1px solid var(--aria-border);
    border-radius: 26px;
    backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow: 0 20px 60px rgba(120, 80, 70, 0.22), 0 0 0 1px rgba(183,110,121,0.06);
    overflow: hidden;
    opacity: 0; transform: scale(0.94) translateY(16px);
    pointer-events: none;
    transform-origin: bottom right;
    transition: opacity 0.3s var(--aria-ease), transform 0.3s var(--aria-ease);
    color: var(--aria-text);
}
.ai-chat-panel.open { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
.ai-chat-panel.minimized { height: auto; max-height: none; }
.ai-chat-panel.minimized .ai-chat-messages,
.ai-chat-panel.minimized .ai-chat-inputbar,
.ai-chat-panel.minimized .ai-chat-viewfull,
.ai-chat-panel.minimized .ai-chat-orb-field {
    display: none;
}

@media (max-width: 480px) {
    .ai-chat-panel {
        right: 0; bottom: 0; left: 0; top: 0;
        width: 100%; height: 100%; max-height: 100%;
        border-radius: 0;
        padding-bottom: env(safe-area-inset-bottom, 0);
        padding-top: env(safe-area-inset-top, 0);
    }
    .ai-chat-header { padding-top: max(16px, env(safe-area-inset-top)); }
}

/* Ambient blush/gold drift behind the messages, very low opacity */
.ai-chat-orb-field {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.ai-chat-orb-field::before, .ai-chat-orb-field::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.30;
}
.ai-chat-orb-field::before {
    width: 260px; height: 260px; background: var(--aria-blush); top: -80px; left: -60px;
    animation: ariaDrift1 14s ease-in-out infinite;
}
.ai-chat-orb-field::after {
    width: 220px; height: 220px; background: var(--aria-gold); bottom: -60px; right: -40px;
    animation: ariaDrift2 16s ease-in-out infinite;
}
@keyframes ariaDrift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px, 40px); } }
@keyframes ariaDrift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, -30px); } }
@media (prefers-reduced-motion: reduce) { .ai-chat-orb-field::before, .ai-chat-orb-field::after { animation: none; } }

/* ---------- Header ---------- */
.ai-chat-header {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 12px;
    padding: 16px 16px 12px 18px;
    border-bottom: 1px solid var(--aria-border);
    flex-shrink: 0;
}
.ai-chat-header-icon {
    position: relative;
    width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
    background: radial-gradient(circle at 35% 30%, #d99a86, #b76e79 65%, #96525c);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(183,110,121,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
}
.ai-chat-header-icon svg { width: 21px; height: 21px; position: relative; z-index: 1; }
.ai-core-ring {
    position: absolute; inset: -4px; border-radius: 15px;
    border: 1.5px solid rgba(207,155,92,0.55);
    animation: ariaCoreSpin 6s linear infinite;
}
.ai-core-ring::before {
    content: ''; position: absolute; top: -2px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
    border-radius: 50%; background: #f6dfc6; box-shadow: 0 0 6px 2px rgba(207,155,92,0.8);
}
@keyframes ariaCoreSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-core-ring { animation: none; } }

.ai-chat-header-text { flex: 1; min-width: 0; }
.ai-chat-title {
    font-size: 15.5px; font-weight: 800; line-height: 1.2;
    display: flex; align-items: center; gap: 7px;
    background: linear-gradient(90deg, #9c5b66, #c9974f);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: 0.2px;
}
.ai-live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--aria-green);
    box-shadow: 0 0 8px 1px rgba(122,155,110,0.7);
    animation: ariaPulseDot 2s ease-in-out infinite;
}
@keyframes ariaPulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.ai-chat-sub { font-size: 11px; color: var(--aria-text-soft); font-weight: 600; margin-top: 1px; }
.ai-chat-sub.health-live { color: var(--aria-rose); }

.ai-chat-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ai-chat-header-actions button {
    width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--aria-border);
    background: rgba(183,110,121,0.06); color: var(--aria-text-soft); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
    transition: background 0.15s, color 0.15s;
}
.ai-chat-header-actions button:hover { background: rgba(183,110,121,0.16); color: var(--aria-text); }

/* ---------- Messages ---------- */
.ai-chat-messages {
    position: relative; z-index: 1;
    flex: 1; overflow-y: auto; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 14px;
    min-height: 0;
}
.ai-chat-messages::-webkit-scrollbar { width: 5px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(183,110,121,0.28); border-radius: 4px; }

.ai-msg { max-width: 88%; display: flex; gap: 8px; animation: aiMsgIn 0.3s var(--aria-ease); }
@keyframes aiMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ai-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.ai-msg.ai { align-self: flex-start; }

.ai-avatar {
    width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0; margin-top: 2px;
    display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
}
.ai-msg.ai .ai-avatar {
    background: radial-gradient(circle at 35% 30%, #d99a86, #b76e79 65%, #96525c); color: #fff8f2;
    box-shadow: 0 2px 8px rgba(183,110,121,0.4);
}
.ai-msg.user .ai-avatar { background: rgba(183,110,121,0.12); color: var(--aria-text-soft); border: 1px solid var(--aria-border); }

.ai-msg-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ai-msg.user .ai-msg-col { align-items: flex-end; }

.ai-msg-bubble {
    padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.5;
}
.ai-msg.user .ai-msg-bubble {
    background: linear-gradient(135deg, var(--aria-rose), var(--aria-gold));
    color: #fff8f2; font-weight: 600; border-bottom-right-radius: 4px;
}
.ai-msg.ai .ai-msg-bubble {
    background: var(--aria-glass); border: 1px solid var(--aria-border);
    color: var(--aria-text); border-bottom-left-radius: 4px;
    box-shadow: 0 4px 20px rgba(120,80,70,0.10);
}
.ai-msg-timestamp { font-size: 9.5px; color: var(--aria-text-faint); font-weight: 600; padding: 0 4px; }

.ai-msg-card-title {
    font-weight: 800; font-size: 13px; margin-bottom: 5px;
    background: linear-gradient(90deg, #9c5b66, #c9974f); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-msg-section { margin-top: 7px; }
.ai-msg-section-label {
    font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px;
    color: var(--aria-rose); margin-bottom: 2px;
}
.ai-msg-section-body { white-space: pre-line; }

/* Streaming cursor while text is being revealed */
.ai-stream-cursor {
    display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px;
    background: var(--aria-rose); animation: ariaBlink 0.9s steps(1) infinite;
}
@keyframes ariaBlink { 50% { opacity: 0; } }

/* Confidence meter */
.ai-msg-confidence {
    margin-top: 9px; display: flex; align-items: center; gap: 7px;
    font-size: 10.5px; color: var(--aria-text-soft); font-weight: 700;
}
.ai-msg-confidence-bar { flex: 1; max-width: 90px; height: 5px; border-radius: 4px; background: rgba(183,110,121,0.12); overflow: hidden; }
.ai-msg-confidence-fill {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--aria-rose), var(--aria-gold));
    box-shadow: 0 0 6px rgba(183,110,121,0.5);
    transition: width 0.6s var(--aria-ease);
}

/* Data sources row */
.ai-msg-sources {
    margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px;
}
.ai-source-tag {
    font-size: 9.5px; font-weight: 700; color: #5f7d55;
    background: rgba(122,155,110,0.12); border: 1px solid rgba(122,155,110,0.28);
    border-radius: 999px; padding: 2px 8px 2px 6px; display: inline-flex; align-items: center; gap: 4px;
}
.ai-source-tag::before { content: '\2713'; font-size: 9px; }

/* Follow-up suggestion chips */
.ai-followups { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.ai-followup-btn {
    text-align: left; cursor: pointer; font-size: 12px; font-weight: 600;
    color: #9c5b66; background: rgba(183,110,121,0.07);
    border: 1px solid rgba(183,110,121,0.22); border-radius: 10px; padding: 7px 10px;
    transition: background 0.15s, transform 0.15s;
}
.ai-followup-btn:hover { background: rgba(183,110,121,0.15); transform: translateX(2px); }
.ai-followup-btn::before { content: '\25B6'; font-size: 8px; margin-right: 6px; opacity: 0.7; }

/* Action buttons (executable CRM actions) */
.ai-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-action-btn {
    cursor: pointer; font-size: 12px; font-weight: 700;
    color: #4a332f; background: linear-gradient(90deg, var(--aria-gold), #f0cf98);
    border: none; border-radius: 10px; padding: 8px 12px;
    box-shadow: 0 3px 10px rgba(201,151,79,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.ai-action-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(201,151,79,0.4); }
.ai-action-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.ai-action-btn.ran { background: linear-gradient(90deg, var(--aria-green), #a8c299); color: #2d3b26; }

/* ---------- Thinking sequence ---------- */
.ai-thinking {
    background: var(--aria-glass-soft); border: 1px solid var(--aria-border); border-radius: 16px;
    padding: 12px 14px; font-size: 12px; color: var(--aria-text-soft);
    border-bottom-left-radius: 4px; min-width: 210px;
}
.ai-thinking-title {
    font-weight: 800; font-size: 11.5px; color: var(--aria-text); margin-bottom: 8px;
    display: flex; align-items: center; gap: 7px;
}
.ai-thinking-spinner {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid rgba(183,110,121,0.2); border-top-color: var(--aria-rose);
    animation: ariaSpin 0.7s linear infinite;
}
@keyframes ariaSpin { to { transform: rotate(360deg); } }
.ai-thinking-step {
    display: flex; align-items: center; gap: 7px; padding: 2.5px 0;
    opacity: 0.4; transform: translateX(-4px);
    transition: opacity 0.25s var(--aria-ease), transform 0.25s var(--aria-ease);
}
.ai-thinking-step.done { opacity: 1; transform: translateX(0); color: var(--aria-text); }
.ai-thinking-step .chk {
    width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0;
    border: 1.5px solid rgba(183,110,121,0.3); display: flex; align-items: center; justify-content: center;
    font-size: 8px; color: transparent; transition: all 0.2s;
}
.ai-thinking-step.done .chk { background: var(--aria-green); border-color: var(--aria-green); color: #fff8f2; }
.ai-thinking-step.done .chk::after { content: '\2713'; }
.ai-thinking-step:not(.done) .chk { animation: ariaCheckPulse 1s ease-in-out infinite; }
@keyframes ariaCheckPulse { 0%,100% { border-color: rgba(183,110,121,0.3); } 50% { border-color: var(--aria-rose); } }

/* Typing dots (fallback / brief pre-thinking flash) */
.ai-msg.typing .ai-msg-bubble { display: flex; gap: 4px; align-items: center; padding: 12px 16px; }
.ai-typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--aria-text-faint); animation: aiTypingBounce 1.1s ease-in-out infinite; }
.ai-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTypingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- Daily briefing card (kept for future re-enable; not shown by default) ---------- */
.ai-briefing {
    background: linear-gradient(135deg, rgba(183,110,121,0.08), rgba(207,155,92,0.10));
    border: 1px solid var(--aria-border); border-radius: 18px; padding: 14px 16px;
    font-size: 12.5px; color: var(--aria-text);
}
.ai-briefing-greeting { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.ai-briefing-row { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid rgba(183,110,121,0.10); font-size: 12px; }
.ai-briefing-row:first-of-type { border-top: none; }
.ai-briefing-label { color: var(--aria-text-soft); }
.ai-briefing-value { font-weight: 800; }
.ai-briefing-value.risk { color: var(--aria-red); }
.ai-briefing-value.opp { color: var(--aria-green); }
.ai-briefing-note { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(183,110,121,0.18); font-size: 11.5px; color: var(--aria-text-soft); }

/* Health scorecard gauge */
.ai-health-score-wrap { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; }
.ai-health-gauge { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.ai-health-gauge svg { transform: rotate(-90deg); }
.ai-health-gauge-track { fill: none; stroke: rgba(183,110,121,0.12); stroke-width: 6; }
.ai-health-gauge-fill { fill: none; stroke: url(#ariaHealthGrad); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--aria-ease); }
.ai-health-gauge-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.ai-health-factors { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ai-health-factor-row { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.ai-health-factor-label { width: 96px; flex-shrink: 0; color: var(--aria-text-soft); }
.ai-health-factor-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(183,110,121,0.10); overflow: hidden; }
.ai-health-factor-fill { height: 100%; background: linear-gradient(90deg, var(--aria-rose), var(--aria-gold)); border-radius: 4px; }

/* ---------- Quick chips (kept for future re-enable; not shown by default) ---------- */
.ai-chat-chips {
    position: relative; z-index: 1;
    display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto;
    padding: 0 14px 10px; flex-shrink: 0; scrollbar-width: none;
}
.ai-chat-chips::-webkit-scrollbar { display: none; }
.ai-chip {
    flex-shrink: 0; white-space: nowrap; cursor: pointer;
    padding: 7px 13px; border-radius: 20px; font-size: 12px; font-weight: 700;
    background: rgba(183,110,121,0.05); border: 1px solid var(--aria-border); color: var(--aria-text-soft);
    transition: all 0.15s;
}
.ai-chip:hover { background: rgba(183,110,121,0.14); color: var(--aria-text); transform: translateY(-1px); }

/* Specialist mode tabs (kept for future re-enable; not shown by default) */
.ai-mode-tabs {
    position: relative; z-index: 1;
    display: flex; gap: 4px; padding: 10px 14px 4px;
    flex-shrink: 0; overflow-x: auto; scrollbar-width: none;
}
.ai-mode-tabs::-webkit-scrollbar { display: none; }
.ai-mode-tab {
    flex-shrink: 0; white-space: nowrap; cursor: pointer;
    padding: 6px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
    background: transparent; border: 1px solid var(--aria-border); color: var(--aria-text-faint);
    transition: all 0.2s var(--aria-ease);
}
.ai-mode-tab:hover { color: var(--aria-text); border-color: rgba(183,110,121,0.4); }
.ai-mode-tab.active {
    color: #fff8f2; font-weight: 800; border-color: transparent;
    background: linear-gradient(90deg, var(--aria-rose), var(--aria-gold));
    box-shadow: 0 3px 12px rgba(183,110,121,0.35);
}

/* ---------- Input bar ---------- */
.ai-chat-inputbar {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px 14px; flex-shrink: 0;
}
.ai-chat-input-wrap { position: relative; flex: 1; min-width: 0; }
.ai-chat-input-wrap input {
    width: 100%; height: 44px; border-radius: 14px; padding: 0 14px;
    border: 1.5px solid var(--aria-border); background: rgba(255,255,255,0.55);
    font-size: 13px; color: var(--aria-text); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-chat-input-wrap input::placeholder { color: var(--aria-text-faint); }
.ai-chat-input-wrap input:focus {
    border-color: var(--aria-rose);
    box-shadow: 0 0 0 3px rgba(183,110,121,0.15);
}
.ai-chat-send {
    width: 44px; height: 44px; border-radius: 14px; border: none; flex-shrink: 0; cursor: pointer;
    background: linear-gradient(135deg, var(--aria-rose), var(--aria-gold)); color: #fff8f2;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    box-shadow: 0 4px 14px rgba(183,110,121,0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.ai-chat-send:hover { transform: translateY(-1px) scale(1.03); }
.ai-chat-send:disabled { opacity: 0.5; cursor: default; transform: none; }

.ai-chat-suggestions {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
    background: #fffaf5; border: 1.5px solid var(--aria-border); border-radius: 14px;
    box-shadow: 0 16px 40px rgba(120,80,70,0.18);
    max-height: 220px; overflow-y: auto;
    opacity: 0; transform: translateY(6px) scale(0.98); pointer-events: none;
    transition: opacity 0.18s var(--aria-ease), transform 0.18s var(--aria-ease);
    z-index: 5;
}
.ai-chat-suggestions.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ai-chat-suggestion {
    display: block; width: 100%; text-align: left; padding: 9px 13px;
    border: none; background: transparent; font-size: 12.5px; color: var(--aria-text);
    cursor: pointer; border-bottom: 1px solid rgba(183,110,121,0.10);
}
.ai-chat-suggestion:last-child { border-bottom: none; }
.ai-chat-suggestion:hover, .ai-chat-suggestion.active { background: rgba(183,110,121,0.10); }

.ai-chat-viewfull {
    position: relative; z-index: 1;
    display: block; text-align: center; font-size: 11px; font-weight: 700;
    color: var(--aria-rose); text-decoration: none; padding: 0 0 12px;
    flex-shrink: 0;
}
.ai-chat-viewfull:hover { text-decoration: underline; }

.ai-chat-empty { text-align: center; color: var(--aria-text-faint); font-size: 12.5px; padding: 20px 10px; }

/* Proactive insight toast, appears briefly inside the panel */
.ai-proactive-toast {
    position: absolute; left: 14px; right: 14px; top: 10px; z-index: 3;
    background: linear-gradient(135deg, rgba(183,110,121,0.95), rgba(207,155,92,0.92));
    color: #fff8f2; font-size: 12px; font-weight: 700; border-radius: 12px;
    padding: 10px 12px; box-shadow: 0 10px 30px rgba(183,110,121,0.35);
    display: flex; align-items: center; gap: 8px;
    opacity: 0; transform: translateY(-10px);
    transition: opacity 0.3s var(--aria-ease), transform 0.3s var(--aria-ease);
    pointer-events: none;
}
.ai-proactive-toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ---------- Dashboard rotating insight glow-on-change (unchanged) ---------- */
.ai-card.ai-rotate-glow .ai-glow { animation: aiRotateGlow 1.4s var(--ease-out, ease); }
@keyframes aiRotateGlow { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
