/* Estilos gerais */
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f4f7f9; margin: 0; color: #333; }
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; }

/* Container do Login */
.login-container { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; }
.login-container h1 { margin-top: 0; color: #2c3e50; }
.login-container label { display: block; text-align: left; margin: 15px 0 5px; font-weight: 600; }
.login-container input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.login-container button { width: 100%; padding: 12px; background-color: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; margin-top: 20px; transition: background-color 0.3s; }
.login-container button:hover { background-color: #2980b9; }
.erro { color: #e74c3c; background: #fadbd8; border: 1px solid #e74c3c; padding: 10px; border-radius: 4px; margin-bottom: 15px; }

/* Header do Painel */
.admin-header { background: #2c3e50; color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 1001; position: relative; }
.admin-header h1 { margin: 0; font-size: 1.5rem; }
.header-buttons { display: flex; gap: 15px; }
.btn-header { color: white; text-decoration: none; padding: 8px 15px; border-radius: 4px; transition: background-color 0.3s; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.btn-ver-site { background-color: #3498db; }
.btn-ver-site:hover { background-color: #2980b9; }
.btn-logout { background: #e74c3c; }
.btn-logout:hover { background: #c0392b; }


/* Conteúdo Principal do Painel */
.admin-container { max-width: 900px; margin: 30px auto; padding: 20px; }
.mensagem { padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.sucesso { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.form-section { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 25px; margin-bottom: 30px; scroll-margin-top: 30px; }
.form-section h2 { margin-top: 0; padding-bottom: 15px; border-bottom: 1px solid #eee; margin-bottom: 20px; color: #34495e; display: flex; align-items: center; gap: 10px; font-size: 1.5rem;}
.form-section label { display: block; margin-bottom: 15px; font-weight: 500; }
.form-section input[type="text"], .form-section input[type="email"], .form-section textarea, .form-section select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; margin-top: 5px;}
.form-section textarea { min-height: 80px; resize: vertical; }
.form-section input[type="color"] { width: 60px; height: 40px; padding: 5px; border: 1px solid #ccc; border-radius: 4px; vertical-align: middle; margin-left: 10px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.preview-img { max-width: 100px; max-height: 50px; border: 1px solid #ddd; padding: 5px; border-radius: 4px; vertical-align: middle; margin: 0 10px; }

/* Itens Repetíveis */
.item-repetivel { background: #f9f9f9; border: 1px dashed #ccc; padding: 20px; border-radius: 5px; margin-bottom: 15px; position: relative; }
#add-programacao, #add-patrocinador { background-color: #27ae60; color: white; border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; transition: background-color 0.3s; }
#add-programacao:hover, #add-patrocinador:hover { background-color: #229954; }

/* Botão 'X' de remoção */
.btn-remover { position: absolute; top: 15px; right: 15px; background: #e74c3c; color: white; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-weight: bold; font-size: 16px; line-height: 28px; text-align: center; transition: background-color 0.3s, transform 0.2s; }
.btn-remover:hover { background-color: #c0392b; transform: scale(1.1); }


/* --- NOVO BLOCO DE AÇÕES FLUTUANTES --- */

/* Menu de Navegação Rápida (Flutuante) */
#admin-quick-nav {
    position: fixed;
    bottom: 100px; /* Acima do botão Salvar */
    right: 40px;
    z-index: 998;
    background-color: #34495e;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    padding: 10px 0;
    opacity: 0; /* Começa invisível */
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
#admin-quick-nav.visivel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#admin-quick-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
#admin-quick-nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
    color: #ecf0f1;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.2s ease-in-out;
}
#admin-quick-nav ul li a .fas, 
#admin-quick-nav ul li a .fab {
    font-size: 14px;
    width: 20px;
    text-align: center;
}
#admin-quick-nav ul li a:hover {
    color: #fff;
    background-color: rgba(0,0,0,0.2);
}

/* Botão Salvar (Flutuante) */
.btn-salvar {
    position: fixed;
    bottom: 30px;
    right: 40px;
    z-index: 999;
    width: auto;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #3498db;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0; /* Começa invisível */
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.btn-salvar.visivel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.btn-salvar:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Botão 'Voltar ao Topo' */
#btnTopo {
    display: none;
    position: fixed;
    bottom: 30px; 
    left: 40px;
    z-index: 999;
    background-color: #555;
    color: white;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s, opacity 0.3s, transform 0.3s;
}
#btnTopo.visivel {
    display: flex;
}
#btnTopo:hover {
    background-color: #333;
}

/* Esconde o menu flutuante em telas menores */
@media (max-width: 1200px) {
    #admin-quick-nav {
        display: none;
    }
}