        .chat-widget,
        .chat-widget *,
        .chat-widget *::before,
        .chat-widget *::after {
            box-sizing: border-box;
        }

        .chat-widget {
            position: fixed;
            left: 20px;
            bottom: 20px;
            z-index: 99999;
            font-family: Arial, sans-serif;
        }

        .chat-widget__toggle {
            width: 68px;
            height: 68px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: #f5a623;
            box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .chat-widget__toggle:hover {
            transform: scale(1.06);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
        }

        .chat-widget__toggle img {
            width: 76%;
            height: 76%;
            object-fit: contain;
            display: block;
        }

        .chat-widget__panel {
            position: fixed;
            left: 105px;
            bottom: 20px;
            width: 380px;
            height: min(570px, calc(100dvh - 40px));
            max-height: calc(100dvh - 40px);
            overflow: hidden;
            border-radius: 20px;
            background: #ffffff;
            border: 1px solid #eeeeee;
            box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
            animation: chatOpen 0.22s ease-out;
        }

        .chat-widget__panel[hidden] {
            display: none !important;
        }

        @keyframes chatOpen {
            from {
                opacity: 0;
                transform: translateY(12px) scale(0.97);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .chat-widget__header {
            position: relative;
            z-index: 2;
            height: 88px;
            min-height: 88px;
            padding: 14px 16px 12px;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            background: #081b33;
            color: #ffffff;
        }

        .chat-widget__brand {
            min-width: 0;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding-top: 2px;
        }

        .chat-widget__avatar {
            width: 42px;
            height: 42px;
            flex: 0 0 42px;
            padding: 4px;
            border-radius: 50%;
            background: #f5a623;
            object-fit: contain;
            display: block;
        }

        .chat-widget__title {
            min-width: 0;
            padding-top: 1px;
        }

        .chat-widget__title strong,
        .chat-widget__title span {
            display: block;
        }

        .chat-widget__title strong {
            color: #ffffff;
            font-size: 15px;
            line-height: 1.25;
            margin-bottom: 3px;
            white-space: nowrap;
        }

        .chat-widget__title span {
            color: #d6deea;
            font-size: 12px;
            line-height: 1.35;
            margin-bottom: 6px;
            white-space: nowrap;
        }

        .chat-widget__status {
            display: inline-flex !important;
            align-items: center;
            gap: 5px;
            color: #b9e7c5 !important;
            font-size: 11px !important;
            line-height: 1.2 !important;
        }

        .chat-widget__status::before {
            content: "";
            width: 7px;
            height: 7px;
            flex: 0 0 7px;
            border-radius: 50%;
            background: #42c767;
        }

        .chat-widget__close {
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.13);
            color: #ffffff;
            font-size: 25px;
            line-height: 38px;
            text-align: center;
            cursor: pointer;
        }

        .chat-widget__close:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        .chat-widget__body {
            height: calc(100% - 88px);
            min-height: 0;
            display: flex;
            flex-direction: column;
            background: #f8f9fb;
        }

        #rag-messages {
            flex: 1 1 auto;
            min-height: 0;
            padding: 18px 14px 10px;
            overflow-y: auto;
            scroll-behavior: smooth;
        }

        #rag-messages::-webkit-scrollbar {
            width: 5px;
        }

        #rag-messages::-webkit-scrollbar-thumb {
            background: #d3d7dd;
            border-radius: 10px;
        }

        .rag-row {
            display: flex;
            gap: 8px;
            align-items: flex-end;
            margin-bottom: 14px;
        }

        .rag-row--user {
            justify-content: flex-end;
        }

        .rag-row--bot {
            justify-content: flex-start;
        }

        .rag-small-avatar {
            width: 27px;
            height: 27px;
            flex: 0 0 27px;
            padding: 3px;
            border-radius: 50%;
            background: #f5a623;
            object-fit: contain;
            display: block;
        }

        .rag-message {
            max-width: 82%;
            padding: 11px 13px;
            border-radius: 16px;
            font-size: 14px;
            line-height: 1.55;
            overflow-wrap: anywhere;
        }

        .rag-message--bot {
            border-bottom-left-radius: 5px;
            background: #ffffff;
            color: #263238;
            border: 1px solid #e7e9ed;
            box-shadow: 0 2px 7px rgba(0, 0, 0, 0.04);
        }

        .rag-message--user {
            border-bottom-right-radius: 5px;
            background: #f5a623;
            color: #ffffff;
            box-shadow: 0 3px 8px rgba(245, 166, 35, 0.25);
        }

        .rag-sources {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid #eeeeee;
            font-size: 11px;
        }

        .rag-sources__title {
            display: block;
            margin-bottom: 4px;
            color: #777777;
            font-weight: 600;
        }

        .rag-sources a {
            display: block;
            margin-top: 3px;
            color: #d88908;
            text-decoration: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .rag-sources a:hover {
            text-decoration: underline;
        }

        .rag-typing {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            height: 18px;
        }

        .rag-typing span {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #a7adb5;
            animation: typing 1.2s infinite ease-in-out;
        }

        .rag-typing span:nth-child(2) {
            animation-delay: 0.15s;
        }

        .rag-typing span:nth-child(3) {
            animation-delay: 0.3s;
        }

        @keyframes typing {

            0%,
            60%,
            100% {
                transform: translateY(0);
                opacity: 0.45;
            }

            30% {
                transform: translateY(-4px);
                opacity: 1;
            }
        }
        
        
        .chat-widget__suggestions {
            flex: 0 0 auto;
            padding: 10px 12px 0;
            background: #f8f9fb;
        }

        .chat-widget__suggestions-label {
            display: block;
            margin-bottom: 8px;
            color: #6c7480;
            font-size: 12px;
            font-weight: 600;
        }

        .chat-widget__chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chat-widget__chip {
            border: 1px solid #f5a623;
            background: #fff8eb;
            color: #17304d;
            border-radius: 999px;
            padding: 8px 13px;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.2;
            cursor: pointer;
            transition:
                background 0.2s ease,
                color 0.2s ease,
                transform 0.2s ease;
        }

        .chat-widget__chip:hover {
            background: #f5a623;
            color: #ffffff;
            transform: translateY(-2px);
        }

        #rag-chat-form {
            flex: 0 0 auto;
            display: flex;
            align-items: flex-end;
            gap: 8px;
            padding: 11px;
            border-top: 1px solid #e6e8eb;
            background: #ffffff;
        }

        #rag-question {
            min-width: 0;
            min-height: 43px;
            max-height: 110px;
            flex: 1 1 auto;
            resize: none;
            padding: 11px 12px;
            border: 1px solid #d9dde3;
            border-radius: 13px;
            outline: none;
            font-family: Arial, sans-serif;
            font-size: 13px;
            line-height: 1.4;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        #rag-question:focus {
            border-color: #f5a623;
            box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.14);
        }

        #rag-question::placeholder {
            color: #9aa1aa;
        }

        #rag-send {
            width: 43px;
            height: 43px;
            flex: 0 0 43px;
            padding: 0;
            border: 0;
            border-radius: 13px;
            background: #f5a623;
            color: #ffffff;
            font-size: 20px;
            line-height: 43px;
            text-align: center;
            cursor: pointer;
            transition: background 0.2s, transform 0.2s;
        }

        #rag-send:hover:not(:disabled) {
            background: #df9415;
            transform: translateY(-2px);
        }

        #rag-send:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        @media (max-width: 520px) {
            .chat-widget {
                left: 14px;
                right: 14px;
                bottom: 14px;
            }

            .chat-widget__toggle {
                width: 62px;
                height: 62px;
            }

            .chat-widget__panel {
                top: 14px;
                right: 10px;
                bottom: 86px;
                left: 10px;
                width: auto;
                height: auto;
                max-height: none;
                border-radius: 18px;
            }

            .chat-widget__header {
                height: 88px;
                min-height: 88px;
                padding: 14px 12px 12px;
            }

            .chat-widget__avatar {
                width: 38px;
                height: 38px;
                flex-basis: 38px;
            }

            .chat-widget__title strong {
                font-size: 14px;
            }

            .chat-widget__title span {
                font-size: 11px;
            }

            .chat-widget__close {
                width: 36px;
                height: 36px;
                flex-basis: 36px;
            }

            .chat-widget__suggestions {
                padding: 10px 10px 0;
            }

            .chat-widget__chip {
                padding: 7px 10px;
                font-size: 11px;
            }
        }