/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #4B0082;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    color: #333;
}

/* ==================== LOGIN ==================== */
body.login-page {
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}

.container form {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 320px;
    text-align: center;
}

.container form h2 {
    margin-bottom: 20px;
    color: #4B0082;
}

.container form input {
    width: 100%;
    padding: 10px 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.container form button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #D8BFD8;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.container form button:hover {
    background-color: #9370DB;
}

/* ==================== TOPBAR ==================== */
.topbar {
    width: 100%;
    height: 50px;
    background-color: #3a0066;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.topbar-titulo {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}

.topbar-usuario {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.topbar-matricula {
    color: #D8BFD8;
    font-size: 11px;
    letter-spacing: 1px;
}

.topbar-nome {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.topbar-localidade {
    color: #D8BFD8;
    font-size: 11px;
    font-style: italic;
}

/* ==================== CORPO (abaixo da topbar) ==================== */
.corpo {
    display: flex;
    margin-top: 50px;
    height: calc(100vh - 50px);
    width: 100%;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 220px;
    height: 100%;
    background-color: #2d004d;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

/* ==================== NAV MENU ==================== */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 25px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-link.ativo {
    background-color: #D8BFD8;
    color: #fff;
    font-weight: bold;
}

.nav-logout {
    margin-top: auto;
    color: #ff6b6b;
}

.nav-logout:hover {
    background-color: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

/* ==================== SIDEBAR - LISTA DE USUÁRIOS ==================== */
.sidebar-usuarios {
    margin-top: 10px;
}

.sidebar-usuarios h3 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-usuarios ul {
    list-style: none;
}

.sidebar-usuarios li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    padding: 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.sidebar-usuarios li:hover {
    background-color: transparent;
}

/* ==================== LINK DE USUÁRIO NA SIDEBAR ==================== */
.link-usuario {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    transition: background-color 0.2s, color 0.2s;
}

.link-usuario:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.link-usuario.ativo {
    background-color: #D8BFD8;
    color: #fff;
    font-weight: 600;
}

.usuario-nome {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usuario-localidade {
    font-size: 11px;
    opacity: 0.7;
    font-weight: normal;
}

.usuario-ultima {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    white-space: nowrap;
}

.link-usuario.ativo .usuario-ultima {
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== BADGE DE MENSAGENS NÃO LIDAS ==================== */
.badge-nao-lida {
    background-color: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.3;
}

.link-usuario.ativo .badge-nao-lida {
    background-color: #c62828;
}

/* ==================== POPUP DE NOTIFICAÇÃO ==================== */
.notificacao-popup {
    position: fixed;
    top: 70px;
    right: -350px;
    width: 320px;
    background: linear-gradient(135deg, #4B0082 0%, #3a0066 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 14px 16px;
    cursor: pointer;
    transition: right 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 500;
}

.notificacao-popup.show {
    right: 20px;
    opacity: 1;
}

.notificacao-popup:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.notif-header strong {
    font-size: 14px;
    color: #fff;
}

.notif-hora {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.notif-reuniao {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
    font-weight: 600;
}

.notif-corpo {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.online {
    background-color: #4caf50;
}

.status-dot.offline {
    background-color: #666;
}

/* ==================== CHAT ==================== */
.chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    overflow: hidden;
}

.messages {
    flex: 1;
    background-color: #f9f9f9;
    border-radius: 0 0 10px 10px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== CABEÇALHO DA CONVERSA PRIVADA ==================== */
.chat-header {
    padding: 12px 18px;
    background-color: #3a0066;
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-info h2 {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.chat-header-status {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-left: auto;
}

/* ==================== MENSAGENS — BOLHAS PRIVADAS ==================== */
.mensagem {
    background: #fff;
    padding: 9px 13px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    max-width: 72%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mensagem.dele {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    background-color: #fff;
}

.mensagem.minha {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background-color: #ede5ff;
}

.mensagem b {
    color: #4B0082;
    font-size: 12px;
}

.mensagem .hora {
    color: #999;
    font-size: 10px;
    align-self: flex-end;
}

.mensagem.dele .hora {
    align-self: flex-start;
}

.mensagem p {
    font-size: 14px;
    margin: 0;
    color: #333;
    word-break: break-word;
}

/* ==================== TELA VAZIA DO CHAT ==================== */
.chat-vazio {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255,255,255,0.55);
    gap: 12px;
}

.chat-vazio-icone {
    font-size: 56px;
}

.chat-vazio h2 {
    color: #fff;
    font-size: 22px;
    margin: 0;
}

.chat-vazio p {
    font-size: 14px;
    max-width: 360px;
    margin: 0;
    line-height: 1.5;
}

/* ==================== FORM DE MENSAGEM ==================== */
.form-mensagem {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.form-mensagem input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-mensagem input[type="text"]:focus {
    border-color: #9370DB;
}

.form-mensagem button {
    padding: 10px 20px;
    background-color: #D8BFD8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.form-mensagem button:hover {
    background-color: #9370DB;
}

/* ==================== MAIN CONTENT (CADASTRO) ==================== */
.main-content {
    flex: 1;
    padding: 25px 30px;
    overflow-y: auto;
    height: 100%;
}

/* ==================== ALERTAS ==================== */
.alerta {
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alerta.sucesso {
    background-color: #e6f9ee;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alerta.erro {
    background-color: #fdecea;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ==================== SEÇÕES DE CADASTRO ==================== */
.cadastro-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.cadastro-section h2 {
    color: #4B0082;
    font-size: 18px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D8BFD8;
}

/* ==================== FORM GRID ==================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #fafafa;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #9370DB;
    background-color: #fff;
}

.cadastro-section > .form-group {
    max-width: 400px;
}

.cadastro-section button {
    margin-top: 20px;
    padding: 10px 24px;
    background-color: #D8BFD8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: auto;
    display: inline-block;
}

.cadastro-section button:hover {
    background-color: #9370DB;
}

/* ==================== TABELAS ==================== */
.tabela-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.tabela-section h2 {
    color: #4B0082;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D8BFD8;
}

.tabela-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead {
    background-color: #4B0082;
    color: #fff;
}

table thead th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s;
}

table tbody tr:hover {
    background-color: #f5f0ff;
}

table tbody td {
    padding: 10px 14px;
    color: #444;
}

.sem-dados {
    text-align: center;
    color: #999;
    padding: 20px !important;
    font-style: italic;
}

/* ==================== STATUS NA TABELA ==================== */
.status-online {
    color: #2e7d32;
    font-weight: 600;
}

.status-offline {
    color: #757575;
}

/* ==================== BOTÃO EDITAR NA TABELA ==================== */
.btn-editar {
    color: #fff;
    background-color: #7e57c2;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-editar:hover {
    background-color: #5e35b1;
}

.td-ações {
    display: flex;
    gap: 6px;
    align-items: center;
}

.form-excluir {
    display: inline;
}

.btn-excluir {
    color: #fff;
    background-color: #e53935;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    width: auto;
}

.btn-excluir:hover {
    background-color: #c62828;
}

.sem-acao {
    color: #bbb;
    font-size: 18px;
}

/* ==================== SEÇÃO DE EDIÇÃO ==================== */
.cadastro-editar {
    border: 2px solid #7e57c2;
    background-color: #faf7ff;
}

.editar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D8BFD8;
}

.editar-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.btn-cancelar {
    color: #fff;
    background-color: #e53935;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 13px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-cancelar:hover {
    background-color: #c62828;
}

input:disabled {
    background-color: #e8e8e8;
    color: #888;
    cursor: not-allowed;
}

/* ==================== SIDEBAR — REUNIÕES ==================== */
.btn-criar-reuniao {
    display: block;
    text-align: center;
    color: #fff;
    background-color: #7e57c2;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 10px;
    transition: background-color 0.2s;
    cursor: pointer;
    border: none;
}

.btn-criar-reuniao:hover {
    background-color: #5e35b1;
}

.link-reuniao {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
}

.link-reuniao:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.link-reuniao.ativo {
    background-color: #7e57c2;
    color: #fff;
    font-weight: 600;
}

.sem-reuniao {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-style: italic;
    padding: 4px 8px;
}

/* ==================== REUNIÃO — CABEÇALHO ==================== */
.reuniao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reuniao-titulo h2 {
    color: #fff;
    font-size: 18px;
    margin: 0;
}

.reuniao-participantes-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 2px;
    display: block;
}

.form-excluir-reuniao {
    display: inline;
}

.btn-excluir-reuniao {
    color: #fff;
    background-color: #e53935;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    width: auto;
}

.btn-excluir-reuniao:hover {
    background-color: #c62828;
}

/* ==================== REUNIÃO — PARTICIPANTES ==================== */
.reuniao-participantes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
}

.participante {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

/* ==================== REUNIÃO — TELA VAZIA ==================== */
.reuniao-vazia {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    gap: 12px;
}

.reuniao-vazia-icone {
    font-size: 56px;
}

.reuniao-vazia h2 {
    color: #fff;
    font-size: 22px;
    margin: 0;
}

.reuniao-vazia p {
    font-size: 14px;
    max-width: 380px;
    margin: 0;
}

.btn-criar-reuniao-centro {
    color: #fff;
    background-color: #7e57c2;
    border: none;
    padding: 10px 24px;
    border-radius: 7px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.btn-criar-reuniao-centro:hover {
    background-color: #5e35b1;
}

.sem-mensagens {
    color: #aaa;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    margin-top: 30px;
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-conteudo {
    background-color: #fff;
    border-radius: 12px;
    padding: 28px;
    width: 440px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #4B0082;
    font-size: 18px;
    margin: 0;
}

.modal-fechar {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-fechar:hover {
    color: #e53935;
}

.modal-conteudo .form-group {
    margin-bottom: 16px;
}

.modal-conteudo .form-group label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.modal-conteudo .form-group input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.modal-conteudo .form-group input[type="text"]:focus {
    border-color: #9370DB;
}

.checkbox-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    background-color: #fafafa;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    accent-color: #7e57c2;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.modal-conteudo button[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #7e57c2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.modal-conteudo button[type="submit"]:hover {
    background-color: #5e35b1;
}

/* ==================== FILTROS DE AUDITORIA ==================== */
.form-filtros {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 18px;
    background-color: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

.filtro-grupo label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.filtro-grupo select,
.filtro-grupo input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background-color: #fff;
}

.filtro-grupo select:focus,
.filtro-grupo input[type="date"]:focus {
    border-color: #9370DB;
}

.btn-filtrar {
    padding: 9px 20px;
    background-color: #7e57c2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-filtrar:hover {
    background-color: #5e35b1;
}

.btn-limpar {
    padding: 9px 20px;
    background-color: #999;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-limpar:hover {
    background-color: #777;
}

/* ==================== BADGES DE TIPO ==================== */
.badge-tipo {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-tipo.chat {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-tipo.reuniao {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* ==================== PÁGINA DE ALTERAR SENHA ==================== */
.form-senha {
    max-width: 500px;
    margin: 30px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.obrigatorio {
    color: #e53935;
    font-weight: bold;
}

.form-group input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input[type="password"]:focus {
    border-color: #7e57c2;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-primary {
    padding: 11px 24px;
    background-color: #7e57c2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #5e35b1;
}

.btn-secondary {
    padding: 11px 24px;
    background-color: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background-color: #bdbdbd;
}

.info-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 6px;
}

.info-box h3 {
    margin: 0 0 12px 0;
    color: #2e7d32;
    font-size: 16px;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    color: #333;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 6px;
}

/* ==================== MENSAGENS DE SUCESSO E ERRO ==================== */
.msg-sucesso,
.msg-erro {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.msg-sucesso {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.msg-erro {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== TOOLBAR DE ENTRADA ==================== */
.btn-toolbar {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background-color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.btn-toolbar:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.btn-gravar.gravando {
    animation: pulsar 1s infinite;
    color: #e53935;
}

@keyframes pulsar {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.btn-enviar {
    padding: 10px 20px;
    background-color: #D8BFD8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-enviar:hover {
    background-color: #9370DB;
}

/* ==================== PREVIEW DE ARQUIVO / ÁUDIO ==================== */
.preview-arquivo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f0e6ff;
    border: 1px solid #D8BFD8;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 13px;
    color: #4B0082;
}

.btn-remover-preview {
    background: none;
    border: none;
    color: #e53935;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-remover-preview:hover {
    opacity: 0.7;
}

/* ==================== MENSAGEM — ARQUIVO ==================== */
.mensagem-arquivo {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f5f0ff;
    border: 1px solid #e0d4f5;
    border-radius: 8px;
    padding: 10px 12px;
}

.arquivo-icone {
    font-size: 28px;
    flex-shrink: 0;
}

.arquivo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.arquivo-nome {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    word-break: break-word;
}

.link-download {
    font-size: 12px;
    color: #7e57c2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.link-download:hover {
    color: #5e35b1;
    text-decoration: underline;
}

/* ==================== MENSAGEM — IMAGEM ==================== */
.mensagem-imagem {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px;
}

.mensagem-imagem img {
    max-width: 280px;
    max-height: 220px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
}

.mensagem-imagem img:hover {
    opacity: 0.85;
}

/* ==================== MENSAGEM — ÁUDIO ==================== */
.mensagem-audio {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mensagem-audio audio {
    max-width: 260px;
    height: 36px;
}

/* ==================== EMOJI PICKER ==================== */
.emoji-picker {
    position: fixed;
    bottom: 80px;
    left: 240px;
    width: 380px;
    max-height: 420px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 300;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.emoji-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #4B0082;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.emoji-fechar {
    font-size: 22px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}

.emoji-fechar:hover {
    color: #fff;
}

.emoji-search {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.emoji-search input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.emoji-search input:focus {
    border-color: #9370DB;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    padding: 10px 8px;
    overflow-y: auto;
    flex: 1;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 5px;
    transition: background-color 0.15s;
    line-height: 1.2;
    text-align: center;
}

.emoji-btn:hover {
    background-color: #f0e6ff;
}
