/* ============================================================
   assets/css/estilo.css
   Estilos globais do sistema
   ============================================================ */

/* --- Reset e variáveis ---------------------------------------- */
:root {
  /* VNT Sistemas — azul marinho + verde */
  --primaria:      #1a3a5c;
  --primaria-dark: #0d2240;
  --vnt-verde:     #3ab54a;
  --vnt-verde-dark:#2a8f38;
  --secundaria:    #0d2240;
  --sucesso:       #16a34a;
  --erro:          #dc2626;
  --aviso:         #d97706;
  --info:          #0891b2;
  --cinza-50:      #f8fafc;
  --cinza-100:     #f1f5f9;
  --cinza-200:     #e2e8f0;
  --cinza-400:     #94a3b8;
  --cinza-600:     #475569;
  --cinza-800:     #1e293b;
  --branco:        #ffffff;
  --sombra:        0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --sombra-md:     0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --raio:          8px;
  --raio-lg:       12px;
  --fonte:         'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--fonte);
  font-size: 15px;
  line-height: 1.6;
  color: var(--cinza-800);
  background: var(--cinza-100);
  min-height: 100vh;
}

a { color: var(--primaria); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* --- Layout --------------------------------------------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.pagina-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(145deg, #0d2240 0%, #1a3a5c 60%, #1e4d2b 100%);
  padding: 1rem;
}

/* --- Cards ---------------------------------------------------- */
.card {
  background: var(--branco);
  border-radius: var(--raio-lg);
  box-shadow: var(--sombra);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--cinza-200);
}

.card-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cinza-800);
}

/* --- Formulários ---------------------------------------------- */
.form-grupo {
  margin-bottom: 1rem;
}

.form-grupo label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--cinza-600);
  margin-bottom: .375rem;
}

.form-grupo input,
.form-grupo select,
.form-grupo textarea {
  width: 100%;
  padding: .625rem .875rem;
  font-size: .9375rem;
  font-family: var(--fonte);
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--raio);
  background: var(--branco);
  color: var(--cinza-800);
  transition: border-color .15s, box-shadow .15s;
}

.form-grupo input:focus,
.form-grupo select:focus,
.form-grupo textarea:focus {
  outline: none;
  border-color: var(--primaria);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.form-grupo textarea { resize: vertical; min-height: 80px; }

.form-linha { display: grid; gap: 1rem; }
.form-linha.col-2 { grid-template-columns: 1fr 1fr; }
.form-linha.col-3 { grid-template-columns: 1fr 1fr 1fr; }

/* --- Botões --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .6rem 1.25rem;
  font-size: .9375rem;
  font-weight: 500;
  font-family: var(--fonte);
  border: none;
  border-radius: var(--raio);
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(.98); }

.btn-primario  { background: var(--primaria); color: #fff; }
.btn-primario:hover { background: var(--primaria-dark); }

.btn-sucesso   { background: var(--sucesso); color: #fff; }
.btn-sucesso:hover { background: #15803d; }

.btn-perigo    { background: var(--erro); color: #fff; }
.btn-perigo:hover { background: #b91c1c; }

.btn-secundario { background: var(--cinza-100); color: var(--cinza-800); border: 1px solid var(--cinza-200); }
.btn-secundario:hover { background: var(--cinza-200); }

.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-lg { padding: .875rem 2rem; font-size: 1.0625rem; }
.btn-bloco { width: 100%; justify-content: center; }

/* --- Alertas -------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .875rem 1rem;
  border-radius: var(--raio);
  font-size: .9rem;
  margin-bottom: 1rem;
}

.alert-sucesso { background: #dcfce7; color: #166534; border-left: 4px solid var(--sucesso); }
.alert-erro    { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--erro); }
.alert-aviso   { background: #fef3c7; color: #92400e; border-left: 4px solid var(--aviso); }
.alert-info    { background: #e0f2fe; color: #075985; border-left: 4px solid var(--info); }
.alert-icon    { font-weight: 700; flex-shrink: 0; }

/* --- Tabelas -------------------------------------------------- */
.tabela-wrapper { overflow-x: auto; border-radius: var(--raio); border: 1px solid var(--cinza-200); }

table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--cinza-50);
  padding: .75rem 1rem;
  text-align: left;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--cinza-600);
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--cinza-200);
  white-space: nowrap;
}

tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--cinza-100);
  font-size: .9rem;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--cinza-50); }

/* --- Badges / Status ------------------------------------------ */
.badge {
  display: inline-block;
  padding: .25rem .625rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.badge-ativo     { background: #dcfce7; color: #166534; }
.badge-inativo   { background: var(--cinza-100); color: var(--cinza-600); }
.badge-suspenso  { background: #fee2e2; color: #991b1b; }
.badge-ferias    { background: #dbeafe; color: #1e40af; }
.badge-licenca   { background: #fef3c7; color: #92400e; }

/* --- Navegação lateral ---------------------------------------- */
.nav-lateral {
  width: 240px;
  background: #0d2240;
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1.25rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: .75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem 1.25rem;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}

.nav-link:hover, .nav-link.ativo {
  background: rgba(58,181,74,.12);
  color: #fff;
  border-left-color: #3ab54a;
  text-decoration: none;
}

.nav-secao {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  padding: 1rem 1.25rem .25rem;
}

/* --- Topo ----------------------------------------------------- */
.topo {
  background: var(--branco);
  box-shadow: var(--sombra);
  padding: .875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}

.topo-titulo { font-size: 1.125rem; font-weight: 600; }

/* --- Conteúdo principal --------------------------------------- */
.conteudo-principal {
  margin-left: 240px;
  padding: 1.5rem;
  min-height: 100vh;
}

/* --- Avatar foto ------------------------------------------- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--cinza-200);
}
.avatar-sm  { width: 32px;  height: 32px; }
.avatar-md  { width: 48px;  height: 48px; }
.avatar-lg  { width: 80px;  height: 80px; }
.avatar-xl  { width: 120px; height: 120px; }

/* --- Utilitários ---------------------------------------------- */
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem;  }
.mt-3 { margin-top: 1rem;   }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.text-muted { color: var(--cinza-400); font-size: .875rem; }
.text-direita { text-align: right; }
.flex-entre   { display: flex; align-items: center; justify-content: space-between; }
.flex-gap     { display: flex; align-items: center; gap: .75rem; }

/* --- Responsivo ----------------------------------------------- */
@media (max-width: 768px) {
  .nav-lateral       { display: none; }
  .conteudo-principal{ margin-left: 0; padding: 1rem; }
  .form-linha.col-2,
  .form-linha.col-3  { grid-template-columns: 1fr; }
  .topo              { padding: .75rem 1rem; }
}

/* ── VNT Navbar ──────────────────────────────────────────────── */
.navbar {
  background: var(--primaria-dark);
  border-bottom: 3px solid var(--vnt-verde);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-inner {
  display: flex; align-items: center; gap: 1rem;
  height: 60px;
}
.navbar-brand { display: flex; align-items: center; text-decoration: none; }
.navbar-logo  { height: 36px; width: auto; filter: brightness(0) invert(1); }

.navbar-menu {
  display: flex; align-items: center; gap: .25rem; flex: 1;
  margin-left: 1.5rem;
}
.navbar-menu a {
  color: rgba(255,255,255,.75); text-decoration: none; font-size: .875rem;
  padding: .375rem .75rem; border-radius: var(--raio);
  transition: background .15s, color .15s;
}
.navbar-menu a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.navbar-menu a.ativo  { background: rgba(58,181,74,.2); color: var(--vnt-verde); }

.navbar-user { display: flex; align-items: center; gap: .75rem; }
.navbar-nome { color: rgba(255,255,255,.7); font-size: .875rem; }
.btn-logout  {
  font-size: .8125rem; padding: .3rem .875rem;
  background: rgba(220,38,38,.2); color: #fca5a5;
  border: 1px solid rgba(220,38,38,.3); border-radius: var(--raio);
  text-decoration: none; transition: background .15s;
}
.btn-logout:hover { background: rgba(220,38,38,.35); text-decoration: none; }

/* Botão secundário que pode estar faltando */
.btn-secundario { background: var(--cinza-100); color: var(--cinza-800); border: 1px solid var(--cinza-200); }
.btn-secundario:hover { background: var(--cinza-200); }

@media (max-width: 768px) {
  .navbar-menu { display: none; }
  .navbar-nome { display: none; }
}
