/* =========================================================
   KESUMA
   MPS AI SMART FRONT DESK
   Modern Glassmorphism UI
   Theme:
   Navy + Teal
========================================================= */


/* =========================================================
   ROOT
========================================================= */

:root {

    --navy: #173B8F;
    --navy-dark: #102B68;
    --navy-light: #315DB8;

    --teal: #10A6A6;
    --teal-dark: #087F82;
    --teal-light: #35C4C1;

    --white: #FFFFFF;
    --text: #172033;
    --text-soft: #667085;
    --text-muted: #98A2B3;

    --glass:
        rgba(255, 255, 255, 0.58);

    --glass-strong:
        rgba(255, 255, 255, 0.78);

    --glass-border:
        rgba(255, 255, 255, 0.78);

    --shadow:
        0 15px 45px rgba(23, 59, 143, 0.10);
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html,
body {
    width: 100%;
    height: 100%;
}


body {

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    color: var(--text);

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #edf3ff 0%,
            #f8fbff 48%,
            #eafafa 100%
        );
}


/* =========================================================
   BACKGROUND
========================================================= */

.background {

    position: fixed;

    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 0;
}


.background-shape {

    position: absolute;

    border-radius: 50%;

    filter: blur(8px);

    opacity: 0.65;
}


/* NAVY GLOW */

.shape-one {

    width: 500px;

    height: 500px;

    top: -260px;

    right: -120px;

    background:
        radial-gradient(
            circle,
            rgba(23, 59, 143, 0.28) 0%,
            rgba(23, 59, 143, 0.10) 42%,
            transparent 72%
        );
}


/* TEAL GLOW */

.shape-two {

    width: 450px;

    height: 450px;

    bottom: -250px;

    left: -130px;

    background:
        radial-gradient(
            circle,
            rgba(16, 166, 166, 0.25) 0%,
            rgba(16, 166, 166, 0.08) 45%,
            transparent 72%
        );
}


/* CENTER LIGHT */

.shape-three {

    width: 320px;

    height: 320px;

    top: 38%;

    left: 44%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.80),
            transparent 70%
        );
}


/* =========================================================
   APPLICATION
========================================================= */

.app {

    position: relative;

    z-index: 1;

    width: min(1180px, 100%);

    height: 100vh;

    margin: 0 auto;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    background:
        rgba(255, 255, 255, 0.38);

    backdrop-filter:
        blur(25px);

    -webkit-backdrop-filter:
        blur(25px);

    border-left:
        1px solid rgba(255, 255, 255, 0.55);

    border-right:
        1px solid rgba(255, 255, 255, 0.55);
}


/* =========================================================
   HEADER
========================================================= */

.topbar {

    height: 74px;

    flex-shrink: 0;

    padding: 0 28px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.76),
            rgba(255, 255, 255, 0.48)
        );

    backdrop-filter:
        blur(22px);

    -webkit-backdrop-filter:
        blur(22px);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.75);

    box-shadow:
        0 8px 30px rgba(23, 59, 143, 0.06);
}


/* =========================================================
   BRAND
========================================================= */

.brand {

    display: flex;

    align-items: center;

    gap: 12px;
}


/* =========================================================
   BRAND AVATAR
========================================================= */

.brand-avatar {

    position: relative;

    width: 46px;

    height: 46px;

    flex-shrink: 0;

    padding: 2px;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            var(--navy),
            var(--teal)
        );

    box-shadow:
        0 6px 20px rgba(23, 59, 143, 0.18);

    overflow: visible;
}


.brand-avatar img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 50%;

    border: 2px solid #ffffff;
}


/* =========================================================
   ONLINE INDICATOR
========================================================= */

.online-indicator {

    position: absolute;

    right: -1px;

    bottom: 0;

    width: 11px;

    height: 11px;

    border-radius: 50%;

    background: #20C997;

    border: 2px solid #ffffff;

    box-shadow:
        0 0 0 3px rgba(32, 201, 151, 0.12);
}


