
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #f3f4f6;
    color: #111827;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* TOPO */

.topo {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topo-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 16px;
}

.logo-titulo,
.topo .logo span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    display: block;
}

.logo-subtitulo,
.topo .logo small {
    font-size: 0.8rem;
    color: #6b7280;
}

.btn-cta {
    font-size: 0.85rem;
    padding: 7px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(79,70,229,0.35);
}

/* HERO */

.hero {
    background: #f9fafb;
    padding: 26px 0 20px;
    border-bottom: 1px solid #e5e7eb;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.hero-texto h1 {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.hero-texto p {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 10px;
}

.btn-hero {
    display: inline-block;
    margin-top: 4px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #10b981;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-resumo {
    background: #ffffff;
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    font-size: 0.82rem;
    color: #4b5563;
}

.hero-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.hero-resumo ul {
    list-style: none;
    margin-top: 4px;
}

.hero-resumo li {
    margin-bottom: 2px;
}

/* LAYOUT PRINCIPAL */

.conteudo {
    padding: 22px 0 32px;
}

.layout-principal {
    display: grid;
    grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
    gap: 20px;
}

/* SIDEBAR */

.sidebar {
    background: #ffffff;
    border-radius: 18px;
    padding: 14px 14px 16px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}

.sidebar-titulo {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.sidebar-subtitulo {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.sidebar-menu a {
    font-size: 0.85rem;
    padding: 6px 9px;
    border-radius: 10px;
    color: #374151;
    border: 1px solid transparent;
}

.sidebar-menu a:hover {
    background: #f3f4ff;
    border-color: #c7d2fe;
    color: #111827;
}

.sidebar-menu a.ativo {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    border-color: transparent;
}

/* ÁREA LISTA */

.area-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.busca-superior {
    display: flex;
    gap: 8px;
    align-items: center;
}

.busca-superior input[type="text"] {
    flex: 1;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    outline: none;
    background: #ffffff;
}

.busca-superior input[type="text"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.18);
}

.busca-superior button {
    padding: 7px 14px;
    border-radius: 999px;
    border: none;
    background: #4b5563;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.titulo-linha {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 2px;
}

.titulo-linha h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.contador {
    font-size: 0.8rem;
    color: #6b7280;
}

/* CARDS LISTA */

.sem-resultados {
    padding: 24px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.grid-programas {
    display: grid;
    gap: 18px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-programa {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    border: 1px solid #e5e7eb;
    min-height: 220px;
}

.card-programa:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15,23,42,0.12);
}

.card-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e5e7eb;
    overflow: hidden;
}

.card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #6b7280;
}

