.chat-body {
    background: radial-gradient(circle at top, #020617 0, #020617 60%, #000 100%);
}

.chat-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(16px);
    background: linear-gradient(to bottom,
        rgba(2, 6, 23, 0.96),
        rgba(2, 6, 23, 0.8),
        transparent
    );
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}
.chat-header-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chat-agent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.agent-name {
    font-size: 0.9rem;
    font-weight: 500;
}
.agent-status {
    font-size: 0.75rem;
    color: #22c55e;
}

.chat-main {
    min-height: calc(100vh - 64px);
    display: flex;
}
.chat-wrapper {
    max-width: 640px;
    width: 100%;
    margin: 1rem auto 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 55%),
                rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}
.chat-messages {
    flex: 1;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.chat-message {
    display: flex;
    margin-bottom: 0.25rem;
}
.chat-message.bot {
    justify-content: flex-start;
}
.chat-message.user {
    justify-content: flex-end;
}
.chat-bubble-inner {
    max-width: 80%;
    padding: 0.6rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}
.chat-message.bot .chat-bubble-inner {
    background: rgba(31, 41, 55, 0.95);
    border-bottom-left-radius: 0.25rem;
}
.chat-message.user .chat-bubble-inner {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border-bottom-right-radius: 0.25rem;
}

.chat-quick-replies {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.quick-reply-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    font-size: 0.85rem;
    cursor: pointer;
    color: #e5e7eb;
}
.quick-reply-btn:hover {
    border-color: #e5e7eb;
    background: rgba(15, 23, 42, 1);
}

.chat-form-wrapper {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.4);
}
.chat-form-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.form-row label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"] {
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    font-size: 0.9rem;
}
.form-row input:focus {
    outline: none;
    border-color: var(--accent);
}
.field-error {
    font-size: 0.8rem;
    color: var(--danger);
    min-height: 0.9rem;
}

.form-row-consent {
    margin-top: 0.25rem;
}
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.checkbox-label input {
    margin-top: 0.1rem;
}

.form-note {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hidden {
    display: none;
}

@media (max-width: 700px) {
    .chat-wrapper {
        margin: 0.5rem 0.75rem 1.25rem;
        padding: 1rem;
    }
}