
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f7f7f8;
    color: #202123;
}

button,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}


/* ===================================================== */
/* APP                                                   */
/* ===================================================== */

.app {
    height: 100vh;
    display: flex;
}


/* ===================================================== */
/* SIDEBAR                                               */
/* ===================================================== */

.sidebar {
    width: 270px;
    background: #111318;
    color: white;

    display: flex;
    flex-direction: column;

    padding: 16px 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 4px 8px 20px;
}

.brand-mark {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
    font-size: 20px;

    background:
        linear-gradient(
            135deg,
            #2676ff,
            #7b4dff,
            #e44388
        );
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
}

.brand-small {
    font-size: 11px;
    color: #9fa4ae;
}

.new-chat {
    width: 100%;

    padding: 12px 14px;

    border-radius: 10px;

    border: 1px solid #343842;

    background: transparent;
    color: white;

    text-align: left;
}

.new-chat:hover {
    background: #23262d;
}

.sidebar-title {
    margin:
        24px 8px
        8px;

    font-size: 12px;

    color: #858b96;
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
}

.conversation {
    display: block;

    width: 100%;

    text-align: left;

    padding: 10px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #d8dbe0;
}

.conversation:hover,
.conversation.active {
    background: #24272e;
}

.sidebar-bottom {
    border-top:
        1px solid #2c3037;

    padding-top: 10px;
}

.sidebar-item {
    width: 100%;

    text-align: left;

    padding: 10px;

    border: 0;

    background: none;

    color: #d5d7dc;
}

.user-card {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px 8px;
}

.avatar {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: #356cff;

    display: flex;

    align-items: center;
    justify-content: center;

    font-weight: 700;
}

.user-name {
    font-size: 13px;

    font-weight: 600;
}

.user-plan {
    font-size: 11px;

    color: #8e949e;
}


/* ===================================================== */
/* MAIN                                                  */
/* ===================================================== */

.main {
    flex: 1;

    min-width: 0;

    display: flex;

    flex-direction: column;

    background: white;
}


/* ===================================================== */
/* TOP BAR                                               */
/* ===================================================== */

.topbar {
    height: 64px;

    border-bottom:
        1px solid #ececef;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 22px;

    flex-shrink: 0;
}

.top-left {
    display: flex;

    align-items: center;

    gap: 10px;
}

.menu-button {
    display: none;

    border: 0;

    background: transparent;

    font-size: 22px;
}

.model-select {
    border: 0;

    background: transparent;

    font-weight: 600;

    font-size: 15px;

    padding: 8px;
}

.mode-switch {
    display: flex;

    background: #f1f2f4;

    border-radius: 12px;

    padding: 4px;
}

.mode-button {
    border: 0;

    background: transparent;

    padding: 8px 13px;

    border-radius: 9px;

    font-size: 13px;
}

.mode-button.active {
    background: white;

    box-shadow:
        0 1px 4px
        rgba(0,0,0,.12);
}


/* ===================================================== */
/* CHAT                                                  */
/* ===================================================== */

.chat-container {
    flex: 1;

    overflow-y: auto;

    display: flex;

    justify-content: center;
}

.welcome {
    width: min(
        760px,
        calc(100% - 40px)
    );

    margin: auto;

    text-align: center;

    padding-bottom: 40px;
}

.welcome-logo {
    width: 70px;
    height: 70px;

    border-radius: 22px;

    margin: 0 auto 20px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: white;

    font-size: 27px;

    font-weight: 800;

    background:
        linear-gradient(
            135deg,
            #216bff,
            #8648ee,
            #ef426f
        );

    box-shadow:
        0 10px 30px
        rgba(65,91,255,.2);
}

.welcome h1 {
    font-size: 32px;

    margin-bottom: 10px;
}

.welcome p {
    color: #666b75;

    line-height: 1.6;

    max-width: 620px;

    margin:
        0 auto
        34px;
}

.starter-grid {
    display: grid;

    grid-template-columns:
        repeat(2,1fr);

    gap: 12px;
}

.starter-card {
    border:
        1px solid #dedfe3;

    background: white;

    border-radius: 15px;

    padding: 18px;

    text-align: left;

    transition: .18s;
}

.starter-card:hover {
    border-color: #b9bdc7;

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 25px
        rgba(0,0,0,.06);
}

.starter-card strong {
    display: block;

    margin-bottom: 5px;
}

.starter-card span {
    font-size: 13px;

    color: #727782;
}

.messages {
    width: min(
        820px,
        calc(100% - 30px)
    );

    padding:
        30px 0
        160px;
}

.message {
    margin-bottom: 28px;

    line-height: 1.65;
}

.message-label {
    font-weight: 700;

    margin-bottom: 7px;

    font-size: 13px;
}

.user-message {
    display: flex;

    justify-content: flex-end;
}

.user-message .message-content {
    max-width: 75%;

    background: #f0f1f2;

    padding: 12px 16px;

    border-radius: 18px;
}

.ai-message .message-content {
    max-width: 100%;
}

.visual-card {
    border:
        1px solid #e1e3e7;

    border-radius: 16px;

    overflow: hidden;

    margin-top: 15px;
}

.visual-card img {
    display: block;

    width: 100%;
}


/* ===================================================== */
/* COMPOSER                                              */
/* ===================================================== */

.composer-section {
    background:
        linear-gradient(
            transparent,
            white 25%
        );

    padding:
        18px 20px
        12px;

    flex-shrink: 0;
}

.mode-indicator {
    width: min(
        780px,
        100%
    );

    margin:
        0 auto
        6px;

    color: #777c85;

    font-size: 12px;
}