.badge-destaque {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #facc15;
    color: #1f2937;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}

.card-body {
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-body h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.segmento {
    font-size: 0.8rem;
    color: #6b7280;
}

.info-linha {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8rem;
    color: #4b5563;
}

.info-icone {
    margin-right: 3px;
}

.preco-linha {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-gratis {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 600;
}

.preco {
    font-size: 0.92rem;
    font-weight: 700;
    color: #16a34a;
}

/* PAGINAÇÃO */

.paginacao {
    margin-top: 14px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.paginacao a {
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.paginacao a.ativo {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

/* RODAPÉ */

.rodape {
    border-top: 1px solid #e5e7eb;
    padding: 10px 0 18px;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

/* PÁGINA DETALHE (programa.php) */

.programa-detalhe {
    padding-top: 20px;
    padding-bottom: 24px;
}

.programa-head {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1.2fr);
    gap: 20px;
    margin-bottom: 20px;
}

.programa-banner img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 26px rgba(15,23,42,0.15);
}

.programa-info h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.programa-info .segmento {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.programa-dados {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #4b5563;
    margin-bottom: 8px;
}

.programa-dados span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.preco-detalhe {
    font-size: 1rem;
    font-weight: 700;
    color: #16a34a;
}

.badge-gratis {
    background: #ecfdf5;
    color: #16a34a;
}

.player-area {
    margin-top: 10px;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
}

.btn-whatsapp:hover {
    background: #b91c1c;
}

.programa-descricao,
.programa-locutor {
    margin-top: 14px;
    font-size: 0.9rem;
}

.programa-descricao h2,
.programa-locutor h2 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.locutor-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.locutor-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

/* FORMULÁRIOS (cadastro + admin) */

.form-programa {
    background: #ffffff;
    border-radius: 18px;
    padding: 14px 14px 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    margin: 18px 0;
    font-size: 0.9rem;
}

.form-programa .grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.form-programa label {
    display: block;
    margin-top: 8px;
    margin-bottom: 2px;
    font-size: 0.85rem;
}

.form-programa input[type="text"],
.form-programa input[type="number"],
.form-programa input[type="file"],
.form-programa select,
.form-programa textarea {
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    background: #ffffff;
}

.form-programa textarea {
    min-height: 90px;
    resize: vertical;
}

.form-programa button[type="submit"],
.form-programa .btn-submit {
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

/* ADMIN LISTA */

.admin-main table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}

.admin-main th,
.admin-main td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-main th {
    background: #f9fafb;
    text-align: left;
    font-weight: 600;
}

/* RESPONSIVO */

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .layout-principal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .topo-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .busca-superior {
        flex-direction: column;
        align-items: stretch;
    }
    .busca-superior button {
        width: 100%;
        text-align: center;
    }
}

/* MODAL DETALHE PROGRAMA */

body.modal-aberto {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
}

.modal-overlay.aberto {
    display: flex;
}

.modal-caixa {
    background: #ffffff;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    border-radius: 20px;
    padding: 16px 18px 18px;
    box-shadow: 0 24px 60px rgba(15,23,42,0.35);
    position: relative;
    overflow-y: auto;
}

.modal-fechar {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: #f3f4f6;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #4b5563;
}

.modal-fechar:hover {
    background: #e5e7eb;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.modal-header-textos h2 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.modal-header-textos .segmento {
    font-size: 0.85rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
    gap: 18px;
    margin-top: 10px;
}

.modal-banner img,
.modal-banner .banner-placeholder {
    border-radius: 16px;
}

.modal-infos-linhas {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #4b5563;
}

.modal-info-linha {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-descricao {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #374151;
}

.modal-demo {
    margin-top: 12px;
}

.modal-demo audio {
    width: 100%;
}

.box-locutor,
.box-contato {
    background: #f9fafb;
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 10px;
}

.box-locutor h3,
.box-contato h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.locutor-linha {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.locutor-linha img {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    object-fit: cover;
}

.locutor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    background: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-weight: 700;
}

.locutor-nome {
    font-weight: 600;
}

.locutor-bio {
    font-size: 0.8rem;
    color: #6b7280;
}

.box-contato p {
    margin-bottom: 6px;
}

@media (max-width: 800px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin extras */

.admin-lista-topo {
    margin-bottom: 12px;
    display: flex;
    justify-content: flex-end;
}

.erro {
    color: #b91c1c;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.sucesso {
    color: #15803d;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.card-player {
    margin-top: 4px;
}

.card-player audio {
    width: 100%;
}


/* ============================
   Ajustes popup programa (banner, player, fechar, locutor)
   ============================ */

.programa-banner.bloco-banner-padronizado {
    background: #ffffff;
    border-radius: 18px;
    padding: 14px 14px 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.programa-banner-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
}

.programa-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.programa-info.bloco-info-padronizado {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}

/* Player logo abaixo do banner */
.player-area.player-abaixo-banner {
    margin-top: 12px;
}

.player-titulo {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #4b5563;
}

.player-programa {
    width: 100%;
}

/* Botão Fechar ocupando toda a largura */
.btn-fechar-programa {
    margin-top: 12px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: #e5e7eb;
    color: #111827;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-fechar-programa:hover {
    background: #d1d5db;
}

/* Locutor em coluna: foto em cima, nome, depois descrição */
.programa-locutor {
    margin-top: 18px;
}

.programa-locutor h2 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.locutor-box.locutor-padronizado {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    background: #ffffff;
    border-radius: 18px;
    padding: 14px 14px 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}

.locutor-foto-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
}

.locutor-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.locutor-nome {
    font-weight: 700;
}

.locutor-bio {
    font-size: 0.9rem;
    color: #4b5563;
}

/* Botão WhatsApp do locutor */
.btn-whatsapp-locutor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
}

.btn-whatsapp-locutor:hover {
    background: #b91c1c;
}


/* Dicas de tamanho no admin */

.hint-global {
    font-size: 0.9rem;
    color: #4b5563;
    margin-top: 6px;
}

.hint-tamanho {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 2px 0 6px;
}

