/* ===== E-SIC STYLES ===== */

/* Variables */
:root {
    --esic-primary: #2c5aa0;
    --esic-secondary: #1e3d72;
    --esic-success: #28a745;
    --esic-warning: #ffc107;
    --esic-danger: #dc3545;
    --esic-info: #17a2b8;
    --esic-light: #f8f9fa;
    --esic-dark: #343a40;
    --esic-border: #dee2e6;
    --esic-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --esic-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* ===== VALIDAÇÃO DE FORMULÁRIOS ===== */
.form-control.is-valid {
    border-color: var(--esic-success) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38 3.02-3.02.94.94L2.97 8.84z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-control.is-invalid {
    border-color: var(--esic-danger) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4m0-2.4L5.8 7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-control:focus.is-valid {
    border-color: var(--esic-success) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-control:focus.is-invalid {
    border-color: var(--esic-danger) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Contador de caracteres */
#contador-resposta {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

#contador-resposta .text-danger {
    color: var(--esic-danger) !important;
    font-weight: 600;
}

#contador-resposta .text-success {
    color: var(--esic-success) !important;
    font-weight: 600;
}

#contador-resposta .text-muted {
    color: #6c757d !important;
}

/* Animação para campos de validação */
.form-control.is-valid,
.form-control.is-invalid {
    transition: all 0.3s ease;
}

/* Estilos para o histórico de movimentações */
.movimentacao-item {
    border-left: 4px solid #dee2e6 !important;
    padding-left: 15px !important;
    margin-bottom: 15px !important;
    transition: all 0.3s ease !important;
}

/* Regras mais específicas para garantir aplicação */
.card-body .timeline .movimentacao-item {
    border-left: 4px solid #dee2e6 !important;
    padding-left: 15px !important;
    margin-bottom: 15px !important;
    border-radius: 0.375rem !important;
}

.card-body .timeline .movimentacao-item.resposta {
    border-left-color: #28a745 !important;
    background-color: #f8fff9 !important;
}

.card-body .timeline .movimentacao-item.em-andamento {
    border-left-color: #ffc107 !important;
    background-color: #fffdf5 !important;
}

.card-body .timeline .movimentacao-item.finalizada {
    border-left-color: #007bff !important;
    background-color: #f8fbff !important;
}

.card-body .timeline .movimentacao-item.cancelada {
    border-left-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

.movimentacao-item.resposta {
    border-left-color: #28a745 !important;
    background-color: #f8fff9 !important;
}

.movimentacao-item.em-andamento {
    border-left-color: #ffc107 !important;
    background-color: #fffdf5 !important;
}

.movimentacao-item.finalizada {
    border-left-color: #007bff !important;
    background-color: #f8fbff !important;
}

.movimentacao-item.cancelada {
    border-left-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

/* Dropdown de mensagem */
.dropdown-mensagem {
    margin-top: 10px;
}

.dropdown-mensagem .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.dropdown-mensagem .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dropdown-mensagem .dropdown-menu {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    min-width: 300px;
}

.dropdown-mensagem .dropdown-item {
    padding: 0;
    border: none;
    background: none;
}

.mensagem-completa {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
}

.mensagem-completa:empty::before {
    content: "Nenhuma mensagem disponível";
    color: #6c757d;
    font-style: italic;
}

/* Ícones de status */
.status-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 8px;
    font-size: 12px;
    font-weight: bold;
}

.status-icon.resposta {
    background-color: #28a745;
    color: white;
}

.status-icon.em-andamento {
    background-color: #ffc107;
    color: #212529;
}

.status-icon.finalizada {
    background-color: #007bff;
    color: white;
}

.status-icon.cancelada {
    background-color: #dc3545;
    color: white;
}

/* Responsividade para o dropdown */
@media (max-width: 768px) {
    .dropdown-mensagem .dropdown-menu {
        max-width: 90vw;
        min-width: 250px;
    }
    
    .mensagem-completa {
        font-size: 0.8rem;
        padding: 10px;
    }
}

/* Melhorar aparência do textarea de resposta */
#resposta {
    min-height: 120px;
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

#resposta:focus {
    outline: none;
    border-color: var(--esic-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* ===== GENERAL STYLES ===== */
.esic-index-page,
.esic-create-page,
.esic-show-page,
.esic-sobre-page,
.esic-faq-page,
.esic-consultar-page {
    background-color: var(--esic-light);
    min-height: 100vh;
    padding: 3rem 0;
}

/* Melhor espaçamento para a página de criação */
.esic-create-page .container {
    padding: 0 2rem;
}

.esic-create-page .col-lg-8 {
    padding: 0 1.5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--theme-primary, var(--esic-primary)), var(--theme-secondary, var(--esic-secondary)));
    color: white;
    border-radius: 1rem;
    box-shadow: var(--esic-shadow-lg);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ===== CARDS ===== */
.info-card,
.form-card,
.hero-card,
.stats-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--esic-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover,
.form-card:hover,
.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--esic-shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--theme-primary, var(--esic-primary)), var(--theme-secondary, var(--esic-secondary)));
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 2.5rem;
}

