* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
             margin: 0;
             font-family: sans-serif;
             background-color: #ffffff;
             background-size: cover;
             background-repeat: no-repeat;
             background-position: center;
             overflow: hidden;
        }

        .chatbot-avatar {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }


        .app-container {
            display: flex;
            width: 100%;
            height: 100vh;
        }

        .sidebar {
            width: 260px;
            background: #f7f7f8;
            border-right: 1px solid #e0e0e0;
            display: flex;
            flex-direction: column;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            position: relative;
            z-index: 100;
            display: none;
        }

        .sidebar.open {
            transform: translateX(0);
            display: block;
        }

        .sidebar-header {
            padding: 20px 16px 12px 16px;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #f7f7f8;
        }

        .sidebar-title {
            font-weight: 700;
            font-size: 15px;
            color: #222222;
            letter-spacing: 0.5px;
        }

        .close-sidebar {
            background: none;
            border: none;
            color: #9ca3af;
            cursor: pointer;
            padding: 4px;
            border-radius: 4px;
            transition: background-color 0.2s ease;
        }

        .close-sidebar:hover {
            background: #005EA2;
            color: #ffffff;
        }

        .new-chat-btn {
            margin: 18px 16px 12px 16px;
            padding: 12px 16px;
            background: #ececf1;
            border: none;
            border-radius: 8px;
            color: #222222;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 2px 8px rgba(37,99,235,0.07);
            transition: background 0.2s;
        }

        .new-chat-btn:hover {
            background: #e0e7ff;
        }

        .chat-history {
            flex: 1;
            overflow-y: auto;
            padding: 0 8px 16px 8px;
            background: #f7f7f8;
        }

        .history-item {
            padding: 12px 16px;
            margin: 8px 0;
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
            color: #222222;
            background: #ffffff;
            transition: background 0.2s, box-shadow 0.2s, border 0.2s;
            border: 1px solid #ececf1;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 1px 4px rgba(0,0,0,0.03);
        }

        .history-item:hover {
            background: #e0e7ff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }

        .history-item.active {
            background: #dae2e9;
            border-color: #737987;
            color: #000000;
            font-weight: 400;
        }

        .history-item-content {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: inherit;
        }

        .history-item-actions {
            display: flex;
            gap: 4px;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .history-item:hover .history-item-actions {
            opacity: 1;
        }

        .history-action-btn {
            background: none;
            border: none;
            color: #9ca3af;
            cursor: pointer;
            padding: 4px;
            border-radius: 4px;
            font-size: 13px;
            transition: color 0.2s;
        }

        .history-action-btn:hover {
            color: #2563eb;
        }

        .main-content {
            flex: 1;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: #ffffff;
          }
           

        .chat-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            margin: 0 auto;
            width: 100%;
            height: 100vh;
        }

        .chat-header {
            padding: 16px 24px;
            box-shadow: 0px 8px 6px -6px rgba(0, 0, 0, 0.4);
            background: white;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .menu-toggle {
            background: none;
            border: none;
            color: #9ca3af;
            cursor: pointer;
            padding: 8px;
            border-radius: 6px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .menu-toggle:hover {
            background: #005EA2;
            color: #ffffff;
        }

        .chat-title {
            flex: 1;
            font-size: 18px;
            font-weight: 700;
            color: #000000;
            font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
        }

        .chat-messages {
            flex: 1;
            background-image: url(/static/bg-chatbotimage.png);
            overflow-y: auto;
            padding: 20px 24px;
            scroll-behavior: smooth;
            background: #f1f2f3;
            color: #575050;
        }

        .message {
            margin-bottom: 24px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }

        .message.user {
            flex-direction: row;
            justify-content: flex-end;
        }

        .message-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 14px;
            flex-shrink: 0;
        }

        .user .message-avatar {
            background: #6e7372;
            color: white;
        }

        .assistant .message-avatar {
            background: #6e7372;
            color: white;
        }

        .message-content {
            flex: 1;
            max-width: calc(100% - 44px);
            color: #000000;
        }

        .user .message-content {
            background: #e0e0e0;
            padding: 12px 16px;
            border-radius: 18px;
            border-bottom-right-radius: 4px;
            color: #000000;
            text-align: right;
            margin-left: 0;
            margin-right: 0;
            align-self: flex-end;
            box-shadow: 0 2px 8px rgba(37,99,235,0.07);
            width: fit-content;
            max-width: 60vw;
            min-width: 48px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            position: relative;
        }

        .user .message {
            flex-direction: row;
            justify-content: flex-end;
        }

        .user .message-avatar {
            order: 2;
            margin-left: 8px;
            margin-right: 0;
            align-self: flex-end;
        }

        .user .message-content {
            order: 1;
        }

        .message.user .message-content {
            text-align: right;
        }

        .assistant .message-content {
            padding: 0;
            color: #000000;
        }

        .assistant-text {
            margin-bottom: 16px;
            line-height: 1.6;
            color: #000000;
            display: none;
        }

        .report-container {
            margin: 16px 0;
        }

        .report-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
            padding: 8px 0;
        }

        .report-name {
            font-weight: 600;
            color: #000000;
            font-size: 14px;

        }

        .info-icon {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #4a5568;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            cursor: help;
            position: relative;
        }

        .info-icon:hover .tooltip {
            opacity: 1;
            visibility: visible;
            transform: translateY(-5px);
        }

        .tooltip {
            position: absolute;
            top: 170%;
            background: #1a1a1a;
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            white-space: pre-wrap;
            max-width: 300px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            z-index: 1000;
            border: 1px solid #404040;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            /* left: -72px; */
        }

        .tooltip::after {
            content: '';
            position: absolute;
            left: 50%;
            transform: translateX(-150%);
            border: 5px solid transparent;
            border-bottom-color: #1a1a1a;
            bottom: 100%;
        }

        .data-table {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            /* border: 1px solid #404040; */
            margin-bottom: 16px;
            width: 100%;
            margin-left: auto;
            margin-right: auto;
        }

        .data-table.single-value {
            max-width: 400px;
            margin-left: 0;
            margin-right: 0;
        }
        .data-table.single-value th,
        .data-table.single-value td {
            text-align: left !important;
            font-size: 17px;
            padding: 12px 18px;
        }
        .data-table.single-value td.numeric {
            text-align: left !important;
        }

        .data-table table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            background: #f7f7f8;
            padding: 10px 14px;
            text-align: left;
            font-weight: 700;
            color: #444;
            border-bottom: 1px solid #e0e0e0;
            font-size: 15px;
        }

        .data-table td {
            padding: 10px 14px;
            border-bottom: 1px solid #ececec;
            color: #222;
            font-size: 15px;
            background: #fff;
        }

        .data-table td.numeric {
            text-align: right;
            font-variant-numeric: tabular-nums;
        }

        .data-table tr:last-child td {
            border-bottom: none;
        }


        .dax-query {
            background: #f3f3f3;
            border: 1px solid #404040;
            border-radius: 6px;
            padding: 12px;
            margin: 8px 0;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 13px;
            color: #000000;
            overflow-x: auto;
            display: none;
        }

        .dax-query-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
            font-size: 12px;
            color: #9ca3af;
        }

        .input-area {
            padding: 20px 24px;
            background: white;
            box-shadow: 5px 1px 8px black;

        }

        .input-container {
            display: flex;
            align-items: flex-end;
            gap: 12px;
            max-width: 100%;
        }

        .input-wrapper {
            flex: 1;
            position: relative;
        }

        .message-input {
            width: 100%;
            min-height: 44px;
            max-height: 200px;
            padding: 12px 16px;
            border: 1px solid #ababab;
            border-radius: 22px;
            background: #f1f2f3;
            color: #000000;
            font-size: 14px;
            font-family: inherit;
            resize: none;
            outline: none;
            transition: border-color 0.2s ease;
        }

        .message-input:focus {
            border-color: #10a37f;
        }

        .message-input::placeholder {
            color: #9ca3af;
        }

        .send-button {
            width: 44px;
            height: 44px;
            border: none;
            border-radius: 50%;
            background: #005EA2;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s ease;
            flex-shrink: 0;
        }

        .send-button:hover:not(:disabled) {
            background: #000000;
        }

        .send-button:disabled {
            background: #404040;
            cursor: not-allowed;
        }

        .loading {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #9ca3af;
            font-style: italic;
        }

        .loading-dots {
            display: flex;
            gap: 4px;
        }

        .loading-dot {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: #9ca3af;
            animation: pulse 1.5s ease-in-out infinite;
        }

        .loading-dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .loading-dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes pulse {
            0%, 60%, 100% {
                opacity: 0.3;
            }
            30% {
                opacity: 1;
            }
        }

        .error-message {
            background: #dc2626;
            color: #ffffff;
            padding: 12px 16px;
            border-radius: 8px;
            margin: 8px 0;
        }

        /* Scrollbar styling */
        .chat-messages::-webkit-scrollbar {
            width: 6px;
        }

        .chat-messages::-webkit-scrollbar-track {
            background: transparent;
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: #404040;
            border-radius: 3px;
        }

        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: #525252;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .sidebar {
                position: fixed;
                height: 100vh;
                z-index: 1000;
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .chat-messages {
                padding: 16px;
            }

            .input-area {
                padding: 16px;
            }

            .tooltip {
                max-width: 250px;
                font-size: 11px;
            }
        }

        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 50;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .greeting-message {
            background: #eaeaea;
            padding: 12px 16px;
            border-radius: 18px;
            border-bottom-left-radius: 4px;
            color: #000000;
            margin-bottom: 8px;
            display: inline-block;
        }

        .suggested-question-btn {
            background: #e0e7ff;
            color: #222;
            border: none;
            border-radius: 18px;
            padding: 10px 18px;
            font-size: 15px;
            font-family: inherit;
            margin: 0 4px;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(37,99,235,0.07);
            transition: background 0.2s, transform 0.1s;
            outline: none;
            font-weight: 500;
            position: relative;
            z-index: 1;
        }
        .suggested-question-btn:hover {
            background: #2563eb;
            color: #fff;
            transform: translateY(-2px) scale(1.04);
        }

        .user-avatar-container { position: relative; }
        .user-avatar { transition: box-shadow 0.2s; }
        .user-avatar:hover { box-shadow: 0 2px 8px #2222; }
        .user-dropdown { animation: fadeIn 0.18s; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px);} to { opacity: 1; transform: translateY(0);} }
        
        .home-button:hover {
            background: #005EA2 !important;
            color: black !important;
        }