/* =========================================================
   PADRÃO VISUAL BITQUALY / RA QUALITY
   Compatível com Bootstrap 3
========================================================= */

/* ===== Paleta base ===== */
:root{
  --bq-primary:#2f80ed;
  --bq-border:#9fb5de;        /* borda principal bem visível */
  --bq-border-soft:#eef2f7;
  --bq-bg:#ffffff;
  --bq-bg-soft:#f8fbff;
  --bq-text:#1f2a37;
  --bq-text-soft:#6b7280;
  --bq-hero-from:#1f4e79;
  --bq-hero-to:#2f80ed;
  --bq-pale-blue:#e3edfc;      /* azul claro sólido (mesmo tom do início da faixa de título) */
  --bq-pale-blue-hover:#d3e2fa;
}

/* =========================================================
   HERO (cabeçalho de destaque — telas iniciais/home de módulo)
========================================================= */

.bq-hero{
  background:linear-gradient(135deg, var(--bq-hero-from) 0%, var(--bq-hero-to) 100%);
  color:#fff;
  border-radius:20px;
  padding:30px;
  margin-bottom:22px;
  box-shadow:0 12px 30px rgba(31, 78, 121, 0.22);
  position:relative;
  overflow:hidden;
}

.bq-hero:before{
  content:"";
  position:absolute;
  right:-70px;
  top:-80px;
  width:230px;
  height:230px;
  background:rgba(255,255,255,0.12);
  border-radius:50%;
}

.bq-hero:after{
  content:"";
  position:absolute;
  right:100px;
  bottom:-90px;
  width:190px;
  height:190px;
  background:rgba(255,255,255,0.08);
  border-radius:50%;
}

.bq-hero-content{
  position:relative;
  z-index:2;
}

.bq-hero h1{
  margin:0;
  font-weight:800;
  letter-spacing:-0.5px;
}

.bq-hero small{
  color:rgba(255,255,255,0.88);
  font-weight:400;
}

.bq-welcome{
  margin-top:14px;
  font-size:17px;
  color:rgba(255,255,255,0.96);
}

.bq-hero-badge{
  display:inline-block;
  margin-top:16px;
  padding:8px 14px;
  background:rgba(255,255,255,0.16);
  border:1px solid rgba(255,255,255,0.25);
  border-radius:30px;
  font-size:13px;
}

.bq-hero-icon-decor{
  font-size:82px;
  opacity:.25;
  margin-top:10px;
}

@media (max-width: 767px){
  .bq-hero{ padding:24px; }
  .bq-hero h1{ font-size:30px; }
}

/* =========================================================
   CARDS (BORDA EXPLÍCITA)
========================================================= */

.bq-card{
  background:var(--bq-bg);
  border:2px solid var(--bq-border);          /* BORDA PRINCIPAL */
  border-radius:14px;
  padding:16px;
  margin-bottom:16px;

  /* reforço visual da borda */
  box-shadow:
    inset 0 0 0 1px #d7e3f7,
    0 6px 14px rgba(0,0,0,.06);
}

/* ===== Título do card ===== */
.bq-card .bq-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 14px 0;
  padding-bottom:10px;
  border-bottom:1px solid var(--bq-border-soft);
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  font-size:13px;
  color:var(--bq-text);
}

/* =========================================================
   BADGE (PREENCHIDA)
========================================================= */

.bq-badge{
  display:inline-block;
  padding:6px 14px;
  border-radius:999px;
  background:var(--bq-primary);
  color:#ffffff;
  font-weight:800;
  font-size:11px;
  letter-spacing:.4px;
  box-shadow:0 2px 6px rgba(47,128,237,.35);
}

/* =========================================================
   FORMULÁRIOS
========================================================= */

.bq-card label{
  font-weight:700;
  color:#334155;
  margin-bottom:6px;
}

.bq-help{
  color:var(--bq-text-soft);
  font-size:12px;
  margin-top:6px;
}

.bq-card .form-control{
  border-radius:10px;
  border:1px solid #dfe7f3;
  box-shadow:none;
}

.bq-card textarea.form-control{
  border-radius:12px;
  resize:vertical;
}

.bq-card .form-control:focus{
  border-color:var(--bq-primary);
  box-shadow:0 0 0 3px rgba(11,94,215,.12);
}

.bq-divider{
  height:1px;
  background:var(--bq-border-soft);
  margin:12px 0 16px;
}

/* =========================================================
   ✅ PADRÃO OFICIAL — PAINEL DE FILTROS DE BUSCA
   (usar em qualquer listagem do sistema: rnc_consultar.php,
   rnc_tratar.php, e módulos futuros)
========================================================= */

.bq-filter-panel{
  background:#f4f6fa;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:14px 16px;
  margin-bottom:16px;
}

.bq-filter-panel .bq-filter-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px 0;
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  font-size:12px;
  color:var(--bq-text);
}

/* Linha única de filtros — não quebra em telas grandes; em telas
   estreitas vira scroll horizontal (nunca empilha campo por campo) */