.composer {
    width: min(
        780px,
        100%
    );

    margin: auto;

    border:
        1px solid #dadce0;

    border-radius: 22px;

    padding:
        10px 12px
        8px;

    background: white;

    box-shadow:
        0 4px 25px
        rgba(0,0,0,.07);
}

.composer textarea {
    width: 100%;

    max-height: 180px;

    resize: none;

    border: 0;

    outline: none;

    padding: 8px;

    font-size: 16px;

    line-height: 1.45;
}

.composer-toolbar {
    display: flex;

    justify-content: space-between;

    align-items: center;
}

.composer-left {
    display: flex;

    gap: 4px;
}

.tool-button {
    width: 36px;
    height: 36px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border: 0;

    background: transparent;

    border-radius: 50%;

    color: #4c515a;
}

.tool-button:hover {
    background: #f0f1f3;
}

.send-button {
    width: 38px;
    height: 38px;

    border: 0;

    border-radius: 50%;

    background: #111318;

    color: white;

    font-size: 21px;
}

.send-button:hover {
    background: #32353b;
}

.attachment-preview {
    font-size: 12px;

    color: #656a74;
}

.file-chip {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 8px;

    background: #f1f2f4;

    margin:
        0 4px
        4px 0;
}

.footer-note {
    text-align: center;

    font-size: 11px;

    color: #8b9098;

    padding-top: 9px;
}


/* ===================================================== */
/* MOBILE                                                */
/* ===================================================== */

@media(max-width: 760px) {

    .sidebar {
        position: fixed;

        left: -285px;
        top: 0;
        bottom: 0;

        z-index: 50;

        transition: .25s;
    }

    .sidebar.open {
        left: 0;
    }

    .menu-button {
        display: block;
    }

    .topbar {
        padding:
            0 10px;
    }

    .mode-switch {
        transform:
            scale(.9);
    }

    .starter-grid {
        grid-template-columns:
            1fr;
    }

    .welcome h1 {
        font-size: 25px;
    }

}



/* ===================================================== */
/* MODEL STATUS                                          */
/* ===================================================== */

.model-meta {
    margin-top: 10px;

    padding-top: 7px;

    border-top:
        1px solid #eceef1;

    font-size: 11px;

    color: #8a8f98;

    letter-spacing: .01em;
}




/* ===================================================== */

.brand-logo {
    padding: 0;
    overflow: hidden;
    background: none;
}

.lexi2-logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
}


.welcome-logo-image {
    padding: 0;
    overflow: hidden;
    background: none;
}

.welcome-logo-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 21px;
}




/* ===================================================== */

.brand-mark.brand-logo {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 14px;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lexi2-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 14px;
}

.welcome-logo.welcome-logo-image {
    width: 96px;
    height: 96px;
    padding: 0;
    margin: 0 auto 22px;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
}

.welcome-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 24px;
}


/* ===================================================== */

.brand-mark.brand-logo {
    width: 58px !important;
    height: 58px !important;

    padding: 0 !important;

    background: transparent !important;

    border-radius: 16px !important;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 6px 20px
        rgba(35, 95, 255, .22);
}

.brand-mark.brand-logo img,
.lexi2-logo-image {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;

    display: block;

    border-radius: 16px;
}


.welcome-logo.welcome-logo-image {
    width: 110px !important;
    height: 110px !important;

    padding: 0 !important;

    background: transparent !important;

    border-radius: 28px !important;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 12px 35px
        rgba(40, 90, 255, .20);
}


.welcome-logo.welcome-logo-image img {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;

    display: block;

    border-radius: 28px;
}


/* Slightly improve branding spacing */

.brand {
    gap: 14px;
}

.brand-name {
    font-size: 21px;
    font-weight: 800;
}

.brand-small {
    font-size: 12px;
}



/* ===================================================== */
/* LEXI² LOGO — CLEAN FINAL STYLES                       */
/* ===================================================== */

/* Keep normal sidebar background */
.sidebar {
    background: #111318 !important;
    background-image: none !important;
}

/* Keep main chat area white */
.main,
.chat-container,
.welcome {
    background-image: none !important;
}

/* Sidebar logo */
.brand-mark.brand-logo {
    width: 48px !important;
    height: 48px !important;

    min-width: 48px !important;

    padding: 0 !important;
    margin: 0 !important;

    border-radius: 12px !important;

    background: transparent !important;
    background-image: none !important;

    overflow: hidden !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-shadow: none !important;
}

.brand-mark.brand-logo img,
.lexi2-logo-image {
    width: 48px !important;
    height: 48px !important;

    max-width: 48px !important;
    max-height: 48px !important;

    object-fit: contain !important;

    display: block !important;

    border-radius: 12px !important;

    position: static !important;

    transform: none !important;
}

/* Centre welcome logo */
.welcome-logo.welcome-logo-image {
    width: 84px !important;
    height: 84px !important;

    padding: 0 !important;

    margin: 0 auto 20px !important;

    border-radius: 20px !important;

    background: transparent !important;
    background-image: none !important;

    overflow: hidden !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-shadow:
        0 8px 24px
        rgba(40, 80, 200, .15) !important;
}

.welcome-logo.welcome-logo-image img {
    width: 84px !important;
    height: 84px !important;

    max-width: 84px !important;
    max-height: 84px !important;

    object-fit: contain !important;

    display: block !important;

    position: static !important;

    transform: none !important;

    border-radius: 20px !important;
}

/* Prevent logo image from affecting layout */
.brand img,
.welcome img {
    float: none !important;
}

/* Normal welcome section */
.welcome {
    width: min(
        760px,
        calc(100% - 40px)
    ) !important;

    margin: auto !important;

    text-align: center !important;

    padding-bottom: 40px !important;
}

/* Normal chat container */
.chat-container {
    overflow-x: hidden !important;
}

