/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header Styles - Enhanced */
header {
    background-color: #fff;
    transition: all 0.3s ease;
}

header a:hover {
    opacity: 0.9;
}

.btn-accessibility {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.btn-accessibility:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-info {
    color: #555;
}

.bg-success {
    background-color: #008F39 !important;
}

/* Animação suave para links */
a {
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

.logo-prefeitura, .logo-esic {
    height: 60px;
}

.accessibility {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.accessibility button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.accessibility button:hover {
    background-color: #f0f0f0;
}

/* Portal Title Section */
.portal-title {
    padding: 100px 0 30px;
    border-bottom: 1px solid #eee;
}

.title-container {
    position: relative;
    height: 100%;
}

.access-info {
    color: #FF8C00;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.portal-heading {
    font-size: 54px;
    font-weight: 700;
    color: #000;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.welcome-text {
    text-align: left;
    color: #666;
    font-size: 15px;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Adicionando alinhamento vertical */
.portal-title .row {
    align-items: center;
}

/* Main Content Styles */
main {
    padding: 60px 0 160px;
    background-color: #fff;
}

/* Adicionando uma classe específica para o card do formulário */
.form-card {
    border: none;
    overflow: hidden;
    position: relative;
    height: 100%;
}
.alert-info {
    font-size: 14px;
}


.main-card {
    background: linear-gradient(135deg, #008F39 0%, #064b22 100%);
    background-size: 200% 200%;
    background-position: 0% 0%;
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.main-card:hover {
    background-position: 100% 100%;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-card .card-body {
    padding: 2rem;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}


.card-tag {
    display: inline-block;
    font-size: 14px;
    margin-bottom: 10px;
    color: #FFA500;
    font-weight: 500;
}

.main-card h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.2;
}

.service-card {
    background-color: #f5f5f5;
    padding: 1rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-card .card-body {
    padding: 1.5rem;
    position: relative;
}

/* Estilos para a página de consulta de pedido */
.search-icon-circle {
    width: 80px;
    height: 80px;
    background-color: #f0f9f4;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.search-icon-circle i {
    font-size: 32px;
    color: #008F39;
}

.protocol-input-container {
    position: relative;
    margin-bottom: 10px;
}

.protocol-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
}

.protocol-input {
    height: 58px;
    padding-left: 45px;
    font-size: 18px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.protocol-input:focus {
    border-color: #008F39;
    box-shadow: 0 0 0 0.25rem rgba(0, 143, 57, 0.25);
}

@media (max-width: 768px) {
    .search-icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .search-icon-circle i {
        font-size: 24px;
    }
    
    .protocol-input {
        height: 50px;
        font-size: 16px;
    }
}

.service-card h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-bottom: 0;
}

.arrow-icon {
    position: absolute;
    color: #FF8C00;
    font-size: 18px;
}

.main-card .arrow-icon {
    top: 30px;
    right: 30px;
    font-size: 28px;
}

.service-card .arrow-icon {
    bottom: 20px;
    right: 20px;
}

/* Footer Styles */
footer {
    background-color: #424953;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 5px;
    font-size: 14px;
}

.social-media {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.social-media a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-media a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
}

/* High Contrast Mode */
.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

.high-contrast header,
.high-contrast .card,
.high-contrast .welcome-banner,
.high-contrast main {
    background-color: #000 !important;
    color: #fff !important;
}

.high-contrast .service-card {
    background-color: #333 !important;
    border: 1px solid #fff !important;
}

.high-contrast .icon-circle {
    background-color: #333 !important;
    border: 1px solid #fff !important;
}

.high-contrast a,
.high-contrast h1,
.high-contrast h2,
.high-contrast h3,
.high-contrast p,
.high-contrast .icon-circle i {
    color: #fff !important;
}

.high-contrast .main-card {
    background: #333 !important;
    background-image: none !important;
    border: 1px solid #fff !important;
}

.high-contrast .accessibility button {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #fff !important;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .social-media {
        justify-content: flex-start;
        margin-top: 20px;
    }
    
    .portal-heading {
        font-size: 44px;
    }
    
    .main-card h2 {
        font-size: 28px;
    }
    
    .service-card h3 {
        font-size: 17px;
    }
    
    /* Ajuste de layout para o card principal ocupar 100% da largura */
    .main-card {
        margin-bottom: 20px;
    }
    main {
        padding: 30px 0 30px;
    }
    .portal-title {
        padding: 30px 0 30px;
    }
}

@media (max-width: 768px) {
    .accessibility {
        justify-content: flex-start;
        margin-top: 15px;
    }
    
    .portal-heading {
        font-size: 32px;
    }
    
    .welcome-text {
        font-size: 14px;
    }
    
    .welcome-banner p {
        text-align: left;
    }
    
    .main-card h2 {
        font-size: 22px;
    }
    
    .service-card h3 {
        font-size: 15px;
    }
    
    .card-tag {
        font-size: 14px;
    }
    
    .icon-circle {
        width: 40px;
        height: 40px;
        margin-bottom: 20px;
    }
    
    .icon-circle i {
        font-size: 16px;
    }
    
    main {
        padding: 30px 0 30px;
    }
    
    .portal-title {
        padding: 30px 0 30px;
    }
    
    header .d-flex {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Mobile adjustments for consultation page */
    .consultation-message-content {
        font-size: 14px;
    }
    
    .consultation-attachment-name {
        font-size: 13px;
    }
    
    .consultation-attachment-meta {
        font-size: 11px;
    }
    
    .card-header h5 {
        font-size: 16px;
    }
    
    .card-header h6 {
        font-size: 15px;
    }
    
    .consultation-message .message-header h6 {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .portal-heading {
        font-size: 28px;
    }
    
    .access-info {
        font-size: 13px;
    }
    
    .main-card h2 {
        font-size: 20px;
    }
    
    .service-card h3 {
        font-size: 14px;
    }
    
    main {
        padding: 25px 0 25px;
    }
    
    .portal-title {
        padding: 25px 0 25px;
    }
    
    header .d-flex {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    /* Additional mobile adjustments for consultation page */
    .consultation-message {
        margin-bottom: 20px;
    }
    
    .consultation-message-icon {
        width: 32px;
        height: 32px;
    }
    
    .consultation-message-content {
        font-size: 13px;
        padding: 12px;
    }
    
    .consultation-attachment-item {
        padding: 8px 10px;
    }
    
    .consultation-attachment-icon {
        font-size: 16px;
        margin-right: 10px;
    }
    
    .consultation-attachment-name {
        font-size: 12px;
    }
    
    .consultation-attachment-meta {
        font-size: 10px;
    }
    
    .consultation-attachment-action {
        font-size: 14px;
        padding: 5px;
    }
    
    .timeline-icon {
        width: 36px;
        height: 36px;
    }
    
    .card-header {
        padding: 10px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        font-size: 14px;
        padding: 0.375rem 0.75rem;
        margin: 5px 0;
    }
    
    /* Ajuste para os botões de navegação em telas pequenas */
    .text-center.mb-5.mt-4 {
        flex-direction: column;
        align-items: center;
    }
    
    .text-center.mb-5.mt-4 .btn {
        width: 100%;
        margin: 5px 0;
    }
}

.main-card, .service-card {
    position: relative;
    cursor: pointer;
    border: none;
}

.main-card a, .service-card a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    
}

.main-card:hover, .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos para a página de solicitação enviada */
.success-icon-circle {
    width: 70px;
    height: 70px;
    background-color: #008F39;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.success-icon-circle i {
    font-size: 35px;
    color: white;
}

.success-title {
    font-size: 28px;
    color: #333;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.protocol-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.protocol-number {
    font-size: 26px;
    letter-spacing: 1px;
    word-break: break-all;
    font-weight: bold;
    color: #008F39;
    margin: 15px 0;
}

@media (max-width: 768px) {
    .success-title {
        font-size: 22px;
    }
    
    .protocol-box {
        padding: 1rem;
    }
    
    .protocol-number {
        font-size: 20px;
    }
}

/* Estilos para a página de resultado da consulta - Layout de Chat */
.consultation-message {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    max-width: 80%;
    clear: both;
}

.consultation-user-message {
    float: left;
    background: #f0f2f5;
    border-left: 3px solid #0d6efd;
    border-bottom-left-radius: 2px;
    margin-right: auto;
}

.consultation-admin-message {
    float: right;
    background: #e7f7ed;
    border-right: 3px solid #198754;
    border-bottom-right-radius: 2px;
    margin-left: auto;
}

/* Estilo para situação e status lado a lado */
.status-timeline .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 576px) {
    .status-timeline .d-flex.justify-content-between {
        flex-direction: column;
    }
}

.message-header {
    border-bottom: 1px solid #eee;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 10px 15px;
}

.consultation-message-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consultation-admin-message .consultation-message-icon {
    background-color: #d1e7dd;
    color: #008F39;
}

.consultation-user-message .consultation-message-icon {
    background-color: #e2e3e5;
    color: #41464b;
}

.consultation-message-content {
    padding: 12px 15px;
    line-height: 1.5;
}

.message-footer {
    border-top: 1px solid #eee;
    padding: 8px 15px;
    font-size: 12px;
    color: #6c757d;
}

/* Estilos para anexos nas mensagens */
.consultation-attachments { 
    padding: 0 15px 10px;
    margin-top: 0;
}

.consultation-attachments a {
    
    text-decoration: none;
    color: inherit;
}

.consultation-attachment-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    flex-wrap: nowrap;
    min-height: 45px;
    gap: 0;
    overflow: hidden;
}

.consultation-attachment-item:hover {
    background-color: #fff;
    border-color: #008F39;
    box-shadow: 0 2px 5px rgba(0, 143, 57, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.consultation-attachment-icon {
    font-size: 20px;
    margin-right: 15px;
    color: #6c757d;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.consultation-attachment-info {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px 0 0;
}

.consultation-attachment-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
    white-space: nowrap;      /* Não deixa quebrar linha */
    overflow: hidden;         /* Esconde o excesso */
    text-overflow: ellipsis;  /* Adiciona "..." se passar */
    max-width: 100%;          /* Garante que respeite o espaço */
    display: block;
}

.consultation-attachment-meta {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;      /* Não deixa quebrar linha */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.consultation-attachment-action {
    color: #008F39;
    font-size: 20px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto; /* Empurra o ícone para a direita */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.consultation-attachment-action i {
    display: block;
    margin: 0;
}

/* Correção para os botões de navegação */
.btn-nova-consulta,
.btn-voltar-inicio {
    display: block;
    width: 100%;
    text-align: center;
    margin: 8px 0;
    padding: 10px 15px;
}

/* Correção para o ícone da situação atual */
.timeline-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    background-color: #d1e7dd;
}

.timeline-icon i {
    font-size: 18px;
    color: #008F39;
}

.status-timeline {
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 15px;
    margin-bottom: 25px;
}

.status-timeline .d-flex {
    align-items: center;
}

@media (max-width: 576px) {
    /* Ajustes para botões em telas pequenas */
    .btn-nova-consulta,
    .btn-voltar-inicio {
        margin: 5px 0;
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* Ajustes para o ícone da situação em telas pequenas */
    .timeline-icon {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .timeline-icon i {
        font-size: 16px;
    }
    
    .status-timeline {
        padding: 12px;
        margin-bottom: 20px;
    }
}

/* Responsividade para chat */
@media (max-width: 768px) {
    .consultation-message {
        max-width: 90%;
    }
    
    .message-header {
        padding: 8px 12px;
    }
    
    .consultation-message-content {
        padding: 10px 12px;
    }
    
    .message-footer {
        padding: 6px 12px;
    }
    
    .consultation-message-icon {
        width: 28px;
        height: 28px;
    }
}

/* Estilos específicos para ícones da página inicial */
.index-icon-circle {
    width: 60px;
    height: 60px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.index-icon-circle i {
    font-size: 24px;
    color: #008F39;
}

/* Responsividade para ícones da página inicial */
@media (max-width: 768px) {
    .index-icon-circle {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .index-icon-circle i {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .index-icon-circle {
        width: 45px;
        height: 45px;
        margin-bottom: 12px;
    }
    
    .index-icon-circle i {
        font-size: 18px;
    }
}

/* Estilos para a página de telefones e endereços */
.section-title {
    color: #333;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.department-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.department-info p {
    margin-bottom: 12px;
    font-size: 15px;
}

.contact-info-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: 100%;
}

.contact-info-card h5 {
    font-weight: 600;
    color: #333;
}

.contact-info-card p {
    margin-bottom: 8px;
    font-size: 15px;
}

@media (max-width: 768px) {
    .department-title {
        font-size: 18px;
    }
    
    .department-info p {
        font-size: 14px;
    }
    
    .contact-info-card {
        padding: 15px;
    }
    
    .contact-info-card h5 {
        font-size: 16px;
    }
    
    .contact-info-card p {
        font-size: 14px;
    }
}
/* Estilos para a página de leis */
.law-icon-circle {
    width: 80px;
    height: 80px;
    background-color: #f0f9f4;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.law-icon-circle i {
    font-size: 32px;
    color: #008F39;
}

.law-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

.law-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.law-list {
    margin-top: 15px;
}

.law-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.law-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.law-icon {
    width: 50px;
    height: 50px;
    background-color: #f0f9f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.law-icon i {
    font-size: 20px;
    color: #008F39;
}

.law-content {
    flex-grow: 1;
}

.law-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.law-content p {
    color: #555;
    margin-bottom: 10px;
    font-size: 15px;
}

@media (max-width: 768px) {
    .law-icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .law-icon-circle i {
        font-size: 24px;
    }
    
    .law-intro p {
        font-size: 15px;
    }
    
    .law-section-title {
        font-size: 20px;
    }
    
    .law-item {
        flex-direction: column;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .law-icon {
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .law-content h4 {
        font-size: 16px;
    }
    
    .law-content p {
        font-size: 14px;
    }
}
/* Estilos para a página SIC Físico */
.sic-icon-circle {
    width: 80px;
    height: 80px;
    background-color: #f0f9f4;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.sic-icon-circle i {
    font-size: 32px;
    color: #008F39;
}

.info-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.info-section {
    margin-bottom: 30px;
}

.step-container {
    margin-top: 20px;
}

.step-item {
    display: flex;
    margin-bottom: 25px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: #008F39;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
}

.step-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.step-content p {
    margin-bottom: 0;
    color: #555;
}

.info-list {
    padding-left: 20px;
}

.info-list li {
    margin-bottom: 10px;
    color: #555;
}

@media (max-width: 768px) {
    .sic-icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .sic-icon-circle i {
        font-size: 24px;
    }
    
    .info-title {
        font-size: 18px;
    }
    
    .step-content h4 {
        font-size: 16px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}
/* Estilos para a página de confirmação */
.confirmation-icon {
    font-size: 80px;
    color: #28a745;
    margin-bottom: 20px;
}

.protocol-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.protocol-number {
    font-size: 28px;
    font-weight: 700;
    color: #008F39;
    letter-spacing: 2px;
}

.next-steps {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
}

.next-steps h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

.next-steps ul {
    padding-left: 20px;
}

.next-steps li {
    margin-bottom: 10px;
    color: #555;
}

/* Estilos para a página de estatísticas */
.section-title {
    color: #008F39;
    font-weight: 600;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.stat-icon {
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
}

.chart-container {
    margin-top: 1rem;
}

/* Estilos para tabelas nas estatísticas */
.table-responsive {
    margin-top: 20px;
    overflow-x: auto;
}

.table-stats {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table-stats th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-stats th, .table-stats td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table-stats tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-stats tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

@media print {
    .btn, .navbar, .portal-title, footer, form, .sidebar, header {
        display: none !important;
    }
    
    main {
        padding: 0 !important;
    }
    
    .card {
        break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        box-shadow: none !important;
    }
    
    .section-title {
        margin-top: 2rem !important;
    }
    
    .chart-container {
        height: 200px !important;
    }
    
    .table-responsive {
        overflow-x: visible;
    }
    
    body {
        padding: 20px;
        font-size: 12pt;
    }
    
    h2.section-title {
        font-size: 16pt;
        margin-top: 20px;
    }
    
    .card-title {
        font-size: 14pt;
    }
}
.chat-bubble {
    border-radius: 12px;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0.5rem 0 0.5rem;
}
.chat-user .chat-msg {
    background: #f8f9fa;
}
.chat-admin .chat-msg {
    background: #eafaf1;
    border-left: 4px solid #198754;
}
.chat-user {
    border-left: 4px solid #0d6efd;
}
.chat-admin {
    border-left: 4px solid #198754;
}

/* Melhorias para anexos em mensagens longas */
.consultation-attachment-item {
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.consultation-attachment-info {
    max-width: calc(100% - 70px); /* Espaço para ícones */
    overflow: hidden;
    flex: 1;
}

.consultation-message-content {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Corrigir alinhamento de anexos em mensagens do usuario */
.consultation-user-message .consultation-attachments {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Corrigir alinhamento de anexos em mensagens da administração */
.consultation-admin-message .consultation-attachments {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.consultation-attachment-item {
    text-align: left; /* Manter texto alinhado à esquerda para legibilidade */
    width: auto;
    max-width: 90%;
}

/* Ajustar data/hora das mensagens */
.message-header small {
    font-size: 11px;
    opacity: 0.8;
}

/* Ajustar espaçamento entre mensagens */
.consultation-message + .consultation-message {
    margin-top: 20px;
}

/* Limpar os floats após cada mensagem */
.card-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Garantir que o formulário e botões fiquem no final */
.card.mt-5.border-0.bg-light {
    clear: both;
    margin-top: 40px !important;
}

.text-center.mb-5.mt-4 {
    clear: both;
    padding-top: 20px;
}

/* Ajustar o container de mensagens para comportar os floats */
.card-body {
    overflow: hidden; /* Contém os floats */
    padding-bottom: 20px;
}

/* Melhorar a aparência do formulário */
.card.mt-5.border-0.bg-light .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card.mt-5.border-0.bg-light .card-body {
    background-color: #fff;
}

/* Ajustar os botões de navegação */
.text-center.mb-5.mt-4.d-flex {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

@media (max-width: 576px) {
    .text-center.mb-5.mt-4.d-flex {
        flex-direction: column;
    }
    
    .btn-nova-consulta,
    .btn-voltar-inicio {
        width: 100%;
    }
}
