:root {
            --primary: #1F3368;
            --accent: #FFBB38;
            --white: #FFFFFF;
            --light-bg: #F4F6FB;
            --text-dark: #1a1a2e;
            --text-muted: #6b7280;
            --bubble-user: #1F3368;
            --bubble-bot: #F4F6FB;
            --shadow: 0 8px 32px rgba(31, 51, 104, 0.18);
            --radius: 18px;
        }

        /* ── FLOATING BUTTON ── */
        #chat-toggle {
            position: fixed;
            bottom: 28px;
            right: 28px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: var(--primary);
            border: 3px solid var(--accent);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
            z-index: 9999;
            transition: transform 0.2s, background 0.2s;
        }

        #chat-toggle:hover {
            transform: scale(1.08);
            background: #162550;
        }

        #chat-toggle svg {
            transition: transform 0.3s;
        }

        #chat-toggle.open svg {
            transform: rotate(90deg);
        }

        /* Notif badge */
        #chat-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--accent);
            color: var(--primary);
            font-size: 11px;
            font-weight: 700;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid var(--white);
        }

        /* ── PANEL ── */
        #chat-panel {
            position: fixed;
            bottom: 100px;
            right: 28px;
            width: 370px;
            max-height: 560px;
            background: var(--white);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            z-index: 9998;
            overflow: hidden;
            transform: scale(0.92) translateY(20px);
            opacity: 0;
            pointer-events: none;
            transform-origin: bottom right;
            transition: transform 0.25s cubic-bezier(.4, 0, .2, 1),
                opacity 0.25s cubic-bezier(.4, 0, .2, 1);
        }

        #chat-panel.open {
            transform: scale(1) translateY(0);
            opacity: 1;
            pointer-events: all;
        }

        /* Header */
        .chat-header {
            background: var(--primary);
            padding: 16px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .chat-header-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: var(--accent);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .chat-header-info {
            flex: 1;
        }

        .chat-header-name {
            color: var(--white);
            font-weight: 700;
            font-size: 15px;
            margin: 0;
        }

        .chat-header-status {
            color: var(--accent);
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .status-dot {
            width: 7px;
            height: 7px;
            background: #4ade80;
            border-radius: 50%;
            display: inline-block;
        }

        /* Body */
        .chat-body {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
            background: var(--light-bg);
            display: flex;
            flex-direction: column;
            gap: 10px;
            scroll-behavior: smooth;
        }

        .chat-body::-webkit-scrollbar {
            width: 4px;
        }

        .chat-body::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }

        /* Bubbles */
        .bubble-wrap {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            animation: fadeUp 0.2s ease;
        }

        @keyframes fadeUp {
            from {
                opacity: 0;
                transform: translateY(8px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .bubble-wrap.user {
            flex-direction: row-reverse;
        }

        .bubble-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--accent);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 13px;
        }

        .bubble {
            max-width: 78%;
            padding: 10px 14px;
            border-radius: 14px;
            font-size: 14px;
            line-height: 1.55;
            word-break: break-word;
        }

        .bubble.bot {
            background: var(--white);
            color: var(--text-dark);
            border-bottom-left-radius: 4px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
        }

        .bubble.user {
            background: var(--bubble-user);
            color: var(--white);
            border-bottom-right-radius: 4px;
        }

        .bubble a {
            color: var(--accent);
            text-decoration: underline;
        }

        /* Typing indicator */
        .typing-indicator {
            display: flex;
            gap: 5px;
            padding: 12px 14px;
            background: var(--white);
            border-radius: 14px;
            border-bottom-left-radius: 4px;
            width: fit-content;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
        }

        .typing-indicator span {
            width: 7px;
            height: 7px;
            background: var(--primary);
            border-radius: 50%;
            animation: bounce 1.2s infinite;
            opacity: 0.5;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes bounce {

            0%,
            60%,
            100% {
                transform: translateY(0);
                opacity: 0.5;
            }

            30% {
                transform: translateY(-6px);
                opacity: 1;
            }
        }

        /* Suggested questions */
        .suggested-wrap {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 4px;
        }

        .suggested-label {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 2px;
        }

        .suggested-btn {
            background: var(--white);
            border: 1.5px solid var(--primary);
            color: var(--primary);
            border-radius: 20px;
            padding: 7px 14px;
            font-size: 13px;
            cursor: pointer;
            text-align: left;
            transition: background 0.15s, color 0.15s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .suggested-btn:hover {
            background: var(--primary);
            color: var(--white);
        }

        /* Footer / Input */
        .chat-footer {
            padding: 12px 14px;
            background: var(--white);
            border-top: 1px solid #e5e7eb;
            display: flex;
            gap: 8px;
            align-items: center;
        }

        #chat-input {
            flex: 1;
            border: 1.5px solid #e5e7eb;
            border-radius: 24px;
            padding: 9px 16px;
            font-size: 14px;
            outline: none;
            color: var(--text-dark);
            transition: border-color 0.2s;
            background: var(--light-bg);
        }

        #chat-input:focus {
            border-color: var(--primary);
        }

        #chat-send {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary);
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, transform 0.15s;
            flex-shrink: 0;
        }

        #chat-send:hover {
            background: #162550;
            transform: scale(1.07);
        }

        #chat-send:active {
            transform: scale(0.95);
        }

        /* Mobile */
        @media (max-width: 480px) {
            #chat-panel {
                width: calc(100vw - 24px);
                right: 12px;
                bottom: 90px;
                max-height: 70vh;
            }

            #chat-toggle {
                bottom: 16px;
                right: 16px;
            }
        }