/* =========================================================
   BRAND TEXT
========================================================= */

.brand-text h1 {

    font-size: 17px;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: 0.4px;

    color: var(--navy);
}


.brand-text span {

    display: block;

    margin-top: 3px;

    font-size: 10px;

    color: var(--text-soft);
}


/* =========================================================
   ONLINE STATUS
========================================================= */

.online-status {

    display: flex;

    align-items: center;

    gap: 7px;

    padding: 7px 12px;

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.55);

    border:
        1px solid rgba(255, 255, 255, 0.82);

    color: var(--text-soft);

    font-size: 11px;

    box-shadow:
        0 4px 15px rgba(23, 59, 143, 0.05);
}


.status-dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background: #20C997;

    box-shadow:
        0 0 0 3px rgba(32, 201, 151, 0.12);
}


/* =========================================================
   CHAT AREA
========================================================= */

.chat-area {

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 40px 28px 25px;

    scroll-behavior: smooth;
}


/* =========================================================
   SCROLLBAR
========================================================= */

.chat-area::-webkit-scrollbar {

    width: 6px;
}


.chat-area::-webkit-scrollbar-track {

    background: transparent;
}


.chat-area::-webkit-scrollbar-thumb {

    background:
        rgba(23, 59, 143, 0.18);

    border-radius: 20px;
}


.chat-area::-webkit-scrollbar-thumb:hover {

    background:
        rgba(23, 59, 143, 0.30);
}


/* =========================================================
   WELCOME
========================================================= */

.welcome {

    width: min(760px, 100%);

    margin: 28px auto 0;

    display: flex;

    align-items: flex-start;

    gap: 20px;
}


/* =========================================================
   WELCOME AVATAR
========================================================= */

.welcome-avatar {

    width: 76px;

    height: 76px;

    flex-shrink: 0;

    padding: 3px;

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(23, 59, 143, 0.95),
            rgba(16, 166, 166, 0.95)
        );

    box-shadow:
        0 12px 30px rgba(23, 59, 143, 0.16);
}


.welcome-avatar img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 21px;

    border: 2px solid rgba(255, 255, 255, 0.9);
}


/* =========================================================
   WELCOME CONTENT
========================================================= */

.welcome-content {

    max-width: 590px;

    padding-top: 3px;
}


.welcome-label {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 8px;

    padding: 5px 10px;

    border-radius: 20px;

    background:
        rgba(16, 166, 166, 0.08);

    color: var(--teal-dark);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.1px;

    text-transform: uppercase;
}


.welcome-label::before {

    content: "";

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: var(--teal);
}


.welcome h2 {

    margin-bottom: 10px;

    font-size: clamp(27px, 4vw, 36px);

    line-height: 1.12;

    font-weight: 800;

    letter-spacing: -0.8px;

    background:
        linear-gradient(
            90deg,
            var(--navy),
            var(--teal)
        );

    -webkit-background-clip: text;

    background-clip: text;

    color: transparent;
}


.welcome p {

    margin-bottom: 8px;

    font-size: 14px;

    line-height: 1.7;

    color: var(--text-soft);
}


/* =========================================================
   SUGGESTIONS
========================================================= */

.suggestions {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 20px;
}


