/* ================= VARIÃVEIS E RESET ================= */
:root {
    --bg-color: #F8FAFC;
    --sidebar-bg: #0F172A;
    --primary-color: #D97706;
    --text-dark: #1E293B;
    --text-light: #F8FAFC;
    --text-muted: #94A3B8;
    --gray-100: #F2F2F2;
    --gray-200: #E0E0E0;
    --gray-300: #BDBDBD;
    --gray-400: #828282;
    --gray-500: #4F4F4F;
    --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden;
    /* TRAVA 1: ProÃ­be a tela inteira de vazar pros lados */
    width: 100%;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 10px;
}

/* ================= LAYOUT PRINCIPAL ================= */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 80vh;
}

/* ================= BOTÃO MENU MOBILE (hamburger) ================= */
#btn-mobile-menu {
    display: none; /* Escondido no desktop */
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar normal no desktop */
.sidebar {
    background-color: var(--sidebar-bg);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-shadow: var(--shadow-soft);
    color: var(--text-light);
    height: max-content;
    max-height: 90vh;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 0px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.logo-box .logo-icon {
    font-size: 28px;
    color: var(--primary-color);
}

.logo-box h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ================= WIDGET DE DATA ================= */
.date-widget {
    background: linear-gradient(145deg, #1E293B, #0F172A);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.date-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.date-header:hover {
    transform: scale(1.02);
}

.date-header .month {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.date-header .day {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-light);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.date-header .year {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.date-expanded-area {
    max-height: 0;
    opacity: 0;
    transition: all 0.5s ease-in-out;
    padding: 0 20px;
    overflow-y: auto;
}

.date-expanded-area::-webkit-scrollbar {
    width: 4px;
}

.date-expanded-area::-webkit-scrollbar-track {
    background: transparent;
}

.date-expanded-area::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.date-widget.expanded .date-expanded-area {
    max-height: 800px;
    /* CORRIGIDO: Agora a grade de dias tem espaÃ§o de sobra */
    opacity: 1;
    padding-bottom: 20px;
}

.grid-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.date-btn.empty {
    background-color: transparent;
    cursor: default;
}

.date-btn.empty:hover {
    background-color: transparent;
}

.selector-title {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
}

.grid-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.grid-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding-bottom: 10px;
}

.date-btn {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grid-days .date-btn {
    padding: 0;
    width: 100%;
    aspect-ratio: 1;
    font-size: 11px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.date-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.date-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* ================= MENU DE NAVEGAÃ‡ÃƒO ================= */
.main-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.menu-btn {
    background-color: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 99px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn .icon {
    font-size: 18px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.menu-btn:hover .icon {
    transform: scale(1.1);
    opacity: 1;
}

.menu-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
}

.menu-btn.active .icon {
    opacity: 1;
}

/* ================= CONTEÃšDO PRINCIPAL (MAIN) ================= */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 0;
    /* TRAVA 2: O antÃ­doto! Obriga o flexbox a encolher e respeitar o celular */
    width: 100%;
}

/* ================= CABEÃ‡ALHO GLOBAL & CARD LITÃšRGICO ================= */
.dashboard-header {
    display: flex;
    align-items: center;
    /* Alinha tudo verticalmente no meio */
    justify-content: flex-start;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: nowrap;
    /* Impede que caia para a linha de baixo no Computador! */
}

.greeting-area {
    flex-shrink: 0;
    /* A saudaÃ§Ã£o nÃ£o encolhe */
}

.liturgy-status-card {
    background-color: var(--bg-color);
    border-radius: 16px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    flex: 1;
    max-width: none;
    /* Remove limite para preencher o espaÃ§o */
}

/* Nova Caixa Compacta de Leituras */
.readings-compact-box {
    background: white;
    border-radius: 16px;
    padding: 15px 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--gray-200);
    flex: 1;
    /* Ocupa o restante do espaÃ§o ao lado do Status Card */
}

.readings-compact-header {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.readings-buttons-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Design dos BotÃµes (1Âª, Sl, 2Âª, Ev) */
.btn-reading {
    background: var(--gray-100);
    color: var(--primary-color);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reading:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.2);
}

@media (max-width: 1100px) {
    .dashboard-header {
        flex-wrap: wrap;
        /* Em telas menores (tablet/celular), ele quebra as linhas perfeitamente */
        flex-direction: column;
        align-items: stretch;
    }
}

.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-content h2 {
    font-size: 18px;
    color: var(--text-dark);
    margin-top: 8px;
    font-weight: 700;
}

.status-tags {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tag-tempo {
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.tag-cor {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
}

/* MÃGICA PARA O BACKEND: 
   Basta o Node.js trocar a classe 'theme-white' da div principal para 
   'theme-purple', 'theme-red' etc, que a bolinha indicadora muda sozinha! 
*/
.theme-white .status-indicator {
    background-color: #FBBF24;
    box-shadow: 0 0 0 4px #FEF3C7;
}

/* Dourado/Branco */
.theme-purple .status-indicator {
    background-color: #9333EA;
    box-shadow: 0 0 0 4px #F3E8FF;
}

/* Roxo */
.theme-green .status-indicator {
    background-color: #10B981;
    box-shadow: 0 0 0 4px #D1FAE5;
}

/* Verde */
.theme-red .status-indicator {
    background-color: #EF4444;
    box-shadow: 0 0 0 4px #FEE2E2;
}

/* Vermelho */
.theme-rose .status-indicator {
    background-color: #F472B6;
    box-shadow: 0 0 0 4px #FCE7F3;
}

/* Rosa/Alegria */



/* ================= CONTROLE DE TELAS (SPA) ================= */
.view-section {
    display: none;
    animation: fadeIn 0.3s ease;
    min-width: 0;
    /* O SEGREDO MÃGICO: Permite que a caixa encolha no celular */
    width: 100%;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= TELA INÃCIO: CARDS E SLIDES ================= */
.cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.info-card {
    background-color: var(--gray-200);
    border-radius: 16px;
    height: 100px;
    position: relative;
}

.info-card h3 {
    background-color: var(--gray-400);
    color: var(--text-light);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 16px 0 16px 0;
    font-size: 12px;
    position: absolute;
    top: 0;
    left: 0;
}

.slide-maker-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.acervo-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filtros-liturgicos {
    display: flex;
    gap: 10px;
    background-color: var(--gray-200);
    padding: 10px;
    border-radius: 16px;
}

.filtro-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filtro-btn.active,
.filtro-btn:hover {
    background-color: var(--bg-color);
    color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.music-list {
    background-color: #FFFFFF;
    /* Era cinza, agora Ã© branco limpo */
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    height: 450px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.musicas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 10px 0;
}

.music-card {
    background-color: var(--bg-color);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.music-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px rgba(217, 119, 6, 0.1);
}

.music-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.music-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.music-tags {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-momento {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: var(--gray-200);
    color: var(--text-dark);
}

.tag-momento.fixo {
    background-color: #E0F2FE;
    color: #0EA5E9;
}

.tag-momento.quaresma {
    background-color: #F3E8FF;
    color: #9333EA;
}

.add-btn {
    background-color: var(--sidebar-bg);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.add-btn:hover {
    background-color: var(--primary-color);
}

/* Montador de Slides (Direita) */
.preview-area {
    background: linear-gradient(145deg, var(--sidebar-bg), #1E293B);
    /* Fundo escuro premium */
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Borda sutil de vidro */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.preview-area h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--primary-color);
    /* TÃ­tulo na cor Laranja */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slide-preview {
    flex: 1;
    width: 100%;
    margin-bottom: 20px;
    overflow-y: auto;
}

.slide-item {
    background-color: rgba(255, 255, 255, 0.05);
    /* Fundo translÃºcido para contrastar */
    color: var(--text-light);
    /* Letras brancas */
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: all 0.2s ease;
}

.slide-item:hover {
    border-left-color: #FFF;
    background-color: rgba(255, 255, 255, 0.08);
}

.slide-item strong {
    font-size: 11px;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.slide-item span {
    font-size: 14px;
    font-weight: 700;
    color: #FFF;
    text-align: center;
}

.remove-btn {
    margin-top: 10px;
    background-color: rgba(239, 68, 68, 0.1);
    /* Fundo vermelho suave */
    color: #EF4444;
    /* Letra vermelha */
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-btn:hover {
    background-color: #EF4444;
    color: #FFF;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* BotÃµes do Montador ajustados pro fundo escuro */
.preview-actions .btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
}

.preview-actions .btn-primary:hover {
    background-color: #B45309;
    opacity: 1;
}

.preview-actions .btn-secondary {
    background-color: transparent;
    color: var(--gray-300);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.preview-actions .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: #fff;
    opacity: 1;
}

.btn-primary {
    background-color: var(--sidebar-bg);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background-color: #FEE2E2;
    color: #EF4444;
    border-color: #EF4444;
}

.slide-item:hover {
    border-left-color: var(--primary-color);
}

.slide-item strong {
    font-size: 11px;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.slide-item span {
    font-size: 14px;
    font-weight: 700;
}

.remove-btn {
    margin-top: 10px;
    background-color: var(--gray-100);
    color: var(--gray-500);
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-btn:hover {
    background-color: #FEE2E2;
    color: #EF4444;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
    opacity: 0.8;
}

.btn-primary {
    background-color: var(--gray-500);
    color: var(--text-light);
}

.btn-secondary {
    background-color: var(--gray-300);
    color: var(--text-light);
}

/* ================= TELA FERRAMENTAS ================= */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Classes das ferramentas limpas e unificadas */
.tool-card {
    background-color: var(--bg-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--gray-200);
    height: auto;
    min-height: 400px;
}

.tool-header {
    background-color: var(--sidebar-bg);
    color: var(--primary-color);
    padding: 20px;
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-body {
    padding: 25px;
}

.tool-desc {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 20px;
    line-height: 1.5;
}

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

.form-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 5px;
    margin-left: 5px;
}

.custom-input {
    width: 80%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background-color: var(--gray-100);
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s ease;
}

.custom-input:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-color);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

textarea.custom-input {
    resize: none;
}

.w-100 {
    width: 100%;
}

/* Resultados do Validador */
.val-resultado {
    margin-top: 20px;
    padding: 20px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    animation: fadeIn 0.4s ease;
}

.val-resultado.hidden {
    display: none;
}

.val-resultado.aprovada {
    background-color: #ECFDF5;
    border: 1px solid #10B981;
    color: #065F46;
}

.val-resultado.reprovada {
    background-color: #FEF2F2;
    border: 1px solid #EF4444;
    color: #991B1B;
}

.val-resultado h4 {
    font-size: 16px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================= NOTIFICAÃ‡Ã•ES (TOASTS) ================= */
.notification-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.success {
    border-left: 5px solid #10B981;
}

.toast.error {
    border-left: 5px solid #EF4444;
}

.toast.warning {
    border-left: 5px solid #F59E0B;
}

.toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

/* ================= CLASSIFICADOR VOCAL ================= */
.vocal-test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.vocal-box {
    background-color: var(--gray-100);
    border: 2px dashed var(--gray-200);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Estado ativo quando estÃ¡ "Ouvindo" */
.vocal-box.active {
    border-color: var(--primary-color);
    background-color: #FFFBEB;
}

.vocal-box h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.vocal-box p {
    font-size: 10px;
    color: var(--gray-500);
    margin-bottom: 20px;
    height: 30px;
}

.mic-container {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.mic-btn {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    background-color: var(--sidebar-bg);
    color: white;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.mic-btn:hover {
    transform: scale(1.05);
    background-color: var(--primary-color);
}

/* O Efeito do Microfone Gravando */
.vocal-box.active .mic-btn {
    background-color: #EF4444;
    /* Fica Vermelho */
    animation: pulseMic 1.5s infinite;
}

.note-display {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    font-family: monospace;
}

/* CartÃ£o de Resultado Final */
.vocal-result {
    background: linear-gradient(145deg, var(--sidebar-bg), #1E293B);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vocal-result.hidden {
    display: none;
}

.vocal-result h3 {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.vocal-result .highlight {
    color: var(--primary-color);
    font-size: 22px;
    font-weight: 800;
    display: block;
    margin-top: 5px;
}

.vocal-result p {
    font-size: 12px;
    color: var(--text-muted);
}

@keyframes pulseMic {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ================= TELA DE ESTUDOS / HINÃRIO ================= */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.estudo-card {
    background-color: var(--bg-color);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.estudo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: var(--primary-color);
}

.estudo-card.hidden {
    display: none;
}

.estudo-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    width: max-content;
}

.estudo-tag.hinario {
    background-color: #FEF3C7;
    color: #D97706;
}

.estudo-tag.artigo {
    background-color: #E0E7FF;
    color: #4338CA;
}

.estudo-tag.documento {
    background-color: #F1F5F9;
    color: #475569;
}

.estudo-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.estudo-card p {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 20px;
}

.btn-read {
    background-color: var(--gray-100);
    color: var(--text-dark);
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-read:hover {
    background-color: var(--gray-200);
}

/* ================= MODAL DA MÃšSICA ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--bg-color);
    width: 90%;
    max-width: 700px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Trava a altura especificamente do Modal de MÃºsicas PÃºblico */
#music-modal .modal-content {
    height: 85vh;
    /* Ocupa exatamente 85% da altura da tela */
    min-height: 500px;
    /* Garante que nÃ£o fique espremido em telas pequenas */
}

.modal-overlay.hidden .modal-content {
    transform: translateY(50px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 25px 30px;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.modal-title-area h2 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.text-muted {
    font-size: 13px;
    color: var(--gray-500);
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-dark);
}

/* Alerta de TransposiÃ§Ã£o de Tom */
.smart-transpose-alert {
    background: linear-gradient(145deg, #FFFBEB, #FEF3C7);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid #FDE68A;
}

.smart-transpose-alert .icon {
    font-size: 24px;
}

.smart-transpose-alert p {
    font-size: 11px;
    color: #92400E;
    margin-top: 3px;
}

.smart-transpose-alert .highlight {
    color: #D97706;
    font-size: 14px;
}

.btn-transpose {
    background-color: #D97706;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.btn-transpose:hover {
    opacity: 0.8;
}

.modal-tabs {
    display: flex;
    padding: 0 30px;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--bg-color);
}

.modal-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.modal-tab:hover {
    color: var(--text-dark);
}

.modal-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Estilos Internos das Abas */
.lyrics-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-500);
    white-space: pre-line;
    text-align: center;
    font-weight: 500;
}

.chords-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-500);
    font-family: monospace;
}

.chords-text .chord {
    color: var(--primary-color);
    font-weight: bold;
}

.drive-link-box {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.drive-link-box p {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 5px;
}

.video-placeholder {
    background-color: var(--sidebar-bg);
    border-radius: 12px;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.video-placeholder .icon {
    font-size: 40px;
    margin-bottom: 10px;
    color: var(--gray-500);
}

/* ================= TELA O SALMISTA ================= */
.salmista-container {
    background-color: var(--bg-color);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-soft);
    width: 100%;
    /* NOVO: ForÃ§a a caixa a preencher a tela igual as outras abas */
    /* Removemos o max-width e a margin para ela seguir o fluxo da pÃ¡gina! */
}

.salmista-header {
    text-align: center;
    margin-bottom: 30px;
}

.salmista-header h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin: 10px 0 5px;
    font-weight: 800;
}

.salmista-header p {
    color: var(--gray-500);
    font-size: 16px;
    font-style: italic;
}

.custom-audio-player {
    background: linear-gradient(145deg, var(--sidebar-bg), #1E293B);
    border-radius: 100px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    color: var(--text-light);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.play-pause-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.play-pause-btn:hover {
    transform: scale(1.08);
    background-color: var(--primary-hover);
}

.progress-container {
    flex: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 12px;
    font-family: monospace;
    color: var(--gray-300);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.salmo-cifra {
    background-color: var(--gray-100);
    padding: 30px;
    border-radius: 16px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    /* NOVO: Se a linha for grande, rola sÃ³ dentro da caixa, nÃ£o a tela inteira */
    border: 1px solid var(--gray-200);
}

/* ================= GLOW-UP: TELA INÃCIO (Tirando o Cinza) ================= */
.premium-info-card {
    background-color: var(--bg-color);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

.premium-info-card:hover {
    transform: translateY(-3px);
    border-color: var(--gray-300);
}

.card-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
}

.reading-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reading-list li {
    font-size: 13px;
    color: var(--gray-500);
}

.reading-list li strong {
    color: var(--text-dark);
}

/* ================= TELA DE ESTUDOS / CURSOS ================= */
.curso-hero {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)), url('https://images.unsplash.com/photo-1510915361894-db8b60106cb1?auto=format&fit=crop&w=1000&q=80') center/cover;
    border-radius: 24px;
    padding: 50px 40px;
    color: white;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}

.tag-novo {
    background-color: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.hero-content h2 {
    font-size: 32px;
    margin: 15px 0 10px;
    font-weight: 800;
}

.hero-content p {
    font-size: 14px;
    color: var(--gray-300);
    max-width: 500px;
    margin-bottom: 25px;
    line-height: 1.6;
}

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

.section-title {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 700;
}

.link-ver-todos {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.link-ver-todos:hover {
    text-decoration: underline;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.curso-card {
    background-color: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    cursor: pointer;
}

.curso-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.curso-thumb {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.curso-info {
    padding: 20px;
}

.curso-info h4 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.curso-info p {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 15px;
}

.curso-meta {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: #FFFBEB;
    padding: 4px 10px;
    border-radius: 10px;
}

/* ================= BANNER INTRODUTÃ“RIO ================= */
.portal-intro-banner {
    background-color: var(--sidebar-bg);
    /* Usa o azul marinho da sidebar */
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.portal-intro-banner .icon {
    font-size: 18px;
}

.portal-intro-banner p {
    margin: 0;
    line-height: 1.4;
}

.portal-intro-banner strong {
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ================= RODAPÃ‰ / ASSINATURA ================= */
.main-footer {
    margin-top: auto;
    /* A mÃ¡gica do Flexbox: empurra o rodapÃ© pro fim da tela */
    padding-top: 40px;
    padding-bottom: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    border-top: 1px solid var(--gray-200);
    /* Linha sutil separando o conteÃºdo */
}

.main-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 800;
    transition: color 0.2s ease;
}

.main-footer a:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* ================= BOTÃƒO APOIE ================= */
.btn-apoie {
    background: linear-gradient(145deg, #EF4444, #B91C1C);
    /* Vermelho premium */
    color: white;
    border: none;
    border-radius: 99px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    flex-shrink: 0;
}

.btn-apoie:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* ================= RESPONSIVIDADE: TABLETS E CELULARES ================= */
@media (max-width: 992px) {

    /* Botão hamburguer: só aparece no mobile */
    #btn-mobile-menu {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background-color: var(--sidebar-bg);
        color: var(--text-light);
        border: none;
        border-radius: 12px;
        padding: 10px 16px;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    /* Empurra o conteúdo para não ficar atrás do botão */
    .app-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 65px;
        padding-bottom: 30px;
    }

    /* Drawer: sai pela esquerda, escondido por padrão */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 260px;
        height: 100vh;
        max-height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 24px 16px;
        border-radius: 0 24px 24px 0;
        z-index: 1000;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
        background-color: var(--sidebar-bg);
        overflow-y: auto;
        overflow-x: hidden;
        transition: left 0.3s ease;
        gap: 20px;
    }

    /* Drawer aberto — visual elegante */
    .sidebar.active {
        left: 0;
        padding: 20px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    }

    /* Logo volta a aparecer dentro do Drawer */
    .logo-box {
        display: flex;
    }

    /* Menu vertical dentro do Drawer */
    .main-menu {
        flex-direction: column;
        gap: 6px;
    }

    .main-menu .menu-btn {
        font-size: 14px;
        padding: 12px 16px;
        background-color: transparent !important;
        box-shadow: none !important;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .main-menu .menu-btn .icon {
        font-size: 20px;
        opacity: 0.7;
    }

    .main-menu .menu-btn.active {
        background-color: var(--primary-color) !important;
        border-radius: 12px;
    }

    .main-menu .menu-btn.active .icon {
        opacity: 1;
    }

    /* Oculta APENAS spans de cadeado injetados pelo JS (aria-hidden e sem classe) */
    /* IMPORTANTE: Não usa span:last-child pois isso ocultaria o texto dos botões */
    .sidebar .menu-btn .lock-icon {
        display: none !important;
    }

    /* Garante que os ícones e textos dos botões estão visíveis */
    .sidebar .menu-btn .icon {
        display: inline-block !important;
        font-size: 20px;
        opacity: 1;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .sidebar .menu-btn {
        color: var(--text-muted);
        font-size: 14px;
    }

    .sidebar .menu-btn.active {
        color: #fff;
    }

    /* Botões extras no Drawer (Apoie, Suporte) */
    .sidebar-footer {
        margin-top: auto;
        padding-top: 20px;
        flex-direction: column;
        gap: 8px;
    }

    .btn-apoie {
        font-size: 13px;
        padding: 12px 16px;
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(255,255,255,0.05);
        border-radius: 12px;
        text-decoration: none;
        color: var(--text-light);
    }

    /* Widget de Data dentro do Drawer */
    .date-widget {
        flex-shrink: 0;
    }

    /* Calendário abre-se como pop-up centrado */
    .date-expanded-area {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 340px;
        background: var(--sidebar-bg);
        border-radius: 20px;
        z-index: 1010;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .date-widget.expanded .date-expanded-area {
        max-height: 70vh;
        padding: 20px;
    }

    /* Ajustes de empilhamento de telas */
    .slide-maker-section,
    .cards-row,
    .tools-grid,
    .vocal-test-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .liturgy-status-card {
        max-width: 100%;
        width: 100%;
    }

    .curso-hero {
        padding: 30px 20px;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .modal-content {
        width: 95%;
        max-height: 85vh;
        word-wrap: break-word;
    }

    #modal-estudo-texto .modal-content {
        padding: 15px !important;
    }

    #modal-estudo-titulo {
        font-size: 18px !important;
        line-height: 1.3;
        white-space: normal;
        margin-bottom: 15px !important;
    }

    .salmista-container {
        padding: 30px 20px;
    }
}

@media (max-width: 600px) {

    /* Ajustes finos para celulares menores */
    .greeting-area h1 {
        font-size: 26px;
    }

    .music-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .music-tags {
        width: 100%;
        justify-content: space-between;
    }

    .salmista-header h2 {
        font-size: 24px;
    }

    .modal-tabs {
        flex-wrap: wrap;
        padding: 0 15px;
    }

    .modal-tab {
        padding: 10px;
        font-size: 13px;
    }

    /* Espreme os ícones na barra para caberem telas fininhas */
    .main-menu .menu-btn {
        padding: 10px 5px;
    }

    .main-menu .menu-btn .icon {
        font-size: 20px;
    }

    .btn-apoie .icon {
        font-size: 22px;
    }

    .date-header .day {
        font-size: 14px;
        width: 30px;
        height: 30px;
    }

    /* Novos Ajustes para a tela O Salmista caber no celular */
    .salmista-container {
        padding: 20px 15px;
    }

    .salmo-cifra {
        padding: 15px;
        width: 100%;
    }

    .custom-audio-player {
        padding: 10px 15px;
        /* Deixa o player mais compacto no celular */
        gap: 10px;
    }

    .chords-text {
        font-size: 13px;
        /* Diminui um pouco a fonte da cifra para caber mais acordes */
    }

    /* 7. Força a redução das letras e acordes injetados pelo JS */
    .linha-cifra span>span {
        font-size: 12px !important;
    }

    .acorde-inline {
        font-size: 11px !important;
    }

    /* Centraliza e empilha o alerta de Tom no mobile */
    .smart-transpose-alert {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .modal-header {
        padding: 12px 20px !important;
        /* Reduz drasticamente o respiro */
        align-items: center !important;
        background-color: var(--bg-color) !important;
        /* Mescla com o fundo para parecer um botÃ£o sÃ³ */
    }

    .modal-title-area h2 {
        font-size: 16px !important;
        /* TÃ­tulo muito menor */
        margin-bottom: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Se o nome for grande, ele corta com "..." */
        max-width: 200px;
    }

    .modal-title-area .text-muted {
        display: none;
        /* Esconde o autor no topo para ganhar altura */
    }

    /* 2. Deixa o botÃ£o de fechar como um botÃ£o circular discreto */
    .btn-close-modal {
        width: 32px;
        height: 32px;
        background: var(--gray-200);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        padding: 0;
    }

    /* 3. Compacta o Alerta de Tom Sugerido (ganha mais espaÃ§o ainda) */
    .smart-transpose-alert {
        padding: 10px 20px !important;
        flex-direction: row !important;
        /* ForÃ§a ficar na mesma linha se couber */
        justify-content: space-between;
    }

    .smart-transpose-alert .icon,
    .smart-transpose-alert p {
        display: none;
        /* Esconde o Ã­cone e a explicaÃ§Ã£o longa no mobile */
    }

    .smart-transpose-alert div strong {
        font-size: 12px;
    }

    /* 4. Ajusta as abas para nÃ£o ocuparem altura excessiva */
    .modal-tab {
        padding: 10px 5px !important;
    }

    /* =======================================================
       GLOW-UP MOBILE: MODAL DE MÚSICA (TELA CHEIA E COMPACTA)
    ======================================================== */

    /* 1. Transforma o Modal em Tela Cheia no celular */
    #music-modal .modal-content {
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* 2. Reduz os respiros gigantes do cabeçalho */
    .modal-header {
        padding: 10px 12px !important;
    }

    /* Diminui o botão enorme de Adicionar ao Roteiro */
    #btn-modal-add-roteiro {
        font-size: 10px !important;
        padding: 6px 10px !important;
        margin-right: 8px !important;
    }

    /* 3. Compacta a área cinza de controles (Tom, Voz, Acordes, Áudio) */
    .music-controls-area {
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    /* Achata o player de áudio */
    #modal-audio-player {
        height: 28px !important;
    }

    /* 4. Encolhe os diagramas de acordes (desenhos do violão) */
    #diagramas-acordes svg {
        width: 35px !important;
        height: 35px !important;
    }

    .diagrama-nome {
        font-size: 11px !important;
        margin-bottom: 2px !important;
    }

    /* 5. Deixa as Abas (Letra, Cifra, Partitura) mais finas */
    .modal-tab {
        padding: 8px 5px !important;
        font-size: 12px !important;
    }

    /* 6. MODO DE LEITURA (Letra e Cifra Menores para caber mais) */
    .modal-body {
        padding: 15px 12px !important;
    }

    .lyrics-text,
    .chords-text {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

}

/* ================= PAINEL ADMINISTRATIVO (BACKOFFICE) ================= */
.admin-stats {
    display: flex;
    gap: 15px;
}

.stat-box {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 15px 20px;
    border-radius: 16px;
    text-align: center;
    min-width: 100px;
}

.stat-box strong {
    display: block;
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 800;
    line-height: 1;
}

.stat-box span {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 5px;
    display: block;
}

.admin-panel-container {
    background-color: var(--bg-color);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.admin-tabs {
    display: flex;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
}

.admin-tab {
    flex: 1;
    min-width: max-content;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
}

.admin-tab:hover {
    color: var(--text-dark);
    background-color: rgba(0, 0, 0, 0.02);
}

.admin-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--bg-color);
}

.admin-content-area {
    padding: 30px;
}

.admin-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-view.active {
    display: block;
}

.admin-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
}

.admin-table th {
    padding: 15px;
    background-color: var(--gray-100);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background-color: #F8FAFC;
}

.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-status.online {
    background-color: #D1FAE5;
    color: #059669;
}

.badge-status.rascunho {
    background-color: #FEF3C7;
    color: #D97706;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .admin-stats {
        flex-wrap: wrap;
    }

    .stat-box {
        flex: 1 1 40%;
    }

    .admin-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-action-bar .custom-input {
        max-width: 100% !important;
    }
}

/* =======================================================
   ESTILIZAÃ‡ÃƒO INTELIGENTE DE CIFRAS (CHORDPRO)
======================================================== */
.lyric-line {
    line-height: 2.6;
    /* DÃ¡ bastante respiro para a linha de cima */
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 6px;
    word-wrap: break-word;
    font-family: 'Inter', sans-serif;
    /* Tira aquela fonte de mÃ¡quina de escrever */
}

.chord-anchor {
    position: relative;
    display: inline-block;
}

.chord {
    position: absolute;
    bottom: 90%;
    /* O Segredo: Sobe exatamente para o teto da sÃ­laba */
    left: 0;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 15px;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-2px);
    /* Ajuste fino de altura */
}

@media (max-width: 600px) {

    /* Achata o cabeÃ§alho e reduz fontes */
    .modal-header {
        padding: 10px 15px !important;
        flex-direction: row;
        align-items: center;
    }

    .modal-title-area h2 {
        font-size: 16px !important;
        margin-bottom: 0 !important;
    }

    /* Esconde o autor no cabeÃ§alho mobile para ganhar altura */
    .modal-title-area .text-muted {
        display: none;
    }

    /* Deixa o botÃ£o de fechar menor */
    .btn-close-modal {
        font-size: 16px;
        padding: 5px;
    }

    /* Compacta o alerta de Tom Sugerido */
    .smart-transpose-alert {
        padding: 8px 15px !important;
    }

    .smart-transpose-alert p {
        display: none;
        /* Esconde a explicaÃ§Ã£o longa */
    }
}

.momento-group-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 10px 5px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 5px;
}

/* =======================================================
   AGRUPAMENTO DE MÃšSICAS (ACORDEÃƒO / SANFONA)
======================================================== */
.momento-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color);
    border: 1px solid var(--gray-200);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    margin: 15px 0 5px 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* TRAVA: Impede que o cabeÃ§alho seja esmagado */
}

.momento-group-header:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
}

.momento-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.momento-icon {
    color: var(--gray-400);
    font-size: 16px;
}

.chevron {
    color: var(--gray-400);
    transition: transform 0.3s ease;
    font-size: 12px;
}

/* Gira a setinha quando a aba Ã© aberta */
.chevron.open {
    transform: rotate(180deg);
}

.momento-group-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    flex-shrink: 0;
    /* TRAVA: Impede que a lista de mÃºsicas seja esmagada */
}

/* Classe que esconde a lista inteira */
.momento-group-content.collapsed {
    display: none;
}

/* Correï¿½ï¿½o do Grid do Formulï¿½rio de Liturgia */
.grid-start {
    align-items: flex-start !important;
}

.grid-start input {
    height: 45px;
    /* Trava a altura do input para ele não tentar ficar do tamanho do textarea */
}

/* ================================= CIFRA CLUB CATÓLICO ================================= */
.linha-cifra {
    position: relative;
    margin-top: 25px;
    line-height: 1.6;
}

.acorde-inline {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}

.diagrama-box {
    text-align: center;
    font-family: sans-serif;
}

.diagrama-nome {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

/* ================================= BOTÃO APOIE ================================= */
.btn-apoie {
    width: 100%;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(217, 119, 6, 0.05));
    color: var(--primary-color);
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-apoie:hover {
    background: rgba(217, 119, 6, 0.25);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.25);
}

/* ================================= MODAL APOIO ================================= */
#modal-apoio .modal-content {
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================================= VALIDADOR: RESULTADO ================================= */
.val-resultado {
    margin-top: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.7;
}

.val-resultado.aprovado {
    background: #D1FAE5;
    border: 1px solid #6EE7B7;
    color: #065F46;
}

.val-resultado.reprovado {
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    color: #7F1D1D;
}

.val-resultado h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}

.val-resultado ul {
    padding-left: 20px;
}

.val-resultado li {
    margin-bottom: 4px;
}

/* =======================================================
   REFINAMENTO MOBILE: BOTTOM BAR E BANNERS
======================================================== */

@media (max-width: 992px) {

    /* 1. Limpa a Barra Inferior: Esconde o "Sair" e o "Admin" */
    .sidebar #btn-menu-logout,
    .sidebar .menu-btn[data-target="admin"] {
        display: none !important;
    }

    /* 2. Garante que o conteúdo role até o final sem a barra tampar */
    .app-container {
        padding-bottom: 120px !important;
    }

    /* 3. Ajusta o espaçamento dos ícones sobreviventes na barra */
    .main-menu {
        gap: 5px;
    }
}

@media (max-width: 600px) {

    /* 4. Arruma o Banner de Cursos/Intro para não cortar o texto */
    .portal-intro-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 10px;
    }

    .portal-intro-banner .icon {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .portal-intro-banner p {
        font-size: 14px;
    }

    /* 5. Ajusta a Saudação e a Badge de Voz no topo */
    .greeting-area h1 {
        justify-content: center;
        font-size: 22px;
    }

    .greeting-area p {
        text-align: center;
    }
}

#notification-container {
    z-index: 99999 !important;
}
.diagrama-svg { width: 130px !important; height: auto !important; flex-shrink: 0; }
@media (min-width: 768px) { .diagrama-svg { width: 65px !important; } }