/* style.css - Versão Completa (Final) */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5; 
    margin: 0;
    color: #0b2234; /* Azul Escuro */
}

/* --- HEADER (Branco com Logo Horizontal) --- */
header {
    background-color: #ffffff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #7d9ab8; /* Azul Claro */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

header img {
    height: 50px;
    display: block;
}

header nav {
    display: flex;
    align-items: center;
}

header nav a, header nav span {
    color: #0b2234;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.3s;
}

header nav a:hover {
    color: #7d9ab8;
}

/* --- ESTRUTURA GERAL (Containers e Cards) --- */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    /* Removemos o fundo branco do container geral para usar cards individuais */
}

/* Cards (Blocos brancos) */
.card, .container > .card { /* Garante que divs com class card tenham esse estilo */
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(11, 34, 52, 0.05);
    margin-bottom: 30px;
}

/* Títulos */
h2 {
    color: #0b2234;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

h3 {
    margin-top: 0;
    color: #0b2234;
}

p {
    color: #555;
    line-height: 1.6;
}

/* --- FORMULÁRIOS --- */
form {
    display: flex;
    flex-direction: column;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #0b2234;
    font-size: 0.95em;
    text-align: left;
}

input[type="text"], 
input[type="email"], 
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px; /* Espaço entre campos */
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    background-color: #fafafa;
    transition: border 0.3s;
}

input:focus {
    border-color: #7d9ab8;
    outline: none;
    background-color: #fff;
}

/* --- BOTÕES --- */
button, .btn-acessar {
    background-color: #0b2234;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    text-decoration: none;
}

button:hover, .btn-acessar:hover {
    background-color: #7d9ab8;
    transform: translateY(-1px);
}

/* Links pequenos (Esqueci senha, etc) */
.container p a {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
}
.container p a:hover { text-decoration: underline; }

/* --- LISTA DE DASHBOARDS (O Correção do Texto x Botão) --- */
.dash-item {
    background-color: #fff;
    border: 1px solid #e1e4e8;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 6px solid #7d9ab8; 
    
    /* Flexbox para alinhar texto e botão */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Garante espaço mínimo entre texto e botão */
}

.dash-info {
    flex: 1; /* Ocupa todo o espaço disponível */
    min-width: 0; /* Permite que o texto quebre linha se necessário */
    margin-right: 15px;
}

.dash-info h3 { 
    margin: 0 0 5px 0; 
    color: #0b2234; 
    font-size: 1.2em; 
    text-align: left;
    word-wrap: break-word; /* Quebra palavras muito longas */
}

.dash-info p { 
    margin: 0; 
    color: #666; 
    font-size: 0.95em; 
}

/* Botão específico do dashboard */
a.btn-acessar {
    flex-shrink: 0; /* Impede o botão de ser esmagado */
    width: auto; 
    padding: 10px 25px;
    font-size: 0.9em;
    margin-top: 0;
}

/* --- ESTILOS ESPECÍFICOS DO ADMIN --- */
.admin-container { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
}

.full-width { grid-column: 1 / -1; }
.card-admin { border-left: 5px solid #0b2234; background-color: #fcfcfc; }

/* Tabelas do Admin */
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 12px 10px; border-bottom: 1px solid #eee; text-align: left; font-size: 0.9em; vertical-align: middle; }
th { color: #0b2234; font-weight: 700; background-color: #f9f9f9; }

/* Botões pequenos do Admin */
.btn-small { 
    padding: 6px 12px; 
    font-size: 0.85em; 
    width: auto; 
    margin-right: 5px; 
    margin-bottom: 5px;
}
.btn-del { background-color: #e74c3c; } 
.btn-del:hover { background-color: #c0392b; }

/* Badges e Checkboxes */
.badge { background: #eee; padding: 4px 8px; border-radius: 4px; font-size: 0.85em; color: #555; display: inline-block; margin-bottom: 2px;}

.check-group { 
    max-height: 150px; 
    overflow-y: auto; 
    border: 1px solid #ccc; 
    padding: 10px; 
    border-radius: 4px; 
    background: #fafafa; 
    margin-bottom: 15px;
}
.check-item { display: flex; align-items: center; margin-bottom: 8px; font-weight: normal; font-size: 0.95em; }
.check-item input { width: auto; margin-right: 10px; margin-bottom: 0; }

/* Lista de Dashboards no Admin */
.dash-list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; }
.dash-list-info { flex: 1; padding-right: 10px; }
.dash-list-actions { flex-shrink: 0; white-space: nowrap; }


/* --- TELA CHEIA (Visualizador Power BI) --- */
.iframe-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.voltar-btn { 
    position: fixed; top: 20px; right: 30px; 
    background: #0b2234; color: white; 
    padding: 10px 20px; text-decoration: none; border-radius: 30px; 
    font-weight: bold; z-index: 999; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.voltar-btn:hover { background-color: #7d9ab8; }


/* --- RESPONSIVIDADE (Celular) --- */
@media (max-width: 800px) {
    .container { max-width: 90%; padding: 10px; margin-top: 20px;}
    .admin-container { grid-template-columns: 1fr; }
    
    header { flex-direction: column; gap: 15px; text-align: center; }
    header nav { margin-top: 10px; flex-wrap: wrap; justify-content: center; }
    
    .dash-item { flex-direction: column; text-align: center; gap: 15px; }
    .dash-info { margin-right: 0; }
    a.btn-acessar { width: 100%; }
    
    /* Ajuste para tabelas no celular */
    table, thead, tbody, th, td, tr { display: block; }
    thead tr { position: absolute; top: -9999px; left: -9999px; }
    tr { border: 1px solid #ccc; margin-bottom: 15px; border-radius: 8px; padding: 10px; }
    td { border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; text-align: right; }
    td:before { position: absolute; top: 12px; left: 10px; width: 45%; padding-right: 10px; white-space: nowrap; text-align: left; font-weight: bold; content: attr(data-label); }
}