/* ------------------------------
   BASE
--------------------------------*/
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #333;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ------------------------------
   CABEÇALHO
--------------------------------*/
header {
    background: #1a2e3b;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

header h2 {
    margin: 5px 0 0;
    font-size: 16px;
    font-weight: 300;
}

/* ------------------------------
   CONTAINER PRINCIPAL
--------------------------------*/
main {
    max-width: 950px;
    margin: 30px auto;
    padding: 0 15px 40px;
}

/* ------------------------------
   CARDS DO INDEX
--------------------------------*/
.card-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.card {
    background: white;
    width: 280px;
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.card h3 {
    margin-top: 0;
    font-size: 20px;
    color: #1a2e3b;
}

.card p {
    font-size: 14px;
    margin-top: 10px;
}

.card.admin {
    border-left: 5px solid #007bff;
}

/* ------------------------------
   FORMULÁRIOS
--------------------------------*/
.form-card.sucesso
{
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
}
.form-card {
    background: white;
    padding: 25px 25px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex; 
    flex-direction: column; 
    gap: 15px;
}

.form-card h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1a2e3b;
}

.form-card p.descricao {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: bold;
}

textarea,
input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    margin-bottom: 15px;
    resize: vertical;
}

/* ------------------------------
   BOTÕES
--------------------------------*/
.btn {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.btn:hover {
    background: #0056b3;
}

.btn-secundario {
    background: #6c757d;
}

.btn-secundario:hover {
    background: #545b62;
}

/* ------------------------------
   MENSAGENS / CÓDIGO
--------------------------------*/
.info {
    margin-top: 15px;
    font-size: 14px;
}

.codigo-destaque {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 10px 0 20px;
}

/* ------------------------------
   TABELA ADMIN
--------------------------------*/
.tabela {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tabela th,
.tabela td {
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tabela th {
    background: #1a2e3b;
    color: white;
}

.tabela tr:nth-child(even) {
    background: #f9fafb;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.badge-pendente {
    background: #ffc107;
    color: #333;
}

.badge-respondida {
    background: #28a745;
}

/* ------------------------------
   LAYOUT ADMIN
--------------------------------*/
.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-top-bar h2 {
    margin: 0;
    color: #1a2e3b;
}

/* ------------------------------
   FOOTER
--------------------------------*/
footer {
    text-align: center;
    padding: 15px;
    background: #1a2e3b;
    color: white;
    font-size: 13px;
}

/* ------------------------------
   PAINEL DE ADMINISTRAÇÃO
--------------------------------*/
.painel-controles {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.painel-controles .filtros,
.painel-controles .acoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.painel-controles strong {
    font-size: 14px;
    margin-right: 5px;
}

/* ------------------------------
   TABELA RESPONSIVA
--------------------------------*/
.tabela-container {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .tabela th, .tabela td {
        font-size: 13px;
        padding: 8px;
    }

    .btn {
        font-size: 13px;
        padding: 8px 12px;
    }

    .painel-controles {
        flex-direction: column;
        align-items: flex-start;
    }

    .painel-controles .filtros,
    .painel-controles .acoes {
        flex-direction: column;
        align-items: flex-start;
    }
}

.paginacao {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.anexos-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    background: #f9f9f9;
}

.btn-anexo {
    display: inline-block; /* ← ESSENCIAL */
    text-align: center;
    padding: 10px 15px;
    background: #0077cc;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    height: fit-content;
}


.btn-anexo input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}


.btn-anexo:hover {
    background: #005fa3;
}

.btn-enviar { float: right; margin-top: 20px; }

.btn-enviar:hover {
    background: #1e7e34;
}

.btn-foto {
    position: relative;
    overflow: hidden;
}

.btn-foto input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.btn-input {
    position: relative;
    overflow: hidden;
}

.btn-input input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    pointer-events: all; /* ESSENCIAL */
}

.anexo-audio-bloco {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.audio-indicador {
    font-weight: bold;
    color: #0077cc;
    display: none;
}

.anexo-card {
    width: 100%;
    max-width: 300px; /* ou o valor que usas */
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 5px #0002;
    display: flex;
    flex-direction: column;
    align-items: center; /* centra horizontalmente */
    justify-content: center; /* centra verticalmente */
    text-align: center;
}

.anexo-card video,
.anexo-card audio {
    max-width: 100%;   /* nunca ultrapassa o card */
    height: auto;
    min-height: 4vh;
    display: block;
    margin: 0 auto 10px auto; /* centra horizontalmente */
}

.anexos-container {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.anexo-card {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    text-align: center;
    font-size: 13px;
}
.anexo-card img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    margin-bottom: 10px;
    object-fit: cover;
}
audio, video {
    width: 100%;
    margin-bottom: 10px;
}
.download-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}
.download-btn:hover {
    background: #0056b3;
}
.transcricao-btn {
    margin-top: 6px;
    padding: 6px 12px;
    font-size: 12px;
}
.transcricao-box {
    display: none;
    margin-top: 8px;
    text-align: left;
    background: #f4f6f8;
    padding: 10px;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .anexos-container {
        grid-template-columns: 1fr;
    }
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.chat-msg {
    max-width: 75%;
    padding: 12px 15px;
    border-radius: 12px;
    position: relative;
    font-size: 15px;
    line-height: 1.4;
}

.chat-left {
    align-self: flex-start;
    background: #f1f1f1;
    border-bottom-left-radius: 0;
}

.chat-right {
    align-self: flex-end;
    background: #d9ecff;
    border-bottom-right-radius: 0;
}

.chat-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

.topo-codigo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.botoes-final {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: baseline;
    justify-content: flex-end;
}

.btn-voltar,
.btn-enviar {
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-voltar {
    background: #ccc;
    color: #000;
}

.btn-voltar:hover {
    background: #bbb;
}

.btn-enviar {
    background: #007bff;
    color: #fff;
}

.btn-enviar:hover {
    background: #0069d9;
}

/* .header-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
} */

.logo-esquerda {
    height: 50px;
    flex-shrink: 0;
}

/* .titulos-centro {
    text-align: center;
    margin-left: 60vh;
    margin-right: 83vh;
} */

.botao-direita {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.texto-intro {
    max-width: 900px;
    margin: 0 auto 30px auto;
    text-align: justify;
    line-height: 1;
}

.texto-intro h2 {
    text-align: center;
    margin-bottom: 15px;
}

/* Layout desktop */
.header-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.col-2 {
    flex: 0 0 15%; /* equivalente a col-2 */
}

.col-10 {
    flex: 0.8; /* ocupa o resto */
}

.logo-esquerda {
    width: 100%;
    height: auto;
    max-width: 140px;
}

.titulos-centro h1,
.titulos-centro h2 {
    margin: 0;
}

/* ============================
   MOBILE (até 600px)
============================ */
@media (max-width: 600px) {

    .header-row {
        flex-direction: column;   /* empilha */
        text-align: center;       /* centra texto */
    }

    .col-2 {
        flex: none;               /* deixa de forçar largura */
    }

    .logo-esquerda {
        max-width: 100px;         /* imagem mais pequena */
        margin-bottom: 10px;
    }

    .titulos-centro h1 {
        font-size: 1.4rem;        /* título menor */
    }

    .titulos-centro h2 {
        font-size: 1rem;
    }
}

