.chat-shell {
    width: min(950px, calc(100% - 32px));
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.chat-header {
    padding: 22px 26px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.chat-kicker {
    margin: 0 0 6px;
    color: #93c5fd;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.chat-header h1 {
    margin: 0;
    font-size: 26px;
}

.status-pill {
    padding: 7px 12px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
}

.chat-window {
    min-height: 430px;
    max-height: 560px;
    overflow-y: auto;
    padding: 26px;
    background: #f8fafc;
}

.message-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: flex-start;
}

    .message-row.user {
        justify-content: flex-end;
    }

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1f2937;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}

.message-row.user .avatar {
    background: #2563eb;
}

.bubble {
    max-width: 70%;
    padding: 14px 16px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    line-height: 1.6;
    white-space: pre-wrap;
}

.message-row.user .bubble {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.bubble.error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.chat-form {
    padding: 18px;
    display: flex;
    gap: 12px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

    .chat-form textarea {
        flex: 1;
        resize: vertical;
        min-height: 58px;
        max-height: 150px;
        padding: 13px 14px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: 15px;
        font-family: inherit;
        outline: none;
    }

        .chat-form textarea:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        }

    .chat-form button {
        width: 110px;
        border: none;
        border-radius: 8px;
        background: #111827;
        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
    }

        .chat-form button:hover {
            background: #2563eb;
        }

@media (max-width: 700px) {
    .chat-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .bubble {
        max-width: 82%;
    }

    .chat-form {
        flex-direction: column;
    }

        .chat-form button {
            width: 100%;
            padding: 13px;
        }
}