.suggestion {

    position: relative;

    padding: 9px 14px;

    border-radius: 20px;

    border:
        1px solid rgba(23, 59, 143, 0.10);

    background:
        rgba(255, 255, 255, 0.55);

    color: var(--navy);

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


.suggestion:hover {

    transform:
        translateY(-2px);

    background:
        rgba(255, 255, 255, 0.82);

    border-color:
        rgba(16, 166, 166, 0.25);

    color: var(--teal-dark);

    box-shadow:
        0 7px 20px rgba(23, 59, 143, 0.08);
}


/* =========================================================
   INPUT SECTION
========================================================= */

.input-section {

    flex-shrink: 0;

    padding:
        10px 28px 18px;
}


/* =========================================================
   INPUT GLASS
========================================================= */

.input-glass {

    width: min(850px, 100%);

    margin: 0 auto;

    min-height: 60px;

    display: flex;

    align-items: flex-end;

    gap: 9px;

    padding:
        7px 7px 7px 18px;

    border-radius: 19px;

    background:
        linear-gradient(
            110deg,
            rgba(255, 255, 255, 0.78),
            rgba(255, 255, 255, 0.56)
        );

    border:
        1px solid rgba(255, 255, 255, 0.92);

    box-shadow:
        0 15px 40px rgba(23, 59, 143, 0.11);

    backdrop-filter:
        blur(24px);

    -webkit-backdrop-filter:
        blur(24px);

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.input-glass:focus-within {

    border-color:
        rgba(16, 166, 166, 0.28);

    box-shadow:
        0 18px 45px rgba(23, 59, 143, 0.14);
}


/* =========================================================
   TEXTAREA
========================================================= */

#messageInput {

    flex: 1;

    min-width: 0;

    min-height: 44px;

    max-height: 120px;

    resize: none;

    padding:
        11px 4px;

    border: none;

    outline: none;

    background: transparent;

    color: var(--text);

    font-family: inherit;

    font-size: 13px;

    line-height: 1.5;
}


#messageInput::placeholder {

    color: #98A2B3;
}


/* =========================================================
   SEND BUTTON
========================================================= */

#sendButton {

    width: 46px;

    height: 46px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            var(--navy-light),
            var(--navy)
        );

    color: #ffffff;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(23, 59, 143, 0.24);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


#sendButton svg {

    width: 18px;

    height: 18px;

    fill: currentColor;
}


#sendButton:hover {

    transform:
        translateY(-2px);

    background:
        linear-gradient(
            145deg,
            var(--teal-light),
            var(--teal)
        );

    box-shadow:
        0 9px 22px rgba(16, 166, 166, 0.28);
}


#sendButton:active {

    transform:
        scale(0.95);
}


#sendButton:disabled {

    opacity: 0.5;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   INPUT FOOTER
========================================================= */

.input-footer {

    width: min(850px, 100%);

    margin: 7px auto 0;

    padding: 0 5px;

    display: flex;

    justify-content: space-between;

    gap: 10px;

    color: var(--text-muted);

    font-size: 9px;
}


/* =========================================================
   DYNAMIC CHAT MESSAGE
========================================================= */

.message {

    width: min(760px, 100%);

    margin: 0 auto 18px;

    display: flex;

    gap: 10px;

    animation:
        messageAppear 0.22s ease;
}


