/* v2/assets/css/style11.css */

/* ==================== RESET E TIPOGRAFIA ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  body {
    font-family: 'Roboto', sans-serif;
    background: #fff;
    color: #333;
  }
  /* fundo exclusivo para login */
  body.login-page {
    background: #ececec;
  }
  
  /* ==================== HEADER ==================== */
  header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: #b00020;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 0 16px;
  }
  .menu-icon {
    position: absolute;
    left: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
  }
  .header-logo img {
    height: 42px;
  }
  
  /* ==================== SIDEBAR ==================== */
  .sidebar {
    position: fixed;
    top: 0; left: -250px;
    width: 250px; height: 100%;
    background: #f4f4f4;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    padding-top: 56px;
    transition: left .3s;
    z-index: 999;
  }
  .sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
  }
  .sidebar a i {
    margin-right: 12px;
  }
  .sidebar a:hover {
    background: #e0e0e0;
  }
  body.sidebar-active .sidebar {
    left: 0;
  }
  body.sidebar-active .content {
    /* Remove o deslocamento lateral */
    margin-left: 0;
}

/* Overlay ao fundo */
#overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  z-index: 998;
}

body.sidebar-active #overlay {
  display: block;
}

  
  /* ==================== CONTEÚDO ==================== */
  .content {
    transition: margin-left .3s;
    padding-top: 56px;
  }
  
  /* ==================== CONTAINER GERAL ==================== */
  .container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 16px;
  }
  
  /* ==================== MENSAGENS HISTÓRICO ==================== */
  .instruction {
    color: #a00000;
    text-align: center;
    margin-bottom: 16px;
  }
  .no-history {
    color: #b00020;
    text-align: center;
    margin: 24px 0;
  }
  
  /* ==================== FORMULÁRIOS (FORM-BOX) ==================== */
  .form-box {
    background: #fff;
    padding: 32px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    border: 1px solid #ccc;
  }
  .logo-container {
    text-align: center;
    margin-bottom: 24px;
  }
  .logo-container img {
    max-width: 200px;
    height: auto;
  }
  .form-group {
    margin-bottom: 16px;
  }
  .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
  }
  .form-group input,
  .form-group select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafafa;
    transition: border .2s, background .2s;
  }
  .form-group input:focus,
  .form-group select:focus {
    border-color: #b00020;
    background: #fff;
    outline: none;
  }
  
  /* ==================== BOTÕES ==================== */
  button, .button {
    display: block;
    width: 100%;
    max-width: 240px;
    margin: 24px auto 0;
    background: #b00020;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
    text-align: center;
  }
  button:hover, .button:hover {
    background: #7f0015;
  }
  /* override para ícones + texto ficarem centralizados no "Voltar" */
  a.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: none !important;
  }
  .back-button-wrapper {
    text-align: center;
    margin: 24px 0;
  }
  .back-button-wrapper .button i {
    margin-right: 8px;
  }
  
  /* ==================== RODAPÉ ==================== */
  footer {
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    color: #666;
  }
  
  /* ==================== TÍTULO DE PÁGINA ==================== */
  .page-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 24px;
    color: #333;
  }
  .page-title h1 {
    display: inline-block;
    background: #333333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 24px;
  }
  
  /* ==================== QUESTÕES (start.php) ==================== */
  .quest-header {
    font-size: 14px;
    margin-bottom: 12px;
    color: #555;
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
  }
  .quest-header b {
    color: #333;
  }
  .questao {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: border .2s;
    border: 1px solid #ccc;
  }
  .questao.answered {
    border-color: #007BFF;
  }
  .questao p {
    margin-bottom: 12px;
    line-height: 1.5;
  }
  .alternativa {
    display: block;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
  }
  .alternativa input[type="radio"] {
    margin-right: 8px;
  }
  .alternativa.selected-alt {
    border-color: #888;
    background: #f0f0f0;
  }
  .imgQuestao,
  .imgOpcao {
    max-width: 100%;
    height: auto;
    vertical-align: top;
  }
  
  /* ==================== RESULTADO (submit.php) ==================== */
  .result-box {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  .result-box .page-title {
    margin-bottom: 16px;
  }
  .result-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .metrics {
    flex: 1 1 60%;
    margin-right: 16px;
  }
  .metrics p {
    margin: 8px 0;
    font-size: 16px;
    text-align: left;
  }
  .green   { color: #28a745; }
  .red     { color: #dc3545; }
  .orange  { color: #ffc107; }
  .chart-container {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
  }
  .result-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
  }
  .result-buttons .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    text-decoration: none;
  }
  .no-underline {
    text-decoration: none;
  }
  
  /* ==================== TABELA DE DETALHES ==================== */
  /* todas as <li> recebem contorno transparente por padrão */
.detail-content ul li {
    border: 2px solid transparent;
    list-style: none;
    padding: 4px;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* sobrescreve só a cor da borda nos estados corretos */
.detail-content ul li.correct    { border-color: #28a745; }
.detail-content ul li.wrong      { border-color: #dc3545; }
.detail-content ul li.unanswered { border-color: #007BFF; }


  .table-responsive {
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
  }
  .table-responsive .details-table {
    width: 100%;
  }
  .details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
  }
  .details-table th,
  .details-table td {
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
  }
  .details-table thead th {
    background: #f4f4f4;
  }
  .details-table thead th:nth-child(1) {
    width: 50px;
  }
  
  /* linhas de histórico clicáveis */
  .history-row {
    cursor: pointer;
  }
  .history-row:hover {
    background: #fafafa;
  }
  
  /* ==================== MOBILE ==================== */
  @media (max-width: 767px) {
    /* Tabela mais compacta */
    .details-table {
      font-size: 12px;
    }
    .details-table th,
    .details-table td {
      padding: 6px;
      line-height: 1.3;
    }
    /* Gráfico abaixo das métricas */
    .result-content {
      flex-direction: column;
      align-items: flex-start;
    }
    .metrics {
      flex: 1 1 100%;
      margin-right: 0;
    }
    .chart-container {
      flex: 1 1 100%;
      margin: 16px 0 0;
      height: auto;
    }
  }
  