.bq-filter-row{
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-end;
  gap:10px;
  overflow-x:auto;
  padding-bottom:2px;
}

/* Cada campo: bloco com 2 linhas — nome do campo em cima, input embaixo */
.bq-filter-field{
  display:flex;
  flex-direction:column;
  flex:1 1 90px;
  min-width:90px;
  max-width:150px;
}

.bq-filter-field.bq-filter-field-lg{
  flex:2 1 160px;
  min-width:160px;
  max-width:260px;
}

.bq-filter-field label{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.3px;
  color:#475569;
  margin-bottom:5px;
  white-space:nowrap;
}

.bq-filter-field .form-control{
  border-radius:8px;
  border:1px solid #dbe3ee;
  background:#fff;
  box-shadow:none;
  height:34px;
  font-size:13px;
}

.bq-filter-field .form-control:focus{
  border-color:var(--bq-primary);
  box-shadow:0 0 0 3px rgba(11,94,215,.12);
}

.bq-filter-actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
  margin-left:4px;
}

.bq-filter-actions .bq-btn{
  height:34px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}

@media (max-width: 767px){
  .bq-filter-row{
    flex-wrap:wrap;
    overflow-x:visible;
  }
  .bq-filter-field{ flex:1 1 45%; min-width:0; }
  .bq-filter-actions{
    width:100%;
    margin-left:0;
  }
  .bq-filter-actions .bq-btn{ flex:1 1 auto; justify-content:center; }
}

/* =========================================================
   TABELA DE RESULTADOS — CABEÇALHO
========================================================= */

/* Cabeçalho no estilo do painel de filtros (.bq-filter-panel) —
   PADRÃO OFICIAL escolhido pelo Rodrigo para as tabelas de listagem do RNC.
   Wrapper único com UMA borda só (evita o efeito de "borda dupla" que o
   panel-default do Bootstrap causava quando combinado com a borda do
   cabeçalho). */
.bq-result-panel-b{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
  margin-bottom:16px;
}
.bq-result-header-b{
  display:flex;
  align-items:center;
  background:#f4f6fa;
  border-bottom:1px solid #e2e8f0;
  padding:8px 16px;
}
.bq-result-header-b .bq-result-title-b{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  font-size:12px;
  color:var(--bq-text);
}
.bq-result-header-b .bq-result-title-b .badge{
  background:var(--bq-primary);
  margin-left:2px;
}

/* =========================================================
   ANEXOS
========================================================= */

.bq-files{
  border:2px dashed #dbe7ff;
  background:var(--bq-bg-soft);
  border-radius:14px;
  padding:12px;
}

.bq-files .file-row{
  background:#fff;
  border:1px solid #e8edf5;
  border-radius:12px;
  padding:10px;
  margin-bottom:10px;
}

.bq-files .file-row:last-child{
  margin-bottom:0;
}

/* =========================================================
   BOTÕES BITQUALY (ESTILO BOOTSTRAP)
========================================================= */

.bq-btn{
  display:inline-block;
  padding:6px 12px;
  font-size:14px;
  font-weight:600;
  line-height:1.42857143;
  text-align:center;
  white-space:nowrap;
  vertical-align:middle;
  cursor:pointer;
  user-select:none;
  border:1px solid transparent;
  border-radius:10px;
  background-image:none;
  text-decoration:none !important;
  transition:
    background-color .15s ease-in-out,
    border-color .15s ease-in-out,
    box-shadow .15s ease-in-out;
}

/* ===== Primário ===== */
.bq-btn-primary{
  color:#fff;
  background-color:var(--bq-primary);
  border-color:var(--bq-hero-from);
}

.bq-btn-primary:hover,
.bq-btn-primary:focus{
  background-color:var(--bq-hero-from);
  border-color:#173a5c;
  color:#fff;
}

/* ===== Secundário (com borda) ===== */
.bq-btn-secondary{
  color:#333;
  background-color:#ffffff;
  border-color:#ccc;
}

.bq-btn-secondary:hover,
.bq-btn-secondary:focus{
  background-color:#f2f2f2;
  border-color:#adadad;
  color:#333;
}

/* ===== Sucesso ===== */
.bq-btn-success{
  color:#fff;
  background-color:#5cb85c;
  border-color:#4cae4c;
}

.bq-btn-success:hover{
  background-color:#449d44;
  border-color:#398439;
}

/* ===== Perigo ===== */
.bq-btn-danger{
  color:#fff;
  background-color:#d9534f;
  border-color:#d43f3a;
}

.bq-btn-danger:hover{
  background-color:#c9302c;
  border-color:#ac2925;
}

/* ===== Tamanhos ===== */
.bq-btn-sm{
  padding:5px 10px;
  font-size:12px;
  border-radius:8px;
}

.bq-btn-lg{
  padding:10px 16px;
  font-size:18px;
  border-radius:12px;
}

/* ===== Desabilitado ===== */
.bq-btn[disabled],
.bq-btn.disabled{
  cursor:not-allowed;
  opacity:.65;
  box-shadow:none;
}