/* Espaçamento específico para o formulário de criação */
.esic-create-page .form-card {
    padding: 2rem;
    margin: 0 1rem 2rem 1rem;
}

.esic-create-page .form-card .card-body {
    padding: 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--theme-primary, var(--esic-primary)), var(--theme-secondary, var(--esic-secondary)));
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-actions .btn {
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ===== STATISTICS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-item {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--esic-shadow);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    color: var(--esic-primary);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--esic-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--esic-dark);
    font-weight: 500;
}

/* ===== QUICK LINKS ===== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.quick-link-item {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--esic-shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-link-item:hover {
    transform: translateY(-5px);
    border-color: var(--esic-primary);
    color: inherit;
    text-decoration: none;
}

.quick-link-icon {
    font-size: 3rem;
    color: var(--esic-primary);
    margin-bottom: 1rem;
}

.quick-link-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--esic-dark);
}

.quick-link-description {
    color: #6c757d;
    margin-bottom: 0;
}

/* ===== FORMS ===== */
.form-section {
    margin-bottom: 3rem;
    padding: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--esic-border);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.75rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--esic-primary);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--esic-primary);
}

.form-label.required::after {
    content: " *";
    color: var(--esic-danger);
}

.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 2px solid var(--esic-border);
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Espaçamento específico para grupos de campos */
.esic-create-page .row .col-md-8,
.esic-create-page .row .col-md-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.esic-create-page .mb-3 {
    margin-bottom: 1.5rem !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--esic-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-check-input:checked {
    background-color: var(--esic-primary);
    border-color: var(--esic-primary);
}

.terms-box {
    background: var(--esic-light);
    padding: 2rem;
    margin: 1rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--esic-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-actions {
    text-align: center;
    padding: 2.5rem 2rem;
    margin: 1rem;
    border-top: 1px solid var(--esic-border);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.75rem;
}

.form-actions .btn {
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Tablets e telas médias */
@media (max-width: 992px) {
    .esic-create-page .container {
        padding: 0 1rem;
    }
    
    .esic-create-page .col-lg-8 {
        padding: 0 0.5rem;
    }
    
    .form-section {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        padding: 1.5rem;
    }
    
    .page-header {
        padding: 2rem 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

/* Smartphones */
@media (max-width: 768px) {
    .esic-create-page {
        padding: 1.5rem 0;
    }
    
    .esic-create-page .container {
        padding: 0 0.5rem;
    }
    
    .esic-create-page .col-lg-8 {
        padding: 0;
    }
    
    .form-section {
        margin-left: 0;
        margin-right: 0;
        padding: 1rem;
        border-radius: 0.5rem;
    }
    
    .page-header {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.875rem 1rem;
    }
    
    .terms-box {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .form-actions {
        padding: 2rem 1rem;
        margin: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .esic-create-page .row .col-md-8,
    .esic-create-page .row .col-md-4 {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Telas muito pequenas */
@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .form-section {
        padding: 0.75rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

/* ===== STATUS BADGES ===== */
.status-badge {
    text-align: right;
}

.badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.badge-pendente {
    background-color: var(--esic-warning);
    color: var(--esic-dark);
}

.badge-em_analise {
    background-color: var(--esic-info);
    color: white;
}

.badge-respondida {
    background-color: var(--esic-success);
    color: white;
}

.badge-negada {
    background-color: var(--esic-danger);
    color: white;
}

.badge-finalizacao_solicitada {
    background-color: #ff9800;
    color: white;
}

.badge-finalizada {
    background-color: #6c757d;
    color: white;
}

/* ===== INFO ITEMS ===== */
.info-item {
    margin-bottom: 1rem;
}

.info-item label {
    font-weight: 600;
    color: var(--esic-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.info-item span {
    color: #6c757d;
}

.description-content {
    background: var(--esic-light);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--esic-primary);
    margin-top: 0.5rem;
}

/* ===== RESPONSE CARD ===== */
.response-card {
    border-left: 4px solid var(--esic-success);
}

.response-meta {
    background: var(--esic-light);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.response-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--esic-border);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 20px;
    width: 2px;
    height: calc(100% + 10px);
    background-color: #dee2e6;
}

.timeline-marker {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-content {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

/* Estilos para a interface simplificada de comunicação */
.communication-history {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.message-item {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
}

.message-item.message-ouvidor {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.message-item.message-cidadao {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.message-header {
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
}

.message-text.alert {
    margin-bottom: 0;
    padding: 10px;
    font-weight: 500;
}

/* Estilos para mensagens destacadas sem usar Bootstrap .alert */
.message-text.message-success {
    margin-bottom: 0;
    padding: 10px;
    font-weight: 500;
    background-color: #d1e7dd; /* similar ao alert-success */
    border: 1px solid #badbcc;
    color: #0f5132;
    border-radius: 6px;
}

.message-text.message-info {
    margin-bottom: 0;
    padding: 10px;
    font-weight: 500;
    background-color: #cff4fc; /* similar ao alert-info */
    border: 1px solid #b6effb;
    color: #055160;
    border-radius: 6px;
}

.message-text.message-warning {
    margin-bottom: 0;
    padding: 10px;
    font-weight: 500;
    background-color: #fff3cd; /* similar ao alert-warning */
    border: 1px solid #ffecb5;
    color: #664d03;
    border-radius: 6px;
}

.message-attachments {
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.communication-form {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.communication-form .form-label {
    color: #495057;
    margin-bottom: 8px;
}

.communication-form textarea {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out;
}

.communication-form textarea:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.form-check-label {
    font-size: 14px;
    color: #495057;
}

.form-check-input:checked {
    background-color: #2196f3;
    border-color: #2196f3;
}

.no-communication {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px 20px;
}

/* Badges personalizados */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.badge.bg-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Controles de Ordenação */
.btn-group .btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
    transition: all 0.3s ease;
}

.btn-group .btn-outline-primary:hover,
.btn-group .btn-outline-primary.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    transform: scale(1.05);
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .communication-form {
        padding: 1rem;
    }
    
    .message-item {
        padding: 0.75rem;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-item {
    animation: fadeIn 0.3s ease-out;
}

/* Scroll suave para o histórico */
#historico-comunicacao {
    scroll-behavior: smooth;
}

/* Transições para reordenação */
#historico-comunicacao {
    transition: opacity 0.2s ease;
}

/* Melhorias visuais para alertas */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3d9a4 100%);
    color: #0f5132;
}

.alert-info {
    background: linear-gradient(135deg, #cff4fc 0%, #9eeaf9 100%);
    color: #055160;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffecb5 100%);
    color: #664d03;
}

/* Estilo para cards de ações rápidas */
.card .d-grid .btn {
    margin-bottom: 8px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card .d-grid .btn:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.card-body {
    padding: 2.5rem;
}

/* Espaçamento específico para o formulário de criação */
.esic-create-page .form-card {
    padding: 2rem;
    margin: 0 1rem 2rem 1rem;
}

.esic-create-page .form-card .card-body {
    padding: 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--theme-primary, var(--esic-primary)), var(--theme-secondary, var(--esic-secondary)));
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-actions .btn {
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ===== STATISTICS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-item {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--esic-shadow);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    color: var(--esic-primary);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--esic-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--esic-dark);
    font-weight: 500;
}

/* ===== QUICK LINKS ===== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.quick-link-item {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--esic-shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-link-item:hover {
    transform: translateY(-5px);
    border-color: var(--esic-primary);
    color: inherit;
    text-decoration: none;
}

.quick-link-icon {
    font-size: 3rem;
    color: var(--esic-primary);
    margin-bottom: 1rem;
}

.quick-link-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--esic-dark);
}

.quick-link-description {
    color: #6c757d;
    margin-bottom: 0;
}

/* ===== FORMS ===== */
.form-section {
    margin-bottom: 3rem;
    padding: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--esic-border);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.75rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--esic-primary);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--esic-primary);
}

.form-label.required::after {
    content: " *";
    color: var(--esic-danger);
}

.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 2px solid var(--esic-border);
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Espaçamento específico para grupos de campos */
.esic-create-page .row .col-md-8,
.esic-create-page .row .col-md-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.esic-create-page .mb-3 {
    margin-bottom: 1.5rem !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--esic-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-check-input:checked {
    background-color: var(--esic-primary);
    border-color: var(--esic-primary);
}

.terms-box {
    background: var(--esic-light);
    padding: 2rem;
    margin: 1rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--esic-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-actions {
    text-align: center;
    padding: 2.5rem 2rem;
    margin: 1rem;
    border-top: 1px solid var(--esic-border);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.75rem;
}

.form-actions .btn {
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Tablets e telas médias */
@media (max-width: 992px) {
    .esic-create-page .container {
        padding: 0 1rem;
    }
    
    .esic-create-page .col-lg-8 {
        padding: 0 0.5rem;
    }
    
    .form-section {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        padding: 1.5rem;
    }
    
    .page-header {
        padding: 2rem 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

/* Smartphones */
@media (max-width: 768px) {
    .esic-create-page {
        padding: 1.5rem 0;
    }
    
    .esic-create-page .container {
        padding: 0 0.5rem;
    }
    
    .esic-create-page .col-lg-8 {
        padding: 0;
    }
    
    .form-section {
        margin-left: 0;
        margin-right: 0;
        padding: 1rem;
        border-radius: 0.5rem;
    }
    
    .page-header {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.875rem 1rem;
    }
    
    .terms-box {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .form-actions {
        padding: 2rem 1rem;
        margin: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .esic-create-page .row .col-md-8,
    .esic-create-page .row .col-md-4 {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Telas muito pequenas */
@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .form-section {
        padding: 0.75rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

/* ===== STATUS BADGES ===== */
.status-badge {
    text-align: right;
}

.badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.badge-pendente {
    background-color: var(--esic-warning);
    color: var(--esic-dark);
}

.badge-em_analise {
    background-color: var(--esic-info);
    color: white;
}

.badge-respondida {
    background-color: var(--esic-success);
    color: white;
}

.badge-negada {
    background-color: var(--esic-danger);
    color: white;
}

/* ===== INFO ITEMS ===== */
.info-item {
    margin-bottom: 1rem;
}

.info-item label {
    font-weight: 600;
    color: var(--esic-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.info-item span {
    color: #6c757d;
}

.description-content {
    background: var(--esic-light);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--esic-primary);
    margin-top: 0.5rem;
}

/* ===== RESPONSE CARD ===== */
.response-card {
    border-left: 4px solid var(--esic-success);
}

.response-meta {
    background: var(--esic-light);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.response-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--esic-border);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--esic-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item.active .timeline-marker {
    background: var(--esic-primary);
    border-color: var(--esic-primary);
}

.timeline-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--esic-border);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--esic-border);
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--esic-primary);
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-content small {
    color: #6c757d;
}

.timeline-simple .timeline-item {
    background: var(--esic-light);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--esic-primary);
}

/* ===== PROCESS STEPS ===== */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 4rem;
    height: 4rem;
    background: var(--esic-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: var(--esic-shadow);
}

.step-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--esic-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #6c757d;
    margin-bottom: 0;
}

/* ===== ACTIONS SECTION ===== */
.actions-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--esic-border);
}

/* ===== INFO BOX ===== */
.info-box {
    background: var(--esic-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--esic-info);
}

.info-box h4 {
    color: var(--esic-primary);
    margin-bottom: 1rem;
}

.info-box ul {
    margin-bottom: 0;
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* ===== FAQ STYLES ===== */
.search-box {
    margin-bottom: 3rem;
}

.search-box .form-control {
    font-size: 1.1rem;
    padding: 1rem;
}

.faq-categories {
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--esic-shadow);
}

.category-card:hover,
.category-card.active {
    border-color: var(--esic-primary);
    transform: translateY(-5px);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--esic-primary);
    margin-bottom: 1rem;
}

.category-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--esic-dark);
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #6c757d;
    margin-bottom: 0;
}

.faq-section {
    margin-bottom: 3rem;
}

.faq-section .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.accordion-button {
    font-weight: 600;
    color: var(--esic-dark);
    background-color: var(--esic-light);
    border: none;
    border-radius: 0.5rem !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--esic-primary);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.accordion-body {
    background: white;
    border-radius: 0 0 0.5rem 0.5rem;
}

.help-section {
    margin-top: 4rem;
}

.help-card {
    background: linear-gradient(135deg, var(--esic-primary), var(--esic-secondary));
    color: white;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
}

.help-card h3 {
    margin-bottom: 1rem;
}

.contact-option,
.contact-item {
    text-align: center;
    padding: 1rem;
}

.contact-option i,
.contact-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-option h4,
.contact-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ===== LISTS ===== */
.list-styled li {
    margin-bottom: 0.5rem;
}

/* ===== INFO BOX ===== */
.info-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    margin: 1rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--esic-info);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-box h4 {
    color: var(--esic-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.info-box ul {
    margin-bottom: 0;
}

.info-box li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.info-box li:last-child {
    margin-bottom: 0;
}

/* Responsivo para info-box */
@media (max-width: 768px) {
    .info-box {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .info-box h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
}

.rights-list li,
.duties-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.rights-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--esic-success);
    font-weight: bold;
}

.duties-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--esic-primary);
    font-weight: bold;
}

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
    background: var(--esic-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 2px solid var(--esic-primary);
    text-align: center;
}

.highlight-box h4 {
    color: var(--esic-primary);
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .form-actions .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
    }
}

/* ===== E-SIC PUBLIC INDEX PAGE STYLES ===== */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

.stat-label {
    font-size: 0.9rem;
    margin: 0;
}

.step-icon {
    margin-bottom: 1rem;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ===== SISTEMA DE CHAT/MENSAGENS ===== */
.chat-messages {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease;
}

.message-sent {
    margin-left: 2rem;
}

.message-received {
    margin-right: 2rem;
}

.message-content {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message-sent .message-content {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 1px solid #bbdefb;
}

.message-received .message-content {
    background: linear-gradient(135deg, #f1f8e9, #fff3e0);
    border: 1px solid #c8e6c9;
}

.message-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.message-author {
    font-size: 0.9rem;
    color: #495057;
}

.message-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #212529;
    word-wrap: break-word;
}

.message-attachments {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.message-attachments .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.no-messages {
    color: #6c757d;
    font-style: italic;
}

.chat-form {
    border-top: 2px solid #e9ecef;
    padding-top: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.chat-form .form-control:focus {
    border-color: var(--esic-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.chat-form .btn-primary {
    background: linear-gradient(135deg, var(--esic-primary), var(--esic-secondary));
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.chat-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(44, 90, 160, 0.3);
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badges para canais de comunicação */
.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
    color: #212529 !important;
}

/* Scrollbar personalizada para área de mensagens */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsividade para mensagens */
@media (max-width: 768px) {
    .message-sent {
        margin-left: 0.5rem;
    }
    
    .message-received {
        margin-right: 0.5rem;
    }
    
    .message-content {
        padding: 0.75rem;
    }
    
    .chat-form {
        padding: 1rem;
    }
    
    .chat-messages {
        max-height: 300px !important;
    }
}

/* Estilo para dispositivos móveis */
@media (max-width: 768px) {
    .draggable-header {
        cursor: default;
    }
    
    .draggable-header::before {
        display: none;
    }
    
    .draggable-header .modal-title {
        padding-left: 0;
    }
}

/* ===== ESTILOS ESPECÍFICOS PARA A VIEW DO CIDADÃO ===== */

/* Card de comunicação do cidadão */
.communication-card {
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.communication-card .card-header {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem;
}

/* Formulário de comunicação do cidadão */
.communication-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.communication-form h6 {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 1rem;
}

.communication-history {
    margin-top: 2rem;
}

.communication-history h6 {
    color: #333;
    font-weight: 600;
}

/* Estilos para mensagens na view do cidadão */
.message-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.message-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.message-item.mensagem_cidadao {
    border-left: 4px solid #2196f3;
    background: #f3f8ff;
}

.message-item.mensagem_ouvidor {
    border-left: 4px solid #4caf50;
    background: #f8fff8;
}

.message-item.resposta_oficial {
    border-left: 4px solid #ff9800;
    background: #fff8f0;
}

.message-content {
    width: 100%;
}

.message-header {
    margin-bottom: 0.75rem;
}

.message-text {
    color: #333;
    line-height: 1.6;
    word-wrap: break-word;
}

.message-attachments {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.message-attachments .btn {
    margin-top: 0.25rem;
}

/* Botões de ordenação para cidadão */
.btn-group .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.btn-group .btn.active {
    background-color: #1976d2;
    border-color: #1976d2;
    color: white;
}

.btn-group .btn:not(.active) {
    background-color: white;
    border-color: #1976d2;
    color: #1976d2;
}

.btn-group .btn:not(.active):hover {
    background-color: #e3f2fd;
    border-color: #1976d2;
    color: #1976d2;
}

/* Badges para canais de comunicação do cidadão */
.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
}

/* Mensagem vazia para cidadão */
.no-messages {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-messages i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsividade para view do cidadão */
@media (max-width: 768px) {
    .communication-form {
        padding: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .message-header small {
        margin-top: 0.25rem;
    }
}

/* Animações suaves para cidadão */
.communication-history {
    transition: opacity 0.3s ease;
}

.message-item {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias no formulário do cidadão */
.communication-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.communication-form .form-control:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

.communication-form .btn-primary {
    background-color: #1976d2;
    border-color: #1976d2;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.communication-form .btn-primary:hover {
    background-color: #1565c0;
    border-color: #1565c0;
}

/* ===== ESTILOS PARA FORMATO DE CHAT MODERNO ===== */

/* Chat Container */
.chat-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid #e3f2fd;
}

/* Chat Messages */
.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    scroll-behavior: smooth;
    border-top: 1px solid #e9ecef;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Chat Message */
.chat-message {
    display: flex;
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease-out;
}

/* Força cor branca para mensagens enviadas */
.chat-message.sent,
.chat-message.sent *,
.chat-message.sent .message-bubble,
.chat-message.sent .message-bubble *,
.chat-message.sent .message-content,
.chat-message.sent .message-header,
.chat-message.sent .sender-name,
.chat-message.sent .message-time {
    color: white !important;
}

.chat-message.sent {
    justify-content: flex-end;
}

.chat-message.received {
    justify-content: flex-start;
}

/* Message Bubble */
.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chat-message.sent .message-bubble {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white !important;
    border-bottom-right-radius: 6px;
}

.chat-message.sent .message-bubble * {
    color: white !important;
}

.chat-message.sent .message-content {
    color: white !important;
}

.chat-message.received .message-bubble {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 6px;
}

/* Message Header */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.sender-name {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.chat-message.sent .sender-name {
    color: rgba(255,255,255,0.9) !important;
}

.chat-message.sent .message-time {
    color: rgba(255,255,255,0.8) !important;
}

.chat-message.sent .message-header * {
    color: rgba(255,255,255,0.9) !important;
}

.chat-message.sent .message-channel {
    color: rgba(255,255,255,0.8) !important;
}

.chat-message.sent .badge {
    background-color: rgba(255,255,255,0.2) !important;
    color: white !important;
}

.chat-message.received .sender-name {
    color: #555;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Message Content */
.message-content {
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

/* Message Channel */
.message-channel {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Message Attachments */
.message-attachments {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.chat-message.received .message-attachments {
    border-top-color: rgba(0,0,0,0.1);
}

.attachment-link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.chat-message.sent .attachment-link {
    color: rgba(255,255,255,0.9);
}

.chat-message.sent .attachment-link:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

.chat-message.received .attachment-link {
    color: #555;
    background: rgba(0,0,0,0.05);
}

.chat-message.received .attachment-link:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

/* Chat Empty State */
.chat-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h6 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Chat Input */
.chat-input {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.chat-textarea {
    resize: none;
    border-radius: 20px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    min-height: 44px;
    max-height: 120px;
    overflow: hidden;
}

.chat-textarea:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.input-group-append .btn {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sendBtn {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

#sendBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

#attachBtn {
    border: 1px solid #ced4da;
    color: #6c757d;
    background: white;
}

#attachBtn:hover {
    background: #f8f9fa;
    border-color: #2196f3;
    color: #2196f3;
}

/* Chat Options */
.chat-options {
    margin-top: 0.75rem;
}

.chat-options .form-select,
.chat-options .btn {
    border-radius: 8px;
}

/* Chat Disabled */
.chat-disabled {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Character Counter Styles */
.char-counter {
    text-align: left;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

.char-counter small {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.char-counter #charCount {
    font-weight: 600;
    color: #495057;
}

.char-counter.warning #charCount {
    color: #fd7e14;
}

.char-counter.danger #charCount {
    color: #dc3545;
}

/* Enhanced Send Button Styles */
.btn-send {
    background: #007bff;
    border: 1px solid #007bff;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-send:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.btn-send:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-send:focus {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn-send i {
    font-size: 0.875rem;
}

.btn-send .btn-text {
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn-send:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* File List Styles */
.file-list {
    margin-top: 0.75rem;
}

.file-list-title {
    margin-bottom: 0.5rem;
}

.file-list-title small {
    font-weight: 500;
    color: #6c757d;
}

.selected-files {
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    transition: all 0.2s ease;
    border: 1px solid #e9ecef !important;
    background-color: #f8f9fa !important;
}

.file-item:hover {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
}

.file-item .file-name {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.file-item .file-name strong {
    color: #495057;
}

.file-item .remove-file {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-item .remove-file:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.05);
}

.selected-files::-webkit-scrollbar {
    width: 6px;
}

.selected-files::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.selected-files::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.selected-files::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Status Timeline Compacta */
.status-timeline {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e3f2fd;
}

.timeline-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.timeline-header h6 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.completed .step-icon {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.step.pending .step-icon {
    background: #e9ecef;
    color: #6c757d;
}

.step-content {
    max-width: 80px;
}

.step-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 0.25rem;
}

.step small {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Responsividade para Chat */
@media (max-width: 768px) {
    .chat-container {
        margin: 0 -15px 2rem -15px;
        border-radius: 0;
    }
    
    .chat-messages {
        max-height: 400px;
        padding: 0.75rem;
    }
    
    .message-bubble {
        max-width: 85%;
        padding: 0.5rem 0.75rem;
    }
    
    .chat-input {
        padding: 0.75rem;
    }
    
    .chat-textarea {
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .timeline-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        text-align: left;
        width: 100%;
        justify-content: flex-start;
    }
    
    .step-icon {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .step-content {
        max-width: none;
    }
}

/* Animações para Chat */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.step.completed .step-icon {
    animation: pulse 0.6s ease-out;
}