/* ================================
   Painel Ebookê - Estilos Gerais
   ================================ */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f5f6fa;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container principal */
.painel-ebooke {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ================================
   Header
   ================================ */
.painel-header {
  background: #222;
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.painel-header .logo {
  height: 50px;
}
.painel-header h1 {
  margin: 0;
  font-size: 22px;
}
.painel-header .search-bar {
  padding: 8px;
  width: 300px;
  border-radius: 4px;
  border: none;
}

/* ================================
   Layout principal
   ================================ */
.painel-body {
  display: flex;
  flex: 1;
  margin-bottom: 60px; /* espaço para rodapé fixo */
}

/* Sidebar */
.painel-sidebar {
  width: 220px;
  background: #333;
  color: #fff;
  padding: 20px;
}
.painel-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.painel-sidebar li a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 10px 0;
  transition: color 0.3s;
}
.painel-sidebar li a:hover {
  color: #ffb900;
}

/* Conteúdo principal */
.painel-content {
  flex: 1;
  padding: 30px;
}

/* ================================
   Métricas
   ================================ */
.metricas {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.metricas .box {
  flex: 1;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.metricas .box:nth-child(1) { background: #0073aa; }
.metricas .box:nth-child(2) { background: #46b450; }
.metricas .box:nth-child(3) { background: #dc3232; }
.metricas .box:nth-child(4) { background: #ffb900; color:#000; }
.metricas .box:nth-child(5) { background: #826eb4; }

/* ================================
   Tabela de Aprovações
   ================================ */
.painel-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.painel-content th, .painel-content td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}
.painel-content th {
  background: #f4f4f4;
  font-weight: bold;
}
.painel-content tr:hover {
  background: #f9f9f9;
}
.painel-content a {
  color: #0073aa;
  text-decoration: none;
  font-weight: bold;
}
.painel-content a:hover {
  text-decoration: underline;
}

/* ================================
   Rodapé fixo
   ================================ */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  text-align: center;
  padding: 15px;
  z-index: 1000;
}

/* ================================
   Responsividade
   ================================ */
@media (max-width: 768px) {
  .painel-body {
    flex-direction: column;
    margin-bottom: 80px; /* espaço extra para rodapé fixo em telas menores */
  }
  .painel-sidebar {
    width: 100%;
    /* min-height removido porque 'auto' não é válido */
  }
  .metricas {
    flex-direction: column;
  }
}
