body {

    font-family: "Manrope", sans-serif;

    background-color: #122017;

    color: #f6f8f7;

    min-height: 100vh;

}



.flash {

    border-radius: 0.5rem;

    padding: 0.75rem 1rem;

    margin-bottom: 1rem;

    font-size: 0.95rem;

}



.flash-success {

    background-color: rgba(56, 224, 123, 0.15);

    border: 1px solid rgba(56, 224, 123, 0.3);

    color: #38e07b;

}



.flash-error {

    background-color: rgba(224, 56, 56, 0.15);

    border: 1px solid rgba(224, 56, 56, 0.25);

    color: #ff8383;

}



.btn-primary {

    background-color: #38e07b;

    color: #122017;

    font-weight: 700;

    border-radius: 0.75rem;

    padding: 0.75rem 1.5rem;

    transition: transform 0.2s ease, background-color 0.2s ease;

}



.btn-primary:hover {

    transform: translateY(-1px) scale(1.01);

    background-color: #2bc36a;

}



.btn-secondary {

    background-color: rgba(56, 224, 123, 0.2);

    color: #f6f8f7;

    font-weight: 600;

    border-radius: 0.75rem;

    padding: 0.75rem 1.25rem;

    transition: transform 0.2s ease, background-color 0.2s ease;

}



.btn-secondary:hover {

    transform: translateY(-1px) scale(1.01);

    background-color: rgba(56, 224, 123, 0.3);

}



.card {

    background-color: rgba(246, 248, 247, 0.05);

    border: 1px solid rgba(246, 248, 247, 0.1);

    border-radius: 1rem;

    padding: 1.5rem;

    backdrop-filter: blur(8px);

}



.table {

    width: 100%;

    border-collapse: collapse;

}



.table th,

.table td {

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    padding: 0.75rem 1rem;

}



.table th {

    text-align: left;

    font-weight: 700;

}



.status-badge {

    display: inline-flex;

    align-items: center;

    gap: 0.35rem;

    padding: 0.25rem 0.75rem;

    border-radius: 999px;

    font-size: 0.85rem;

}



.status-badge.active {

    background-color: rgba(56, 224, 123, 0.2);

    color: #38e07b;

}



.status-badge.blocked {

    background-color: rgba(224, 56, 56, 0.2);

    color: #ff8383;

}



.chat-window {

    height: 60vh;

    overflow-y: auto;

    border-radius: 1rem;

    border: 1px solid rgba(255, 255, 255, 0.1);

    padding: 1rem;

    background: rgba(18, 32, 23, 0.95);

}



.chat-message {

    margin-bottom: 1rem;

    line-height: 1.6;

}



.chat-message.user {

    text-align: right;

}



.chat-message.assistant {

    text-align: left;

}



.chat-message span {

    display: inline-block;

    padding: 0.75rem 1rem;

    border-radius: 1rem;

    background-color: rgba(56, 224, 123, 0.15);

}



.chat-message.user span {

    background-color: rgba(56, 224, 123, 0.35);

    color: #0f1b14;

}



.chat-message.assistant span {

    background-color: rgba(255, 255, 255, 0.08);

    color: #f6f8f7;

}



form .form-control {

    width: 100%;

    padding: 0.75rem 1rem;

    border-radius: 0.75rem;

    border: 1px solid rgba(255, 255, 255, 0.12);

    background-color: rgba(255, 255, 255, 0.05);

    color: inherit;

}



form .form-control:focus {

    outline: none;

    border-color: rgba(56, 224, 123, 0.7);

    box-shadow: 0 0 0 3px rgba(56, 224, 123, 0.2);

}



.grid {

    display: grid;

    gap: 1.5rem;

}



@media (min-width: 768px) {

    .grid-cols-2 {

        grid-template-columns: repeat(2, minmax(0, 1fr));

    }



    .grid-cols-3 {

        grid-template-columns: repeat(3, minmax(0, 1fr));

    }

}



.table-responsive {

    overflow-x: auto;

}

.chat-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(260px, 320px) 1fr;
    align-items: stretch;
}

@media (max-width: 960px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        order: 2;
    }

    .chat-main {
        order: 1;
    }
}

.chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 75vh;
}

.chat-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}


