/* ==== SGW INTERFACE COMPACTA V46 ==== */

/* evita conteúdo cortado e rolagem horizontal */
html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* deixa espaço pequeno para a aba flutuante da sidebar */
body.sgw-sidebar-v39-on {
  padding-left: 28px !important;
}

/* sidebar menor e menos agressiva */
#sgw-sidebar-v39 {
  width: 198px !important;
  transform: translateX(-186px) !important;
  font-size: 12px !important;
}

body.sgw-sidebar-v39-open #sgw-sidebar-v39,
body.sgw-sidebar-v39-pinned #sgw-sidebar-v39,
#sgw-sidebar-v39:hover {
  transform: translateX(0) !important;
}

#sgw-sidebar-hover-v42 {
  width: 10px !important;
}

#sgw-sidebar-pin-v42 {
  left: 12px !important;
  bottom: 12px !important;
  width: 34px !important;
  height: 34px !important;
  font-size: 17px !important;
}

.sgw39-brand {
  padding: 12px 9px 10px !important;
  gap: 7px !important;
}

.sgw39-logo {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
}

.sgw39-title {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

.sgw39-sub {
  font-size: 10px !important;
}

.sgw39-menu {
  padding: 8px 6px 14px !important;
}

.sgw39-section {
  margin-top: 5px !important;
  padding: 5px 7px 3px !important;
  font-size: 9px !important;
}

.sgw39-item {
  min-height: 29px !important;
  padding: 6px 7px !important;
  margin: 1px 0 !important;
  gap: 7px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

.sgw39-ico {
  width: 16px !important;
  flex: 0 0 16px !important;
}

/* compacta páginas gerais */
body {
  font-size: 13px !important;
}

h1 {
  font-size: clamp(26px, 3vw, 42px) !important;
  line-height: 1.08 !important;
}

h2 {
  font-size: clamp(21px, 2.3vw, 30px) !important;
}

h3 {
  font-size: 18px !important;
}

/* cards e caixas mais compactos */
.card,
.sgw-card,
.panel,
.box,
section,
article {
  max-width: 100% !important;
}

.card,
.sgw-card,
.panel,
.box {
  border-radius: 12px !important;
}

/* tabelas cabendo melhor */
table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
}

th,
td {
  padding: 7px 8px !important;
  vertical-align: middle !important;
}

td {
  word-break: break-word !important;
}

td:last-child,
th:last-child {
  white-space: normal !important;
}

/* botões menores */
button,
.btn,
a.btn,
input[type="submit"] {
  font-size: 12px !important;
  padding: 7px 10px !important;
  border-radius: 7px !important;
}

/* inputs compactos */
input,
select,
textarea {
  font-size: 13px !important;
  min-height: 36px !important;
}

/* formulários em grid cabendo melhor */
form {
  max-width: 100% !important;
}

.form-group,
.field,
.input-group {
  min-width: 0 !important;
}

/* modal menor e centralizado */
.modal,
.modal-dialog {
  max-width: min(920px, calc(100vw - 70px)) !important;
}

.modal-content {
  max-width: 100% !important;
}

.modal input,
.modal select,
.modal textarea {
  max-width: 100% !important;
}

/* box dos 3 IPs não sair para fora da tela */
#sgw-3ips-v41,
#sgw-3ips-v44,
#sgw-3ips-v45 {
  max-width: min(520px, calc(100vw - 70px)) !important;
  grid-template-columns: repeat(3, minmax(110px, 1fr)) !important;
  font-size: 11px !important;
}

#sgw-3ips-v41 input,
#sgw-3ips-v44 input,
#sgw-3ips-v45 input {
  font-size: 12px !important;
  padding: 7px !important;
  min-height: 32px !important;
}

/* painel admin: cards mais encaixados */
.admin-card,
.admin-panel,
.admin-box {
  max-width: 100% !important;
}

/* página VPN SSTP admin: cards online menores */
body:has(#sgw-sidebar-v39) .vpn-card,
body:has(#sgw-sidebar-v39) .sstp-card {
  font-size: 12px !important;
}

/* listas de cards em telas largas */
@media (min-width: 1000px) {
  .cards,
  .grid,
  .dashboard-grid,
  .admin-grid {
    gap: 14px !important;
  }
}

/* notebook/tela 1366: compacta mais */
@media (max-width: 1400px) {
  body {
    font-size: 12px !important;
  }

  h1 {
    font-size: 34px !important;
  }

  h2 {
    font-size: 25px !important;
  }

  .card,
  .sgw-card,
  .panel,
  .box {
    padding: 12px !important;
  }

  th,
  td {
    padding: 6px 7px !important;
  }

  button,
  .btn,
  a.btn {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }
}

/* se a sidebar estiver fixada, ainda assim não rouba tela demais */
body.sgw-sidebar-v39-pinned {
  padding-left: 198px !important;
}

/* mobile */
@media (max-width: 900px) {
  body.sgw-sidebar-v39-on,
  body.sgw-sidebar-v39-pinned {
    padding-left: 14px !important;
  }

  #sgw-sidebar-v39 {
    width: 210px !important;
    transform: translateX(-210px) !important;
  }

  body.sgw-sidebar-v39-open #sgw-sidebar-v39,
  body.sgw-sidebar-v39-pinned #sgw-sidebar-v39,
  #sgw-sidebar-v39:hover {
    transform: translateX(0) !important;
  }

  table {
    font-size: 11px !important;
  }

  th,
  td {
    padding: 5px !important;
  }
}

/* ==== FIM SGW INTERFACE COMPACTA V46 ==== */

/* ==== SGW FORCE SIDEBAR FIXA V53 ==== */
body.sgw-sidebar-v39-on,
body.sgw53-sidebar-fixed {
  padding-left:246px!important;
}
#sgw-sidebar-v39 {
  width:246px!important;
  transform:translateX(0)!important;
}
#sgw-sidebar-hover-v42,
#sgw-sidebar-pin-v42 {
  display:none!important;
}
@media(max-width:900px){
  body.sgw-sidebar-v39-on,
  body.sgw53-sidebar-fixed {
    padding-left:218px!important;
  }
  #sgw-sidebar-v39 {
    width:218px!important;
    transform:translateX(0)!important;
  }
}
/* ==== FIM SGW FORCE SIDEBAR FIXA V53 ==== */
