/* Pequenos ajustes */
#usersTable td {
  vertical-align: middle;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
}

/* Facilitar leitura em tabelas largas */
#usersTable {
  table-layout: fixed;
}

.truncate {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Larguras sugeridas (ajusta conforme preferência) */
#usersTable th.col-name, #usersTable td.col-name { width: 220px; }
#usersTable th.col-sam,  #usersTable td.col-sam  { width: 160px; }
#usersTable th.col-upn,  #usersTable td.col-upn  { width: 260px; }
#usersTable th.col-email, #usersTable td.col-email { width: 280px; min-width: 240px; }
#usersTable th.col-enabled, #usersTable td.col-enabled { width: 90px; text-align: center; }
#usersTable th.col-last, #usersTable td.col-last { width: 160px; }
#usersTable th.col-ou,   #usersTable td.col-ou   { width: 220px; }
#usersTable th.col-vpn,  #usersTable td.col-vpn  { width: 70px; text-align: center; }
#usersTable th.col-vpnipv4,  #usersTable td.col-vpnipv4  { width: 140px; }
#usersTable th.col-flag, #usersTable td.col-flag { width: 90px; text-align: center; }
#usersTable th.col-validado, #usersTable td.col-validado { width: 90px; text-align: center; }
#usersTable th.col-obs, #usersTable td.col-obs { width: 260px; }
#usersTable th.col-dn,   #usersTable td.col-dn   { width: 520px; }

/* Input do Email ocupar a coluna toda */
#usersTable td.col-email input {
  width: 100%;
  min-width: 240px;
  box-sizing: border-box;
}

/* Checkboxes mais visíveis */
#usersTable input.form-check-input {
  transform: scale(1.05);
}

/* Modo compacto */
.table-compact #usersTable td,
.table-compact #usersTable th {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  font-size: 0.86rem;
}

.table-compact .mono {
  font-size: 0.78rem;
}

/* =====================
   Inventário (v10)
   ===================== */
#equipmentsTable td {
  vertical-align: middle;
}

#equipmentsTable {
  table-layout: fixed;
}

#equipmentsTable th.col-eq-name, #equipmentsTable td.col-eq-name { width: 260px; }
#equipmentsTable th.col-eq-type, #equipmentsTable td.col-eq-type { width: 160px; }
#equipmentsTable th.col-eq-status, #equipmentsTable td.col-eq-status { width: 110px; }
#equipmentsTable th.col-eq-user, #equipmentsTable td.col-eq-user { width: 260px; }
#equipmentsTable th.col-eq-loc, #equipmentsTable td.col-eq-loc { width: 200px; }
#equipmentsTable th.col-eq-serial, #equipmentsTable td.col-eq-serial { width: 120px; }
#equipmentsTable th.col-eq-tag, #equipmentsTable td.col-eq-tag { width: 80px; }
#equipmentsTable th.col-eq-date, #equipmentsTable td.col-eq-date { width: 135px; }
#equipmentsTable th.col-eq-actions, #equipmentsTable td.col-eq-actions { width: 320px; white-space: nowrap; }

/* Ações em dropdown (mantém compacto) */
#equipmentsTable td.col-eq-actions .dropdown-toggle {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* =====================
   Wiki
   ===================== */
.wiki-content h1, .wiki-content h2, .wiki-content h3 {
  margin-top: 1rem;
}
.wiki-content pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  padding: 0.75rem;
  overflow: auto;
}
.wiki-content table {
  width: 100%;
}
.wiki-content table th, .wiki-content table td {
  border: 1px solid #dee2e6;
  padding: 0.35rem;
}


/* Support email viewer */
.support-email-body{
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: 0.95rem;
}
.support-email-body pre{
  white-space: pre-wrap;
  margin: 0;
  background: rgba(0,0,0,.03);
  padding: .75rem;
  border-radius: .5rem;
}
.support-email-body .email-quoted{
  padding-left: .75rem;
  border-left: 3px solid rgba(0,0,0,.1);
}

/* Wiki toolbar */
.wiki-toolbar .btn{
  padding: .25rem .5rem;
}

.support-email-body table{ max-width: 100%; }
.support-email-body img{ max-width: 100%; height: auto; }

/* Login */
.login-logo{
  max-width: 220px;
  width: 100%;
  height: auto;
  display: inline-block;
}

.login-logo-wrap{
  background: var(--portal-primary);
  border-radius: 1rem;
  padding: 0.9rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Equipamentos: 4 ações na mesma linha */
.eq-actions-row{
  display: flex;
  flex-wrap: nowrap;
  gap: .25rem;
  justify-content: end;
}
.eq-actions-row .btn{
  white-space: nowrap;
  padding: .15rem .4rem;
  font-size: .78rem;
}


/* Wiki */
.wiki-content img { max-width: 100%; height: auto; }
.mermaid { overflow-x: auto; }
.wiki-attachments .form-control { max-width: 420px; }
