﻿/* ===============================
   FLOATING BUTTON
=================================*/
#chatToggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg,#6366f1,#4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(0,0,0,.25);
    transition: transform .2s ease;
    z-index: 9999;
}
    #chatToggle img {
        width: 45px;
        height: 45px;
        border-radius: 50%;
    }

    #chatToggle:hover {
        transform: scale(1.08);
    }


/* ===============================
   CHAT CONTAINER
=================================*/
#chatContainer {
    position: fixed;
    bottom: 85px;
    right: 25px;
    width: 450px;
    height: 520px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp .35s ease;
    z-index: 9999;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}


/* ===============================
   HEADER
=================================*/
#chatHeader {
    background: linear-gradient(135deg,#4f46e5,#6366f1);
    color: white;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .bot-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.title {
    font-weight: 600;
}

.subtitle {
    font-size: 12px;
    opacity: .85;
}

#closeChat {
    margin-left: auto;
    cursor: pointer;
    font-size: 18px;
}


/* ===============================
   MESSAGES AREA
=================================*/
#chatMessages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: #f8fafc;
    scroll-behavior: smooth;
}


/* ===============================
   MESSAGE BUBBLES
=================================*/
.msg {
    max-width: 80%;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.user {
    background: #4f46e5;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bot {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}


/* ===============================
   MESSAGE ROW STRUCTURE
=================================*/
.msg-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: flex-end;
}

.user-row {
    justify-content: flex-end;
}

.bot-row {
    justify-content: flex-start;
}

.bot-avatar.small {
    width: 28px;
    height: 28px;
}


/* ===============================
   INPUT AREA
=================================*/
#chatInputArea {
    padding: 14px;
    border-top: 1px solid #eee;
    background: white;
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatInput {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    flex: 1;
}

    #chatInput:focus {
        outline: none;
        border-color: #4f46e5;
    }

#sendBtn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: #4f46e5;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: .2s;
}

    #sendBtn:hover {
        background: #4338ca;
    }


/* ===============================
   TYPING DOTS
=================================*/
.typing {
    display: flex;
    gap: 5px;
}

    .typing span {
        width: 7px;
        height: 7px;
        background: #999;
        border-radius: 50%;
        animation: blink 1.2s infinite;
    }

        .typing span:nth-child(2) {
            animation-delay: .2s
        }

        .typing span:nth-child(3) {
            animation-delay: .4s
        }

@keyframes blink {
    0%,80%,100% {
        opacity: .2
    }

    40% {
        opacity: 1
    }
}


/* ============================================
   PROFESSIONAL DASHBOARD BOT RESPONSE STYLE
=============================================*/

.bot-response {
    font-size: 14px;
    line-height: 1.6;
}

    .bot-response h4 {
        margin: 12px 0 8px;
        font-size: 15px;
        font-weight: 600;
        color: #111827;
    }

    .bot-response hr {
        border: none;
        border-top: 1px solid #e5e7eb;
        margin: 12px 0;
    }

/* Highlight Summary Box */
.summary-box {
    text-align: center;
    padding: 14px;
    background: #f3f4f6;
    border-radius: 12px;
    margin-bottom: 12px;
}

.big-number {
    font-size: 26px;
    font-weight: 700;
    color: #4f46e5;
}

.summary-box .label {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
}

/* Data List */
.data-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .data-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f1f1f1;
    }

    .data-list .label {
        color: #374151;
    }

    .data-list .value {
        font-weight: 600;
        color: #4f46e5;
    }


/* ===============================
   STATUS BADGES
=================================*/
.badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.badge-new {
    background: #e0f2fe;
    color: #0284c7;
}

.badge-progress {
    background: #ede9fe;
    color: #6d28d9;
}

.badge-completed {
    background: #dcfce7;
    color: #15803d;
}


/* ===============================
   LINKS INSIDE BOT MESSAGE
=================================*/
.msg.bot a {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    transition: .2s;
}

    .msg.bot a:hover {
        background: #4338ca;
    }

/* ============================================
   COMPACT PROJECT CARD (CHAT OPTIMIZED)
=============================================*/

.project-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 12.5px;
    line-height: 1.4;
}
/* Header */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.project-title {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

/* Meta rows */
.project-meta,
.project-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
}

    .project-meta div,
    .project-stats div {
        font-size: 12px;
    }

.label {
    font-weight: 600;
    color: #4b5563;
}

/* Due date in red */
.due-date {
    color: #dc2626;
    font-weight: 600;
}

/* Cost in green */
.cost {
    color: #16a34a;
    font-weight: 700;
}

/* Rate color */
.rate {
    color: #4f46e5;
    font-weight: 600;
}

/* Divider inside card */
.project-stats {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f3f4f6;
}

/* ===============================
   STATUS BADGES (SMALL)
=================================*/
.status-badge {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}

.status-new {
    background: #e0f2fe;
    color: #0284c7;
}

.status-progress {
    background: #ede9fe;
    color: #6d28d9;
}

.status-completed {
    background: #dcfce7;
    color: #15803d;
}

/* ===============================
   PRIORITY COLORS
=================================*/
.priority-low {
    color: #16a34a;
    font-weight: 600;
}

.priority-medium {
    color: #f59e0b;
    font-weight: 600;
}

.priority-high {
    color: #dc2626;
    font-weight: 700;
}

/* =========================================
   CHATBOT UI (Matched to Reference Image)
   ========================================= */
/*#chatToggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

    #chatToggle:hover {
        transform: scale(1.1);
        background: var(--primary-hover);
    }

#chatContainer {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

    #chatContainer.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

#chatHeader {
    background: var(--primary-color);
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

    #chatHeader .bot-avatar img {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: white;
        padding: 2px;
    }

    #chatHeader .header-text {
        flex-grow: 1;
    }

    #chatHeader .title {
        font-weight: 600;
        font-size: 1.1rem;
    }

    #chatHeader .subtitle {
        font-size: 0.85rem;
        opacity: 0.9;
    }

#closeChat {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

#chatMessages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
}

#chatInputArea {
    padding: 15px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

#chatInput {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 12px 20px;
    outline: none;
    transition: border-color 0.2s;
}

    #chatInput:focus {
        border-color: var(--primary-color);
    }

#sendBtn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}*/