/* =========================================================
   MENU PRINCIPAL (menu.php) — gradiente padrão .bq-hero
========================================================= */

.bq-navbar{
  background:linear-gradient(90deg, #eef1f5 0%, var(--bq-pale-blue) 100%);
  border:none;
  border-radius:0;
  margin-bottom:12px;
}

.bq-navbar .container-fluid{
  padding-left:0;
}

.bq-navbar .navbar-header{
  background-color:#eef1f5;
  width:120px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.bq-navbar .navbar-brand{
  padding:0;
  float:none;
  display:flex;
  align-items:center;
  height:auto;
}

.bq-navbar .navbar-nav > li > a{
  color:var(--bq-hero-from);
  opacity:1;
  font-family:'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  text-transform:uppercase;
  font-weight:600;
  font-size:13px;
  letter-spacing:.5px;
}

.bq-navbar .navbar-nav > li > a:hover,
.bq-navbar .navbar-nav > li > a:focus{
  color:var(--bq-hero-from);
  background-color:var(--bq-pale-blue-hover);
}

.bq-navbar .navbar-toggle{
  border-color:rgba(31,78,121,.3);
}

.bq-navbar .navbar-toggle .icon-bar{
  background-color:var(--bq-hero-from);
}

.bq-navbar .navbar-toggle:hover,
.bq-navbar .navbar-toggle:focus{
  background-color:var(--bq-pale-blue-hover);
}

/* Itens estáticos (Qualidade, Planejamento, Compras, Comercial, Recursos Humanos)
   — texto simples, sem indicação de dropdown, sem ação de clique */
.bq-navbar-static{
  cursor:default;
}

.bq-navbar-static:hover,
.bq-navbar-static:focus{
  text-decoration:none;
}

/* =========================================================
   FAIXA COM O NOME DO MÓDULO
   Fica no espaço entre o menu principal e o menu secundário
========================================================= */

.bq-module-band{
  background:linear-gradient(90deg, var(--bq-hero-to) 0%, var(--bq-hero-from) 100%);
  color:#ffffff;
  border-radius:8px;
  padding:6px 18px; /* altura reduzida (era 11px) */
  margin-top:0;
  margin-bottom:12px;
  font-family:'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.6px;
}

.bq-subnav{
  border-bottom:none;
  margin-top:0;
  margin-bottom:0;
  list-style:none;
  padding-left:0;
}

.bq-subnav:after{
  content:"";
  display:table;
  clear:both;
}

.bq-subnav > li{
  float:left;
  margin:0 8px 8px 0;
}

.bq-subnav > li > a{
  display:inline-block;
  border:none;
  border-radius:8px;
  background-color:#eef1f5;
  color:#475569;
  font-family:'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  text-transform:uppercase;
  font-weight:600;
  font-size:12px;
  letter-spacing:.5px;
  padding:10px 18px;
  text-decoration:none !important;
  transition:background-color .15s ease-in-out, color .15s ease-in-out;
}

.bq-subnav > li > a:hover,
.bq-subnav > li > a:focus{
  background-color:#dde2e8;
  color:#334155;
}

.bq-subnav > li.active > a,
.bq-subnav > li.active > a:hover,
.bq-subnav > li.active > a:focus{
  background:linear-gradient(90deg, var(--bq-hero-to) 0%, var(--bq-hero-from) 100%);
  color:#ffffff;
}

/* Dropdown dentro do menu secundário (ex: "Colaboradores" em treinamentos) */
.bq-subnav > li.dropdown > a.dropdown-toggle{
  background-color:#eef1f5;
  color:#475569;
}

.bq-subnav > li.dropdown > a.dropdown-toggle:hover,
.bq-subnav > li.dropdown > a.dropdown-toggle:focus{
  background-color:#dde2e8;
  color:#334155;
}

.bq-subnav > li.dropdown.active > a.dropdown-toggle{
  background:linear-gradient(90deg, var(--bq-hero-to) 0%, var(--bq-hero-from) 100%);
  color:#ffffff;
}

.bq-subnav > li.dropdown > a.dropdown-toggle .caret{
  border-top-color:currentColor;
}

.bq-subnav .dropdown-menu{
  text-transform:none;
  letter-spacing:normal;
  font-weight:400;
}

/* Linha sutil separando o menu secundário do conteúdo do módulo */
.bq-subnav-divider{
  border-bottom:1px solid var(--bq-border-soft);
  margin:0 0 9px 0; /* espaço reduzido pela metade (era 18px) */
}

/* =========================================================
   BLOCO DESCRITIVO (texto explicativo/instrucional estático)
   Diferente de alert-info dinâmico (que mostra estado/resultado
   de uma ação) — este é usado para orientar o usuário sobre a
   tela, então usa tom neutro em vez de azul de "informação".
========================================================= */

.bq-info-block{
  background:#f1f3f5;
  color:var(--bq-text);
  border-radius:8px;
  padding:12px 18px;
  margin-bottom:16px;
  border:1px solid var(--bq-border-soft);
}

.bq-info-block a{
  color:var(--bq-hero-from);
  font-weight:600;
}