.chat-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 224, 123, 0.35) transparent;
}

.chat-list::-webkit-scrollbar {
    width: 8px;
}

.chat-list::-webkit-scrollbar-track {
    background: rgba(246, 248, 247, 0.05);
    border-radius: 999px;
}

.chat-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 224, 123, 0.7), rgba(56, 224, 123, 0.45));
    border-radius: 999px;
    border: 2px solid rgba(246, 248, 247, 0.05);
}

.chat-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(56, 224, 123, 0.85), rgba(56, 224, 123, 0.6));
}

.chat-list__item,
.chat-list__item--draft {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
    background: rgba(246, 248, 247, 0.04);
    border: 1px solid rgba(246, 248, 247, 0.08);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    color: inherit;
}

.chat-list__item {
    cursor: pointer;
}

.chat-list__item:hover {
    background: rgba(56, 224, 123, 0.12);
    border-color: rgba(56, 224, 123, 0.4);
    transform: translateY(-1px);
}

.chat-list__item.active,
.chat-list__item--draft.active {
    background: rgba(56, 224, 123, 0.18);
    border-color: rgba(56, 224, 123, 0.5);
}

.chat-list__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #f6f8f7;
}

.chat-list__preview {
    font-size: 0.82rem;
    color: rgba(246, 248, 247, 0.75);
    line-height: 1.35;
}

.chat-list__meta {
    font-size: 0.75rem;
    color: rgba(246, 248, 247, 0.55);
}

.chat-list__empty {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(246, 248, 247, 0.6);
    padding: 2rem 0.5rem;
}

.chat-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 70vh;
}

.chat-main__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.chat-main__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.chat-main__subtitle {
    font-size: 0.85rem;
    color: rgba(246, 248, 247, 0.6);
}

.chat-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(56, 224, 123, 0.2);
    color: #38e07b;
}

.chat-window.enhanced {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.85rem;
    border: 1px solid rgba(246, 248, 247, 0.05);
}

.chat-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: rgba(246, 248, 247, 0.65);
    line-height: 1.6;
}

.chat-empty strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.chat-bubble {
    display: inline-block;
    max-width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.chat-bubble--user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(56, 224, 123, 0.85), rgba(56, 224, 123, 0.65));
    color: #0f1b14;
}

.chat-bubble--assistant {
    align-self: flex-start;
    background: rgba(246, 248, 247, 0.08);
    border: 1px solid rgba(246, 248, 247, 0.1);
    color: #f6f8f7;
}

.chat-bubble--assistant p {
    margin: 0 0 0.65rem;
}

.chat-bubble--assistant p:last-child {
    margin-bottom: 0;
}

.chat-message__timestamp {
    font-size: 0.75rem;
    color: rgba(246, 248, 247, 0.45);
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-form__controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-form__input {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-form__textarea {
    position: relative;
    display: flex;
    flex-direction: column;
}

.chat-form__textarea textarea {
    min-height: 140px;
    padding-right: 4.75rem;
    resize: vertical;
    line-height: 1.6;
    font-size: 0.95rem;
}

.chat-form__submit {
    align-self: flex-end;
    margin-top: 0.75rem;
}

@media (min-width: 960px) {
    .chat-form__controls {
        flex-direction: row;
        align-items: flex-end;
        gap: 1.25rem;
    }

    .chat-form__model {
        width: 220px;
    }

    .chat-form__input {
        flex: 1;
    }

    .chat-form__textarea {
        padding-bottom: 0.25rem;
    }

    .chat-form__textarea textarea {
        min-height: 170px;
    }

    .chat-form__submit {
        position: absolute;
        right: 0.75rem;
        bottom: 0.75rem;
        margin-top: 0;
    }
}
/* Custom scrollbar styles */
.chat-window::-webkit-scrollbar {
    width: 8px;
}

.chat-window::-webkit-scrollbar-track {
    background: rgba(246, 248, 247, 0.05);
    border-radius: 4px;
}

.chat-window::-webkit-scrollbar-thumb {
    background: rgba(56, 224, 123, 0.3);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.chat-window::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 224, 123, 0.5);
}

/* Firefox scrollbar */
.chat-window {
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 224, 123, 0.3) rgba(246, 248, 247, 0.05);
}

