:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; }

.ai-btn-float {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ai-btn-float:hover { transform: scale(1.1); }

.ai-badge {
    position: absolute;
    top: -45px;
    right: 0;
    background: white;
    color: var(--text);
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s;
}
.ai-btn-float:hover .ai-badge { opacity: 1; transform: translateY(0); }

.ai-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    border: 1px border solid var(--border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

.ai-panel.hidden {
    opacity: 0;
    transform: scale(0.9) translateY(40px);
    pointer-events: none;
}

.ai-header {
    background: var(--gradient);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ai-hd-info { display: flex; align-items: center; gap: 12px; }
.ai-avatar { width: 40px; height: 40px; background: rgba(255,255,255,0.2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 1px solid rgba(255,255,255,0.3); }
.ai-header h4 { font-size: 15px; font-weight: 600; }
.ai-status { font-size: 10px; opacity: 0.8; display: flex; align-items: center; gap: 5px; }
.ai-status::before { content: ''; width: 6px; height: 6px; background: #4ade80; border-radius: 50%; }
.ai-close { background: none; border: none; color: white; cursor: pointer; opacity: 0.6; font-size: 18px; }

.ai-body { flex: 1; padding: 20px; overflow-y: auto; background: #f8fafc; display: flex; flex-direction: column; gap: 15px; }
.ai-msg { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; max-width: 85%; }
.ai-msg.bot { background: white; color: var(--text); border: 1px solid var(--border); align-self: flex-start; }
.ai-msg.user { background: var(--primary); color: white; align-self: flex-end; }

.ai-suggestions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ai-sug-btn { text-align: left; background: white; border: 1px solid var(--border); padding: 10px 15px; border-radius: 12px; font-size: 12px; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.ai-sug-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateX(5px); }

.ai-footer { padding: 15px; border-top: 1px solid var(--border); display: flex; gap: 10px; background: white; }
.ai-footer input { flex: 1; border: none; background: #f1f5f9; padding: 12px 15px; border-radius: 12px; font-size: 14px; outline: none; }
.ai-footer button { width: 42px; height: 42px; background: var(--primary); border: none; color: white; border-radius: 10px; cursor: pointer; transition: background 0.2s; }
.ai-footer button:hover { background: var(--primary-hover); }

.ai-typing-indicator { align-self: flex-start; background: white; border: 1px solid var(--border); padding: 10px 15px; border-radius: 15px; display: flex; gap: 4px; }
.ai-typing-indicator span { width: 6px; height: 6px; background: #cbd5e1; border-radius: 50%; animation: bounce 1.1s infinite; }
.ai-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.ai-nav-btn { margin-top: 10px; width: 100%; border: 1px solid var(--primary); background: rgba(99, 102, 241, 0.05); color: var(--primary); padding: 10px; border-radius: 10px; font-weight: 700; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }

@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } }

.hidden { display: none !important; }
