* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

header {
    background: #111827;
    color: white;
    padding: 28px 24px;
}

.header-content {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 28px;
}

header p {
    margin: 8px 0 0;
    color: #cbd5e1;
}

.status-badge,
.active-badge {
    background: #dcfce7;
    color: #166534;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

main {
    max-width: 1100px;
    margin: auto;
    padding: 40px 24px;
    min-height: calc(100vh - 190px);
}

.section-heading h2 {
    margin-bottom: 6px;
}

.section-heading p {
    color: #6b7280;
    margin-top: 0;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.agent-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.agent-card h3 {
    margin-top: 0;
}

.agent-card p {
    color: #6b7280;
    line-height: 1.5;
}

.capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 18px 0;
}

.capability {
    background: #eef2ff;
    color: #3730a3;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.open-agent-button,
#send-button {
    border: none;
    background: #2563eb;
    color: white;
    padding: 11px 16px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: bold;
}

.open-agent-button:hover,
#send-button:hover {
    background: #1d4ed8;
}

.hidden {
    display: none;
}

.message {
    margin-top: 25px;
    color: #6b7280;
}

.back-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #2563eb;
    margin-bottom: 20px;
    padding: 0;
    font-size: 15px;
}

.chat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.chat-header {
    padding: 22px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    margin: 0;
}

.chat-header p {
    margin: 6px 0 0;
    color: #6b7280;
}

.chat-messages {
    padding: 24px;
    min-height: 280px;
    max-height: 480px;
    overflow-y: auto;
    background: #fafafa;
}

.agent-message,
.user-message {
    max-width: 80%;
    padding: 13px 15px;
    margin-bottom: 14px;
    border-radius: 10px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.agent-message {
    background: #e5e7eb;
}

.user-message {
    background: #2563eb;
    color: white;
    margin-left: auto;
}

.example-prompts {
    padding: 14px 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-prompt {
    border: 1px solid #d1d5db;
    background: white;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

#chat-form {
    padding: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

#prompt-input {
    flex: 1;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 12px;
    font-family: inherit;
}

#send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

footer {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 13px;
}

@media (max-width: 650px) {

    .header-content {
        align-items: flex-start;
        gap: 20px;
    }

    .status-badge {
        display: none;
    }

    #chat-form {
        flex-direction: column;
        align-items: stretch;
    }

    .agent-message,
    .user-message {
        max-width: 95%;
    }
}
