/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS E VARIÁVEIS (BASE)
   ========================================================================== */

:root {
    --cor-principal: #8B0000;
    --cor-fundo: #f4f4f4;
    --cor-card: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cor-fundo);
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Componentes de Mensagens Gerais */
.alerta, .resposta-status {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
}
.sucesso { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.erro { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Formulários e Inputs Globais (Admin e Ouvinte) */
.form-group { 
    margin-bottom: 15px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 6px; 
    color: #555; 
    font-weight: 600; 
    font-size: 14px; 
}

.container-admin input[type="text"], .container-admin input[type="email"], 
.container-admin input[type="password"], .container-admin input[type="number"],
.container-ouvinte input[type="text"], .container-ouvinte input[type="password"], 
.container-ouvinte input[type="number"], .container-ouvinte select, .container-ouvinte textarea,
.conteudo-dropdown-perfil input[type="password"] { 
    width: 100%; 
    padding: 11px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 14px; 
    background: #fff; 
    font-family: inherit;
    transition: all 0.2s ease;
}

.container-admin input:focus, .container-ouvinte input:focus, 
.container-ouvinte select:focus, .container-ouvinte textarea:focus,
.conteudo-dropdown-perfil input:focus { 
    border-color: var(--cor-principal);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
    outline: none;
}

.container-ouvinte textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================================================
   2. PAINEL ADMINISTRATIVO (ADMIN.PHP)
   ========================================================================== */

.container-admin { 
    max-width: 850px; 
    width: 100%; 
    background: var(--cor-card); 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    margin: 20px auto; 
    flex: 1;
}

.topo-admin { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 15px; 
}

.topo-admin-logo-area { display: flex; align-items: center; gap: 15px; }
.topo-admin-logo { max-width: 140px; max-height: 50px; object-fit: contain; }
.topo-admin-titulo { margin: 0; font-size: 1.5em; color: #333; }

.btn-sair-admin {
    color: #6c757d; 
    font-weight: bold; 
    text-decoration: none;
    transition: color 0.2s;
}
.btn-sair-admin:hover { color: #dc3545; }

/* Acordeons Retráteis (Details / Summary) */
details { 
    background: #fafafa; 
    border: 1px solid #e0e0e0; 
    border-radius: 6px; 
    margin-top: 20px; 
    overflow: hidden; 
    transition: all 0.3s ease; 
}
details[open] { background: var(--cor-card); border-color: var(--cor-principal); padding-bottom: 15px; }

summary { 
    padding: 15px; 
    font-size: 1.1em; 
    font-weight: bold; 
    color: var(--cor-principal); 
    cursor: pointer; 
    background: #f1f1f1; 
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
}
details[open] summary { background: #f9f9f9; border-bottom: 2px solid var(--cor-principal); margin-bottom: 15px; }
summary::after { content: "▼"; font-size: 0.8em; color: #888; transition: transform 0.2s; }
details[open] summary::after { content: "▲"; color: var(--cor-principal); }

.conteudo-retratil { padding: 0 15px; }

.secao-titulo { 
    margin-top: 10px; 
    margin-bottom: 15px; 
    padding-bottom: 5px; 
    border-bottom: 2px solid var(--cor-principal); 
    color: var(--cor-principal); 
    font-size: 1.2em; 
    font-weight: bold; 
}
.secao-titulo.seguranca { font-size: 1.1em; border-bottom: none; margin-top: 25px; margin-bottom: 10px; }

/* Customizações do Form do Admin */
.linha-cores { display: flex; gap: 15px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.linha-cores .form-group { flex: 1; min-width: 120px; text-align: center; }
.container-admin .linha-cores input[type="color"] { height: 45px; cursor: pointer; width: 100%; border: 1px solid #ccc; border-radius: 4px; padding: 2px; background: #fff; }

.btn-reset-cores {
    background-color: #6c757d; color: white; border: none; padding: 0 15px; border-radius: 4px; 
    font-weight: bold; cursor: pointer; font-size: 13px; white-space: nowrap; height: 45px; 
    margin-bottom: 15px; flex: 0 1 auto; transition: background-color 0.2s;
}
.btn-reset-cores:hover { background-color: #5a6268; }

.btn-salvar, .btn-enviar, .botoes button { 
    background-color: var(--cor-principal); color: white; width: 100%; padding: 12px; 
    border: none; border-radius: 4px; font-weight: bold; cursor: pointer; margin-top: 15px; 
    font-size: 15px; transition: filter 0.2s;
}
.btn-salvar:hover, .btn-enviar:hover, .botoes button:hover { filter: brightness(92%); }

/* Tabelas Administrativas */
.tabela-admin { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.95em; background: #fff; }
.tabela-admin th, .tabela-admin td { padding: 12px; border: 1px solid #ddd; text-align: left; }
.tabela-admin th { background: #f4f4f4; color: #555; }

.btn-tabela-editar { display: inline-block; background-color: #007bff; color: white; padding: 6px 12px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 13px; margin-right: 5px; }
.btn-tabela-deletar { display: inline-block; background-color: #dc3545; color: white; padding: 6px 12px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 13px; border: none; cursor: pointer; }

.grid-cadastro { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.area-logo-preview { display: flex; align-items: center; gap: 20px; background: #f8f9fa; padding: 15px; border-radius: 6px; border: 1px dashed #ccc; }
.logo-preview-img { max-height: 60px; max-width: 180px; object-fit: contain; background: #eee; padding: 4px; border-radius: 4px; }

.wrapper-checkboxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; background: #fdfdfd; padding: 12px; border: 1px solid #ccc; border-radius: 4px; }
.item-checkbox { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }

/* Melhoria: Customização do Campo de Título da WebRádio */
.input-titulo-radio-container {
    margin-top: 20px;
    margin-bottom: 20px;
}
.input-texto-custom {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.input-texto-custom:focus {
    border-color: var(--cor-principal);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
    outline: none;
}

/* Responsive Admin */
@media (max-width: 700px) { .wrapper-checkboxes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-cadastro { grid-template-columns: 1fr; } }

/* ==========================================================================
   3. PAINEL DO LOCUTOR (PAINEL.PHP)
   ========================================================================== */

.container-painel {
    max-width: 1000px; width: 100%; background: var(--cor-card); padding: 25px; 
    border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin: 10px auto 20px auto; flex: 1;
}

/* Novo Topo Premium do Painel */
.topo-painel {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.02) 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.perfil-locutor {
    display: flex;
    align-items: center;
    gap: 20px;
}

.perfil-locutor .avatar-img {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 3px solid var(--cor-principal);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    object-fit: cover;
}

.perfil-locutor .avatar-vazio {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 3px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-align: center;
    color: #888;
    background: #fafafa;
    font-weight: bold;
    line-height: 1.2;
}

.info-locutor-bloco {
    display: flex;
    flex-direction: column;
}

.saudacao-locutor {
    font-size: 14px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.nome-locutor-destaque {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--cor-principal);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.badges-programa-lista {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.badge-programa-item {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.02);
    width: fit-content;
}

.nome-programa-destaque, 
.horario-programa-destaque {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.nome-programa-destaque strong, 
.horario-programa-destaque strong {
    color: #111;
    font-weight: 700;
}

.acoes-topo-painel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-master-config {
    background: #4a5568;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: background 0.2s;
}
.btn-master-config:hover { background: #2d3748; }

.btn-encerrar-turno {
    color: #fff;
    background: #e53e3e;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(229,62,62,0.2);
    transition: background 0.2s;
}
.btn-encerrar-turno:hover { background: #c53030; }

/* Status da Transmissão */
.barra-status-compacta { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-radius: 6px; margin-bottom: 20px; font-weight: bold; transition: background 0.3s; }
.barra-status-compacta.online { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.barra-status-compacta.offline { background-color: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }
.texto-status-mini { font-size: 14px; }

.btn-status-toggle { background: var(--cor-principal); color: white; border: none; padding: 8px 16px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 13px; transition: filter 0.2s; }
.btn-status-toggle:hover { filter: brightness(90%); }

/* Bloco Dropdown de Configurações de Perfil e Senha */
.btn-trigger-dropdown { 
    width: 100%; 
    background: #f8f9fa; 
    border: 1px solid #ddd; 
    padding: 12px 20px; 
    text-align: left; 
    font-size: 15px; 
    font-weight: 600;
    color: #444; 
    cursor: pointer; 
    border-radius: 6px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
    transition: background 0.2s;
}
.btn-trigger-dropdown:hover { background: #f1f3f5; }

.conteudo-dropdown-perfil { 
    display: none; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    background: #fafafa; 
    border: 1px solid #ddd; 
    border-top: none; 
    padding: 25px; 
    margin-top: -26px; 
    margin-bottom: 25px; 
    border-radius: 0 0 6px 6px; 
}
.conteudo-dropdown-perfil.aberto { display: grid; }

.conteudo-dropdown-perfil > div:first-child {
    border-right: 1px dashed #ddd;
    padding-right: 25px;
}

.conteudo-dropdown-perfil h4 { 
    margin-bottom: 18px; 
    color: #333; 
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.conteudo-dropdown-perfil .form-group {
    margin-bottom: 15px;
}

.conteudo-dropdown-perfil input[type="password"] { 
    width: 100%; 
    padding: 10px; 
    margin-bottom: 5px; 
}

.dica-upload { 
    display: block; 
    font-size: 12px; 
    color: #444; 
    margin-bottom: 15px; 
    line-height: 1.5; 
    background: #eef1f6;
    padding: 12px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.conteudo-dropdown-perfil input[type="file"] {
    margin-bottom: 15px;
    font-size: 14px;
    display: block;
    width: 100%;
}

.btn-perfil-acao {
    background-color: var(--cor-principal);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: filter 0.2s;
    width: auto;
    display: inline-block;
}
.btn-perfil-acao:hover { filter: brightness(88%); }

/* Fila de Pedidos - CORREGIDA VISUALMENTE CONTRA EMSAGAMENTO DE COLUNAS */
.barra-controle-tabela { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.contador-regressive, .contador-regressivo { 
    font-size: 12px; 
    color: #888; 
    font-weight: normal; 
    opacity: 0.8; 
}
.btn-atualizar { background: #007bff; color: white; text-decoration: none; padding: 6px 12px; border-radius: 4px; font-size: 13px; font-weight: bold; }

.tabela-pedidos { 
    width: 100%; 
    border-collapse: collapse; 
    background: white; 
    font-size: 14px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    table-layout: fixed;
}

.tabela-pedidos th, .tabela-pedidos td { padding: 12px 15px; border: 1px solid #e9ecef; text-align: left; vertical-align: middle; }
.tabela-pedidos th { background-color: #f1f3f5; color: #495057; font-weight: bold; }

/* Distribuição exata e proporcional das larguras de cada coluna */
.tabela-pedidos th:nth-child(1), .tabela-pedidos td:nth-child(1) { width: 15%; } /* Ouvinte */
.tabela-pedidos th:nth-child(2), .tabela-pedidos td:nth-child(2) { width: 15%; } /* Localização */
.tabela-pedidos th:nth-child(3), .tabela-pedidos td:nth-child(3) { width: 20%; } /* Música Solicitada */
.tabela-pedidos th:nth-child(4), .tabela-pedidos td:nth-child(4) { width: 28%; } /* Recado / Mensagem */
.tabela-pedidos th:nth-child(5), .tabela-pedidos td:nth-child(5) { width: 10%; } /* Horário */
.tabela-pedidos th:nth-child(6), .tabela-pedidos td:nth-child(6) { width: 12%; } /* Ação */

.tabela-pedidos td {
    word-wrap: break-word;
    overflow: hidden;
}

.badge-posicao { background: #6c757d; color: white; padding: 3px 8px; border-radius: 20px; font-weight: bold; font-size: 11px; }
.recado-box { background: #fff3cd; color: #856404; padding: 8px 12px; border-radius: 4px; font-style: italic; border-left: 3px solid #ffeeba; font-size: 13px; word-break: break-word; }
.btn-atendido { display: inline-block; background-color: #28a745; color: white; text-decoration: none; padding: 6px 12px; border-radius: 4px; font-weight: bold; font-size: 12px; transition: background 0.2s; text-align: center; width: 100%; }
.btn-atendido:hover { background-color: #218838; }

@media (max-width: 768px) {
    .conteudo-dropdown-perfil { grid-template-columns: 1fr; gap: 20px; }
    .conteudo-dropdown-perfil > div:first-child { border-right: none !important; padding-right: 0 !important; border-bottom: 1px dashed #ccc; padding-bottom: 20px; }
    .btn-perfil-acao { width: 100%; text-align: center; }
    
    .tabela-pedidos { table-layout: auto; }
    .tabela-pedidos, .tabela-pedidos thead, .tabela-pedidos tbody, .tabela-pedidos th, .tabela-pedidos td, .tabela-pedidos tr { display: block; }
    .tabela-pedidos thead { display: none; }
    .tabela-pedidos tr { margin-bottom: 15px; border: 1px solid #ddd; padding: 10px; border-radius: 6px; background: #fafafa; }
    .tabela-pedidos td { border: none; padding: 6px 0; position: relative; width: 100% !important; }
    .tabela-pedidos td::before { font-weight: bold; color: var(--cor-principal); display: block; margin-bottom: 2px; }
}

/* ==========================================================================
   4. INTERFACE DO OUVINTE (INDEX.PHP)
   ========================================================================== */

.container-ouvinte { max-width: 850px; width: 100%; background: var(--cor-card); padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin: 20px auto; flex: 1; }

.container-ouvinte .linha-dupla { display: flex; gap: 15px; }
.container-ouvinte .linha-dupla .form-group:first-child { flex: 1; }
.form-group-uf { flex: 0 0 110px; }

.topo-logo {
    text-align: center; margin-bottom: 25px; background: #fff; border-radius: 8px; 
    overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); width: 100%; padding: 0;
}

.topo-logo img {
    width: 100%; 
    height: auto; 
    max-height: 220px; 
    display: block; 
    margin: 0 auto; 
    border-radius: 8px 8px 0 0; 
    object-fit: cover;
}

@keyframes pulsarBrilho {
    0% { box-shadow: 0 4px 10px rgba(40, 167, 69, 0.15); border-color: #c3e6cb; }
    50% { box-shadow: 0 4px 22px rgba(40, 167, 69, 0.45); border-color: #28a745; }
    100% { box-shadow: 0 4px 10px rgba(40, 167, 69, 0.15); border-color: #c3e6cb; }
}

.status-badge { padding: 15px; border-radius: 6px; text-align: center; margin-bottom: 25px; font-weight: bold; border: 1px solid #ddd; transition: all 0.3s ease; }

.status-badge.online { 
    background-color: #e8f5e9; 
    color: #1b5e20; 
    border-color: #c3e6cb; 
    animation: pulsarBrilho 2s infinite ease-in-out;
}
.status-badge.offline { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }

.status-badge-titulo { font-size: 1.25em; text-transform: uppercase; letter-spacing: 0.5px; }
.status-badge-automatica { font-size: 1.1em; letter-spacing: 0.5px; }
.status-badge-subtitulo { font-weight: normal; font-size: 0.9em; opacity: 0.9; }

.perfil-home-locutor { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.1); }
.avatar-home-img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cor-principal); }
.locutor-comando-texto { display: block; font-size: 15px; }
.locutor-horario-texto { font-size: 12px; opacity: 0.9; display: block; margin-top: 2px; }

.alerta-fila-fechada { background: #fff3cd; color: #856404; padding: 20px; border-radius: 6px; border: 1px solid #ffeeba; text-align: center; }
.alerta-fila-fechada h3 { margin-top: 0; color: #856404; }

/* Antispam (Captcha) */
.captcha-container-box { background: rgba(0, 0, 0, 0.03); padding: 12px; border-radius: 6px; border: 1px dashed #ccc; margin-bottom: 18px; }
.captcha-label-titulo { color: #333; font-weight: bold; display: block; margin-bottom: 5px; }
.captcha-pergunta-texto { font-size: 14px; color: #555; display: inline-block; margin-bottom: 5px; }
.captcha-input-alinhado { max-width: 150px; display: block; }

/* Botões Extras */
.btn-limpar-custom {
    width: 100%; margin-top: 10px; background: #6c757d; color: #fff; padding: 10px; 
    border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 14px; transition: background 0.2s;
}
.btn-limpar-custom:hover { background: #5a6268; }

/* ==========================================================================
   5. GRADE DE PROGRAMAÇÃO
   ========================================================================== */

.container-grade-programacao { margin-top: 30px; }
.grade-container-lista { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }
.grade-item-card { display: flex; align-items: center; justify-content: space-between; background: var(--cor-card); padding: 15px; border-radius: 6px; border: 1px solid #eee; gap: 15px; }

.grade-avatar-css {
    width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: #eee; 
    border: 2px solid #ddd; display: flex; align-items: center; justify-content: center; 
    position: relative; font-weight: bold; color: #555; font-size: 1.1em; flex-shrink: 0;
}
.grade-avatar-img-fit { object-fit: cover; }

.grade-mini-icone { position: absolute; bottom: -2px; right: -2px; font-size: 10px; background: #fff; border: 1px solid #ccc; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.grade-info-textos { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.grade-locutor-nome { font-size: 13px; color: #666; }
.grade-programa-nome { font-size: 16px; color: #222; }

.grade-horario-bloco { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 4px; }

.grade-badge-dia { 
    background-color: var(--cor-principal); 
    color: #ffffff; 
    padding: 3px 9px; 
    border-radius: 4px; 
    font-size: 11px; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.grade-badge-hora { font-size: 13px; color: #555; font-weight: bold; }

.grade-vazia, .grade-erro { text-align: center; padding: 20px; color: #666; background: #fafafa; border-radius: 6px; border: 1px dashed #ccc; }

@media (max-width: 500px) {
    .grade-item-card { flex-direction: column; align-items: flex-start; gap: 12px; }
    .grade-horario-bloco { align-items: flex-start; text-align: left; width: 100%; border-top: 1px dashed #eee; padding-top: 10px; }
}

/* ==========================================================================
   6. IDENTIDADE TEXTUAL E INTERAÇÃO DO FOOTER
   ========================================================================== */

.titulo-grade, .titulo-formulario-pedido { margin-top: 0; border-bottom: 2px solid var(--cor-principal); padding-bottom: 8px; color: #222; margin-bottom: 15px; }
.botoes { margin-top: 20px; }
.logo-fallback-container { padding: 30px 10px; background: #222; }
.logo-fallback-titulo { color: var(--cor-principal); margin: 0; font-size: 2em; text-align: center; }

.footer-sistema {
    text-align: center; padding: 20px; color: #777; font-size: 13px; 
    background: #eee; margin-top: auto; border-top: 1px solid #ddd;
}

/* Interação com o Link do Estúdio Encasulado */
.link-acesso-estudio:hover {
    color: var(--cor-principal) !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   7. TELA DE LOGIN (LOGIN.PHP)
   ========================================================================== */

.body-login {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.logo-login-container {
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
}

.logo-login-banner {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.login-titulo {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 25px;
    color: var(--cor-principal);
    font-size: 22px;
    font-weight: bold;
}

/* ==========================================================================
   POPUP MODAL INTERATIVO (VISUALIZAÇÃO DE RECADOS EXTENSOS)
   ========================================================================== */
.recado-preview-link {
    cursor: pointer;
    color: #333;
    transition: color 0.2s;
    display: block;
}

.recado-preview-link:hover {
    color: var(--cor-principal);
}

.ler-mais-tag {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: #666;
    margin-left: 4px;
    font-weight: 600;
    white-space: nowrap;
}

/* Cortina de Fundo Escura do Modal */
.modal-estudio-wrapper {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.modal-estudio-wrapper.aberto {
    display: flex;
    opacity: 1;
}

/* Caixa Central da Mensagem */
.modal-estudio-box {
    background-color: var(--cor-card);
    padding: 25px;
    border-radius: 10px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.25s ease-in-out;
}

.modal-estudio-wrapper.aberto .modal-estudio-box {
    transform: scale(1);
}

/* Botão Fechar (X) */
.modal-estudio-fechar {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-estudio-fechar:hover {
    color: #e53e3e;
}

.modal-estudio-titulo {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #111;
    border-bottom: 2px solid var(--cor-principal);
    padding-bottom: 10px;
}

.modal-estudio-linhas p {
    margin-bottom: 12px;
    font-size: 14px;
    color: #444;
}

.modal-estudio-recado-area {
    margin-top: 15px;
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #f6ad55;
}

.modal-estudio-recado-texto {
    margin-top: 8px;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.6;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* ==========================================================================
   CONTADOR DE CARACTERES DINÂMICO (INDEX.PHP)
   ========================================================================== */
.contador-caracteres-container {
    text-align: right;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    font-weight: normal;
    letter-spacing: 0.2px;
}

/* ==========================================================================
   8. TAG DE OUVINTE FREQUENTE / FIEL (PAINEL.PHP)
   ========================================================================== */
.badge-ouvinte-fiel {
    background-color: #ffc107;   /* Amarelo Ouro Premium */
    color: #212529;              /* Texto Escuro de Alto Contraste */
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: help;
}