/* ============================================================
   SGCE — Layout unificado (barra azul + menu lateral + listagens)
   Carregado por ULTIMO no template; sobrepoe o estilo antigo.
   ============================================================ */
:root{
  --azul:#185FA5; --azul-esc:#0C447C; --azul-claro:#E6F1FB;
  --pagina:#eef1f5; --superficie:#ffffff; --borda:#e3e8ef;
  --txt:#2c3440; --txt2:#6b7785; --txt3:#9aa4b2;
  --ok:#1a7f37; --ok-bg:#e7f5ec; --pend:#8a6d00; --pend-bg:#fcf3d9;
  --rev:#b42318; --rev-bg:#fdeceb;
  --raio:10px; --topo-h:56px; --side-w:222px;
}
*{ box-sizing:border-box; }
html,body{ background:var(--pagina); }
body{ color:var(--txt); font-family:-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px; margin:0; padding:0; text-align:left; }

/* neutraliza o topo antigo (imagem de fundo / alturas fixas) */
#header_logo{ display:none !important; }
#header_place{ height:auto !important; margin:0 !important; }
#top_right, #top_right_menu{ float:none !important; margin:0 !important; }

/* ---------- Barra superior ---------- */
.sgce-topbar{ position:sticky; top:0; z-index:50; min-height:var(--topo-h);
  background:var(--azul); color:#fff; display:flex; align-items:center;
  justify-content:space-between; padding:0 18px; }
.sgce-brand{ display:flex; align-items:center; gap:12px; }
.sgce-brand img{ height:30px; display:block; }
.sgce-brand .sep{ width:1px; height:26px; background:rgba(255,255,255,.35); }
.sgce-brand .nome{ font-size:14px; color:var(--azul-claro); }
.sgce-user{ display:flex; align-items:center; gap:16px; font-size:13px; }
.sgce-user span.u{ color:var(--azul-claro); display:inline-flex; align-items:center; gap:6px; }
.sgce-user a{ color:#fff !important; display:inline-flex; align-items:center; gap:5px;
  font-weight:normal !important; }
.sgce-user a:hover{ color:#fff !important; opacity:.8; }
.sgce-topbar svg{ width:17px; height:17px; }

/* ---------- Estrutura ---------- */
.sgce-shell{ display:flex; align-items:stretch;
  min-height:calc(100vh - var(--topo-h) - 46px); }
.sgce-side{ width:var(--side-w); flex:none; background:var(--superficie);
  border-right:1px solid var(--borda); padding:8px 0; }
.sgce-main{ flex:1; min-width:0; padding:22px 26px; }

/* ---------- Menu lateral ---------- */
.sgce-nav{ list-style:none; margin:0; padding:0; }
.sgce-nav .grp{ padding:14px 18px 5px; font-size:11px; text-transform:uppercase;
  letter-spacing:.5px; color:var(--txt3); }
.sgce-nav a{ display:flex; align-items:center; gap:10px; padding:9px 18px;
  color:var(--txt) !important; font-size:13.5px; text-decoration:none;
  border-left:3px solid transparent; }
.sgce-nav a:hover{ background:#f3f6fb; color:var(--azul) !important; font-weight:normal; }
.sgce-nav a.ativo{ background:var(--azul-claro); color:var(--azul) !important;
  border-left-color:var(--azul); font-weight:bold; }
.sgce-nav svg{ width:18px; height:18px; flex:none; stroke:currentColor; }

/* ---------- Rodape ---------- */
#footer, .sgce-footer{ background:var(--superficie) !important; border:0 !important;
  border-top:1px solid var(--borda) !important; height:auto !important;
  color:var(--txt3) !important; text-align:center; padding:14px !important;
  font-size:12px; margin:0 !important; }

/* ---------- Conteudo: container FLUIDO (corrige o 960px que cortava dados) --- */
.content{ width:auto !important; }
#center_place{ width:auto !important; max-width:1180px; margin:0 auto !important;
  text-align:left; }

/* ---------- Titulos de pagina ---------- */
.titulo_right{ float:none !important; text-align:left !important; margin:0 0 16px !important; }
.titulo_right h4{ margin:0; font-size:19px; font-weight:600; color:var(--txt); }
.botoes_left br{ display:none; }

/* ---------- Caixa de pesquisa ---------- */
#searchRegister{ width:auto !important; max-width:100%; background:var(--superficie) !important;
  color:var(--txt) !important; border:1px solid var(--borda); border-radius:var(--raio);
  padding:14px 16px !important; margin:0 0 16px !important; }
#searchRegister table, #searchRegister p, #searchRegister b{ color:var(--txt) !important;
  font-weight:600; }
#searchRegister p{ margin:0 0 8px; }
#searchRegister i{ color:var(--txt2); }
.form_left{ float:none !important; margin:0 !important; }