@keyframes messageAppear {

    from {

        opacity: 0;

        transform:
            translateY(7px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}


.message.bot {

    justify-content: flex-start;
}


.message.user {

    justify-content: flex-end;
}


/* =========================================================
   MESSAGE AVATAR
========================================================= */

.message-avatar-wrapper {

    width: 38px;

    height: 38px;

    flex-shrink: 0;

    margin-top: 18px;

    padding: 2px;

    border-radius: 13px;

    background:
        linear-gradient(
            145deg,
            var(--navy),
            var(--teal)
        );
}


.message-avatar {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 10px;

    border: 1px solid rgba(255, 255, 255, 0.85);
}


.message.user .message-avatar-wrapper {

    display: none;
}


/* =========================================================
   MESSAGE CONTENT
========================================================= */

.message-content {

    max-width: 75%;

    min-width: 0;
}


.message.user .message-content {

    max-width: 75%;
}


/* =========================================================
   SENDER
========================================================= */

.sender {

    margin:
        0 0 5px 3px;

    font-size: 10px;

    font-weight: 700;

    color: var(--text-soft);
}


/* =========================================================
   BUBBLE
========================================================= */

.bubble {

    padding:
        12px 15px;

    border-radius: 16px;

    font-size: 13px;

    line-height: 1.6;

    white-space: pre-wrap;

    overflow-wrap: break-word;
}


/* BOT */

.message.bot .bubble {

    background:
        rgba(255, 255, 255, 0.65);

    border:
        1px solid rgba(255, 255, 255, 0.85);

    border-top-left-radius: 5px;

    color: #344054;

    box-shadow:
        0 8px 25px rgba(23, 59, 143, 0.06);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);
}


/* USER */

.message.user .bubble {

    background:
        linear-gradient(
            135deg,
            var(--navy),
            var(--teal-dark)
        );

    color: #ffffff;

    border-top-right-radius: 5px;

    box-shadow:
        0 8px 22px rgba(23, 59, 143, 0.18);
}


/* =========================================================
   TYPING
========================================================= */

.typing {

    color: var(--text-soft);

    font-style: italic;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 768px) {

    .topbar {

        height: 68px;

        padding:
            0 18px;
    }


    .chat-area {

        padding:
            30px 18px 20px;
    }


    .welcome {

        margin-top: 15px;

        gap: 15px;
    }


    .welcome-avatar {

        width: 62px;

        height: 62px;

        border-radius: 20px;
    }


    .welcome-avatar img {

        border-radius: 17px;
    }


    .welcome h2 {

        font-size: 28px;
    }


    .welcome p {

        font-size: 13px;
    }


    .input-section {

        padding:
            9px 17px 14px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .app {

        width: 100%;

        border: none;
    }


    .topbar {

        height: 64px;

        padding:
            0 13px;
    }


    .brand {

        gap: 9px;
    }


    .brand-avatar {

        width: 40px;

        height: 40px;
    }


    .brand-text h1 {

        font-size: 15px;
    }


    .brand-text span {

        font-size: 9px;
    }


    .online-status {

        display: none;
    }


    .chat-area {

        padding:
            22px 13px 18px;
    }


    .welcome {

        width: 100%;

        margin-top: 8px;

        display: block;

        text-align: center;
    }


    .welcome-avatar {

        width: 76px;

        height: 76px;

        margin:
            0 auto 15px;

        border-radius: 23px;
    }


    .welcome-avatar img {

        border-radius: 19px;
    }


    .welcome-content {

        max-width: 100%;
    }


    .welcome-label {

        font-size: 9px;
    }


    .welcome h2 {

        font-size: 26px;

        letter-spacing: -0.5px;
    }


    .welcome p {

        max-width: 340px;

        margin-left: auto;

        margin-right: auto;

        font-size: 12px;

        line-height: 1.65;
    }


    .suggestions {

        justify-content: center;

        margin-top: 16px;
    }


    .suggestion {

        padding:
            8px 11px;

        font-size: 10px;
    }


    .input-section {

        padding:
            8px 10px 10px;
    }


    .input-glass {

        min-height: 54px;

        padding:
            5px 5px 5px 13px;

        border-radius: 16px;
    }


    #messageInput {

        min-height: 42px;

        font-size: 12px;
    }


    #sendButton {

        width: 42px;

        height: 42px;

        border-radius: 12px;
    }


    .input-footer {

        display: none;
    }


    .message {

        width: 100%;

        gap: 7px;
    }


    .message-avatar-wrapper {

        width: 33px;

        height: 33px;

        margin-top: 17px;

        border-radius: 11px;
    }


    .message-avatar {

        border-radius: 8px;
    }


    .message-content {

        max-width: 84%;
    }


    .message.user .message-content {

        max-width: 84%;
    }


    .bubble {

        padding:
            10px 12px;

        font-size: 12px;

        line-height: 1.55;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .brand-text span {

        display: none;
    }


    .welcome-avatar {

        width: 68px;

        height: 68px;
    }


    .welcome h2 {

        font-size: 23px;
    }


    .suggestion {

        font-size: 9px;
    }

}