body {
    background-color: #f5f5f5;
}

.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
}

.table-responsive {
    overflow-x: auto;
}

.site-footer {
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    margin-top: 3rem;
    padding: 1.5rem 0;
}

.site-footer a {
    color: #495057;
    margin-left: 1rem;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #0d6efd;
    text-decoration: underline;
}

.legal-page {
    background: #fff;
    border: 1px solid #e3e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 0 auto;
    max-width: 960px;
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.legal-page header {
    border-bottom: 1px solid #e3e7eb;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.legal-page h1 {
    color: #17324d;
    font-weight: 700;
}

.legal-page h2 {
    color: #245b7a;
    font-size: 1.35rem;
    margin-top: 2rem;
}

.legal-page h3 {
    color: #34495e;
    font-size: 1.05rem;
    margin-top: 1.25rem;
}

.legal-page p,
.legal-page li {
    color: #3f4b56;
    line-height: 1.7;
}

.legal-page li+li {
    margin-top: 0.45rem;
}

.legal-page .effective-date {
    color: #6c757d;
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .site-footer a {
        margin-left: 0;
        margin-right: 1rem;
    }
}

.lead-chat {
    background: #f5f7f8;
    border: 1px solid #e8ecef;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    list-style: none;
    margin: 0 auto;
    max-width: 900px;
    min-height: 180px;
    padding: clamp(0.75rem, 2vw, 1.25rem);
}

.lead-chat__row {
    display: flex;
    margin: 0;
    width: 100%;
}

.lead-chat__row--patient {
    justify-content: flex-start;
}

.lead-chat__row--outgoing {
    justify-content: flex-end;
}

.lead-chat__bubble {
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(36, 50, 60, 0.08);
    max-width: min(78%, 44rem);
    min-width: 7rem;
    padding: 0.5rem 0.75rem 0.4rem;
}

.lead-chat__bubble--patient,
.lead-chat__bubble--other {
    background: #eceff1;
    border-bottom-left-radius: 0.3rem;
    color: #263238;
}

.lead-chat__bubble--staff {
    background: #e2f4e8;
    border-bottom-right-radius: 0.3rem;
    color: #21382a;
}

.lead-chat__bubble--ai {
    background: #e9edff;
    border-bottom-right-radius: 0.3rem;
    color: #2e3556;
}

.lead-chat__actor {
    color: #65717a;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.lead-chat__actor--ai {
    background: #dce3ff;
    border-radius: 999px;
    display: inline-block;
    color: #4a59a7;
    padding: 0.12rem 0.42rem;
}

.lead-chat__message {
    font-size: 0.925rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.lead-chat__footer {
    align-items: center;
    color: #738089;
    display: flex;
    font-size: 0.66rem;
    gap: 0.22rem;
    justify-content: flex-end;
    line-height: 1.2;
    margin-top: 0.28rem;
}

.lead-chat__footer time {
    margin-left: 0.18rem;
}

.lead-chat__date {
    align-items: center;
    color: #75818a;
    display: flex;
    font-size: 0.72rem;
    gap: 0.7rem;
    justify-content: center;
    margin: 0.35rem 0;
}

.lead-chat__date::before,
.lead-chat__date::after {
    border-top: 1px solid #dfe5e8;
    content: "";
    flex: 1;
}

.lead-chat__date span {
    background: #edf1f3;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
}

.lead-chat__event {
    display: flex;
    justify-content: center;
    margin: 0.1rem 0;
    width: 100%;
}

.lead-chat__event-notice {
    align-items: center;
    background: #e9eef0;
    border-radius: 0.65rem;
    color: #53636b;
    display: flex;
    flex-direction: column;
    font-size: 0.76rem;
    gap: 0.08rem;
    line-height: 1.35;
    max-width: 92%;
    padding: 0.3rem 0.75rem;
    text-align: center;
}

.lead-chat__event-notice strong {
    color: #43545d;
    font-size: 0.76rem;
    font-weight: 600;
}

.lead-chat__event-notice time {
    color: #849098;
    font-size: 0.64rem;
    margin-top: 0.05rem;
}

@media (max-width: 575.98px) {
    .lead-chat {
        border-radius: 0.75rem;
        padding: 0.7rem 0.55rem;
    }

    .lead-chat__bubble {
        max-width: 88%;
    }
}