/* ---------- Tabelas / listagens ---------- */
.sgce-main table{ width:100%; border-collapse:collapse; background:var(--superficie); }
.sgce-main #data_table, .sgce-main .center_table{ border:1px solid var(--borda) !important;
  border-radius:var(--raio); box-shadow:none !important; overflow:hidden; padding-top:0 !important; }
.sgce-main #data_table td, .sgce-main .center_table td, .sgce-main table td{
  padding:11px 13px; border-bottom:1px solid var(--borda); vertical-align:middle; }
/* cabecalho azul (primeira linha do data_table) */
.sgce-main #data_table tr:first-child{ background:var(--azul) !important; }
.sgce-main #data_table tr:first-child td{ border-bottom:0; }
.sgce-main #data_table tr:first-child b,
.sgce-main #data_table tr:first-child a{ color:#fff !important; font-weight:600; }
.linha_par{ background:#f7f9fc !important; font-weight:normal; }
.linha_impar{ background:#fff !important; font-weight:normal; }
.sgce-main #data_table tr:not(:first-child):hover td{ background:var(--azul-claro); }
.sgce-main #data_table tr:last-child td{ border-bottom:0; }

/* ---------- Etiquetas de situacao ---------- */
.sit{ display:inline-block; font-size:11.5px; padding:3px 10px; border-radius:20px; font-weight:600; }
.sit-ok{ background:var(--ok-bg); color:var(--ok); }
.sit-pend{ background:var(--pend-bg); color:var(--pend); }
.sit-rev{ background:var(--rev-bg); color:var(--rev); }

/* ---------- Botoes / formularios ---------- */
.sgce-main button, .sgce-main input[type=submit]{ background:var(--azul); color:#fff;
  border:0 !important; border-radius:8px; padding:8px 15px !important; font-size:13px;
  cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.sgce-main button:hover, .sgce-main input[type=submit]:hover{ background:var(--azul-esc); }
.sgce-main input[type=text], .sgce-main input[type=password], .sgce-main input[type=email],
.sgce-main input[type=date], .sgce-main select, .sgce-main textarea{
  border:1px solid #cfd6e0; border-radius:7px; padding:7px 10px; font-size:13px;
  background:#fff; color:var(--txt); }
.sgce-main input:focus, .sgce-main select:focus, .sgce-main textarea:focus{
  outline:none; border-color:var(--azul); box-shadow:0 0 0 3px rgba(24,95,165,.15); }
.big_input{ width:300px; max-width:100%; }
.medium_input{ width:170px; max-width:100%; }

/* ---------- Paginacao ---------- */
.paginacao{ margin-top:16px; text-align:center; font-size:14px; }
.paginacao a, .paginacao strong{ display:inline-block; padding:6px 11px; margin:0 2px;
  border:1px solid var(--borda); border-radius:7px; text-decoration:none; color:var(--azul); }
.paginacao strong{ background:var(--azul); color:#fff; border-color:var(--azul); }

/* ---------- Login ---------- */
#login_place{ width:340px !important; max-width:92vw; border:1px solid var(--borda) !important;
  border-radius:var(--raio) !important; box-shadow:0 8px 30px rgba(20,40,80,.10) !important;
  padding:0 !important; overflow:hidden; background:#fff !important; margin:44px auto !important;
  text-align:center; }
.login-head{ background:var(--azul); padding:22px 16px; text-align:center; }
.login-head img{ height:42px; }
.login-head .ls{ display:block; color:var(--azul-claro); font-size:12px; margin-top:8px; }
.login-body{ padding:22px; }
.login-body table{ width:100%; }
.login-body input[type=text], .login-body input[type=password]{ width:100% !important; }
#login_place button{ background:var(--azul) !important; color:#fff !important; border:0 !important;
  border-radius:8px !important; padding:10px 16px !important; width:100%; justify-content:center;
  display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
#login_place button:hover{ background:var(--azul-esc) !important; }
.login-links{ border-top:1px solid var(--borda); padding:14px 22px; text-align:left; }
.login-links a{ color:var(--azul) !important; display:block; padding:4px 0; font-size:13px; }

/* ---------- Painel (dashboard) — herda principal_view, so ajustes leves ---------- */
.dash-card{ box-shadow:0 1px 3px rgba(20,40,80,.06) !important; }

/* ---------- Responsivo ---------- */
@media (max-width: 820px){
  .sgce-shell{ flex-direction:column; }
  .sgce-side{ width:100%; border-right:0; border-bottom:1px solid var(--borda);
    padding:0; overflow-x:auto; }
  .sgce-nav{ display:flex; align-items:stretch; }
  .sgce-nav .grp{ display:none; }
  .sgce-nav a{ white-space:nowrap; border-left:0; border-bottom:3px solid transparent; }
  .sgce-nav a.ativo{ border-left:0; border-bottom-color:var(--azul); }
  .sgce-main{ padding:16px; }
  .sgce-main table{ display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
}
@media (max-width: 600px){
  .sgce-brand .nome, .sgce-brand .sep{ display:none; }
  .sgce-user span.u .lbl{ display:none; }
}
