:root {
  --nahtec-azul-escuro: #1e3a63;
  --nahtec-azul: #1f4e8c;
  --nahtec-azul-claro: #2f6fb8;
  --nahtec-borda: #d7dfe8;
  --nahtec-verde: #28a745;
  --nahtec-vermelho: #dc3545;
  --nahtec-cinza: #f4f6f9;
}

body {
  background: var(--nahtec-cinza);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.9rem;
}

.nahtec-sidebar {
  width: 230px;
  min-height: 100vh;
  background: var(--nahtec-azul-escuro);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
}

.nahtec-sidebar .brand {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nahtec-sidebar .brand .diamante {
  width: 22px;
  height: 22px;
  background: #3fd0c9;
  transform: rotate(45deg);
  display: inline-block;
}

.nahtec-sidebar .search-box {
  padding: 10px;
}

.nahtec-sidebar .search-box input {
  width: 100%;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.nahtec-sidebar .nav-section > a,
.nahtec-sidebar .nav-section > .nav-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  color: #dbe6f5;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
}

.nahtec-sidebar .nav-section > a:hover,
.nahtec-sidebar .nav-section > .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nahtec-sidebar .nav-badge {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  font-size: 0.7rem;
  padding: 1px 6px;
}

.nahtec-sidebar .submenu {
  background: rgba(0, 0, 0, 0.15);
}

.nahtec-sidebar .submenu a {
  display: block;
  padding: 7px 16px 7px 30px;
  color: #c4d3e6;
  text-decoration: none;
  font-size: 0.82rem;
}

.nahtec-sidebar .submenu a:hover,
.nahtec-sidebar .submenu a.active {
  background: var(--nahtec-azul-claro);
  color: #fff;
}

.nahtec-main {
  margin-left: 230px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nahtec-topbar {
  background: #fff;
  border-bottom: 1px solid var(--nahtec-borda);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nahtec-content {
  padding: 18px 20px;
  flex: 1;
}

.nahtec-panel-header {
  background: var(--nahtec-azul);
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px 4px 0 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nahtec-panel-body {
  background: #fff;
  border: 1px solid var(--nahtec-borda);
  border-top: none;
  border-radius: 0 0 4px 4px;
  padding: 14px;
  overflow-x: auto;
}

/* ---------- responsividade (celular / tablet) ---------- */

.nahtec-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--nahtec-azul-escuro);
  line-height: 1;
  padding: 4px 8px;
}

.nahtec-sidebar-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .nahtec-sidebar {
    width: 260px;
    max-width: 82vw;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1050;
  }

  .nahtec-sidebar.aberta {
    transform: translateX(0);
  }

  .nahtec-main {
    margin-left: 0;
  }

  .nahtec-menu-toggle {
    display: inline-block;
  }

  .nahtec-topbar {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nahtec-topbar .d-flex.align-items-center.gap-3 {
    flex-wrap: wrap;
    gap: 8px !important;
  }

  .nahtec-content {
    padding: 12px;
  }

  .nahtec-sidebar-backdrop.aberta {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
  }

  table.table-nahtec {
    font-size: 0.82rem;
  }
}

.table-nahtec thead {
  background: #eef2f8;
}

.table-nahtec th {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #57708f;
  border-bottom: 2px solid var(--nahtec-borda);
}

.table-nahtec td {
  vertical-align: middle;
  font-size: 0.85rem;
}

.btn-nahtec {
  background: var(--nahtec-azul-claro);
  border-color: var(--nahtec-azul-claro);
  color: #fff;
}

.btn-nahtec:hover {
  background: var(--nahtec-azul);
  border-color: var(--nahtec-azul);
  color: #fff;
}

.stat-card {
  border-radius: 6px;
  padding: 14px 16px;
  color: #fff;
}

.stat-card .valor {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-card .rotulo {
  font-size: 0.78rem;
  opacity: 0.9;
}

.stat-card.azul { background: var(--nahtec-azul); }
.stat-card.verde { background: #2ea86f; }
.stat-card.amarelo { background: #d6a52a; }
.stat-card.vermelho { background: #c0455b; }

.modal-nahtec .modal-header {
  background: var(--nahtec-azul);
  color: #fff;
}

.login-card {
  max-width: 380px;
  margin: 8vh auto;
  background: #fff;
  border-radius: 8px;
  padding: 30px 26px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a63, #2f6fb8);
  display: flex;
  align-items: center;
}
