@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&display=swap');

/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

/* ===== CORES ===== */
:root {
  --primary: #184f52;
  --secondary: #00c2a8;
  --white: #ffffff;
  --title-font: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

/* ===================================================== */
/* ================= FUNDO ANIMADO ====================== */
/* ===================================================== */

.app-bg {
  position: fixed;
  top: 90px;
  left: 0;
  width: 100%;
  height: calc(100vh - 90px);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0,171,151,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(21,69,79,0.4) 0%, transparent 50%),
    linear-gradient(135deg, #0D2D34 0%, #0a2028 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,171,151,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,171,151,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* FLOATERS */
.hero-floaters {
  position: absolute;
  inset: 0;
}

.floater {
  position: absolute;
  border: 1px solid rgba(0,171,151,0.12);
  animation: float 8s ease-in-out infinite;
}

.floater-1 { width: 110px; height: 110px; top: 18%; right: 14%; }
.floater-2 { width: 55px; height: 55px; top: 55%; right: 28%; }
.floater-3 { width: 180px; height: 180px; top: 28%; right: 6%; }
.floater-4 { width: 38px; height: 38px; top: 72%; right: 42%; background: #00AB97; opacity: 0.05; }

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.login-body .app-bg {
  display: none;
}

/* ===================================================== */
/* ===================== LOGIN ========================== */
/* ===================================================== */

.login-body {
  background: #f4f6f8;
  overflow: hidden;
}

.login-page {
  height: 100vh;
  display: flex;
}

.login-left {
  width: 55%;
  background: linear-gradient(135deg, #184f52, #0f3b3d);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-banner {
  width: 420px;
  max-width: 80%;
}

.login-right {
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 420px;
  background: white;
  padding: 45px;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

/* ===================================================== */
/* ===================== HEADER ========================= */
/* ===================================================== */

.main-header {
  height: 90px;
  background: var(--primary);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  position: absolute;
  left: 40px;
}

.logo img {
  height: 225px;
}

/* ================= MENU MODERNO ================= */

.menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

/* manter no header apenas o acesso rapido para Menu */
.main-header .menu {
  display: flex;
}

.main-header .menu a:not(:first-child) {
  display: none !important;
}


/* BOTÕES */
.menu a {
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;

  color: #d1d5db;
  background: rgba(255,255,255,0.05);

  border: 1px solid rgba(255,255,255,0.1);

  transition: all 0.25s ease;
}

/* HOVER */
.menu a:hover {
  color: white;
  background: linear-gradient(135deg, #00c2a8, #0072ff);
  border-color: transparent;
  transform: translateY(-2px);
}

/* ATIVO */
.menu a.active {
  color: white;
  background: linear-gradient(135deg, #00c2a8, #0072ff);
  box-shadow: 0 0 10px rgba(0, 194, 168, 0.5);
}

/* DIREITA */
.header-right {
  position: absolute;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.dashboard-top-container .header-right {
  right: clamp(18px, 4vw, 48px);
  gap: 8px;
}

.dashboard-top-container .header-right .logout-btn {
  margin-left: 12px;
}

.dashboard-header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: center;
}

.dashboard-top-container {
  padding-left: 280px;
  padding-right: 150px;
}

.dashboard-top-container .dashboard-header-nav {
  width: 100%;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  justify-content: flex-start;
}

.dashboard-pages-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}

.dashboard-pages-label {
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-page-select {
  height: 34px;
  min-width: 210px;
  max-width: 260px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(9, 52, 55, 0.9);
  color: #fff;
  padding: 0 30px 0 10px;
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='16' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.dashboard-page-select:focus {
  outline: none;
  border-color: #00c2a8;
  box-shadow: 0 0 0 2px rgba(0,194,168,0.22);
}

.dashboard-top-container .dashboard-page-select {
  min-width: 145px;
  max-width: 165px;
  height: 31px;
  font-size: 12px;
  padding-right: 24px;
}

.dashboard-top-container .dashboard-pages-nav {
  padding: 4px 7px;
  gap: 6px;
}

.dashboard-top-container #dashboardListNav {
  margin-left: 10px;
}

.dashboard-top-container .dashboard-pages-label {
  font-size: 12px;
}

.next-page-btn {
  white-space: nowrap;
  font-weight: 600;
}

.page-nav-btn {
  white-space: nowrap;
}

.mini-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
  min-height: 31px;
  text-align: center;
}

.dashboard-view-body .dashboard-top-container .header-right .logout-btn {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 31px;
}

/* BOTÕES */
.main-header a,
.main-header button {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

.main-header a:hover,
.main-header button:hover {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: translateY(-2px);
}

/* USER */
.user-label {
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-family: var(--title-font);
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.user-label-prefix {
  color: rgba(255,255,255,0.92);
}

.user-label-name {
  color: #00ab97;
}

/* ===================================================== */
/* ===================== DASHBOARD ====================== */
/* ===================================================== */

.dashboard-body {
  padding-top: 120px;
}

.dashboard-container {
  max-width: 1400px;
  margin: 10px auto 40px auto;
  padding: 30px 40px 40px 40px;
}

.dashboard-body.with-side-menu:not(.dashboard-view-body) .dashboard-container {
  padding-left: 96px;
}

.dashboard-body.dashboard-list-view.with-side-menu:not(.dashboard-view-body) .dashboard-container {
  margin-top: 0;
  padding-top: 8px;
}

.dashboard-body.dashboard-admin-view.with-side-menu:not(.dashboard-view-body) .dashboard-container {
  margin-top: 0;
  padding-top: 8px;
}

.dashboard-title {
  color: white;
  font-size: 28px;
  font-family: var(--title-font);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.dashboard-subtitle {
  color: rgba(255,255,255,0.7);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.login-logo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 20, 24, 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.login-logo-overlay.show {
  opacity: 1;
}

.login-logo-popup {
  width: min(420px, 76vw);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(0,194,168,0.32);
  background: linear-gradient(135deg, rgba(12,55,60,0.88), rgba(8,36,41,0.92));
  box-shadow: 0 20px 50px rgba(0,0,0,0.42);
  animation: loginLogoPulse 1.2s ease-in-out infinite;
}

.login-logo-popup img {
  width: min(360px, 72vw);
  max-width: 100%;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
  animation: loginLogoFloat 1.9s ease-in-out infinite;
}

@keyframes loginLogoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes loginLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.dashboard-card {
  height: 200px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  background: linear-gradient(135deg, #184f52, #0f3b3d);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.25s ease;
}

.dashboard-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* ===================================================== */
/* ================= MENU LATERAL HOVER ================ */
/* ===================================================== */

.side-hover-nav {
  position: fixed;
  top: 90px;
  bottom: 0;
  left: 0;
  z-index: 9;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.side-hover-dots {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  align-self: stretch;
  padding: 44px 10px 16px;
  min-height: calc(100vh - 90px);
  background: linear-gradient(180deg, #082c31, #06242a);
  border-right: 1px solid rgba(255,255,255,0.06);
  border-radius: 0;
  backdrop-filter: none;
}

.side-dot-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0, 194, 168, 0.45);
  background: rgba(11, 62, 66, 0.55);
  color: #dcfdf9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.side-dot-icon {
  width: 72%;
  height: 72%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.side-dot-btn:hover,
.side-dot-btn.active {
  transform: translateX(3px);
  background: linear-gradient(135deg, #0e9f90, #11796f);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.side-hover-panel,
.side-pages-panel {
  margin-top: 2px;
  min-height: 520px;
  width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-12px);
  transition: width 0.24s ease, opacity 0.2s ease, transform 0.22s ease;
}

.side-hover-panel {
  background: linear-gradient(180deg, #125252, #0d4246);
  border: 1px solid rgba(0, 194, 168, 0.24);
  border-left: none;
  border-radius: 0 14px 14px 0;
  padding: 22px 18px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.28);
}

.side-pages-panel {
  background: linear-gradient(180deg, #15605f, #0f4c50);
  border: 1px solid rgba(0, 194, 168, 0.3);
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.28);
}

.side-hover-nav.open .side-hover-panel {
  width: 320px;
  opacity: 1;
  transform: translateX(0);
}

.side-hover-nav.open.show-pages .side-pages-panel {
  width: 300px;
  opacity: 1;
  transform: translateX(0);
}

.side-panel-title,
.side-pages-title {
  color: #eefcf8;
  font-size: 16px;
  font-family: var(--title-font);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.side-dashboard-list,
.side-pages-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding-right: 4px;
}

.side-dashboard-item button,
.side-page-item button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(7, 39, 44, 0.62);
  color: #eefcf8;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.side-dashboard-item button:hover,
.side-dashboard-item button.active,
.side-page-item button:hover {
  background: rgba(8, 49, 54, 0.78);
  border-color: rgba(0, 194, 168, 0.55);
  transform: translateX(3px);
}

.side-page-item button {
  background: rgba(17, 70, 74, 0.62);
  border-color: rgba(164, 235, 226, 0.22);
}

.side-page-item button:hover {
  background: rgba(20, 85, 88, 0.72);
  border-color: rgba(0, 194, 168, 0.6);
}

@media (max-width: 1200px) and (min-width: 761px) {
  .dashboard-body:not(.dashboard-view-body) .dashboard-container {
    padding-left: 86px;
  }

  .side-hover-nav {
    gap: 10px;
  }

  .side-hover-dots {
    gap: 10px;
    padding: 14px 8px 12px;
  }

  .side-dot-btn {
    width: 36px;
    height: 36px;
    font-size: 10px;
  }

  .side-hover-nav.open .side-hover-panel {
    width: 260px;
  }

  .side-hover-nav.open.show-pages .side-pages-panel {
    width: 240px;
  }
}

@media (max-width: 760px) {
  .side-hover-nav {
    display: none !important;
  }

  .dashboard-body:not(.dashboard-view-body) .dashboard-container {
    padding-left: 16px;
  }

  .dashboard-body.with-side-menu:not(.dashboard-view-body) .dashboard-container {
    padding-left: 16px;
  }
}

/* ===================================================== */
/* ===================== POWER BI ======================= */
/* ===================================================== */

.report-container {
  width: 100%;
  height: calc(100vh - 120px);
}

.report-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Gambiarra visual para ocultar barra superior do link publico do Power BI */
.dashboard-body .report-container.report-crop-pbi {
  position: relative;
  overflow: hidden;
  height: calc(100vh - 90px);
  --pbi-bottom-crop: 110px;
}

.dashboard-body .report-container.report-crop-pbi iframe {
  display: block;
  width: 100%;
  height: calc(100% + var(--pbi-bottom-crop));
  transform: none;
  border: none;
}

@media (max-width: 900px) {
  .dashboard-body .report-container.report-crop-pbi {
    --pbi-bottom-crop: 92px;
  }
}

/* ===================================================== */
/* ===================== MODAL ========================== */
/* ===================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-box {
  width: 420px;
  background: #0f3b3d;
  padding: 30px;
  border-radius: 16px;
  color: white;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ===================================================== */
/* 🔥 RESPONSIVO PROGRESSIVO */
/* ===================================================== */

@media (max-width: 1250px) {
  .user-label {
    display: none;
  }
}

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

@media (max-width: 800px) {
  .dashboard-body:not(.dashboard-view-body) .header-right {
    display: flex;
    position: static;
    margin-left: auto;
    gap: 6px;
  }

  .dashboard-body:not(.dashboard-view-body) .header-right .admin-btn,
  .dashboard-body:not(.dashboard-view-body) .header-right .logout-btn,
  .dashboard-body:not(.dashboard-view-body) .header-right > button:not(.mini-nav-btn) {
    min-height: 30px;
    width: auto;
    min-width: 68px;
    padding: 6px 10px;
    font-size: 11px;
  }
}

@media (max-width: 980px) {
  .dashboard-pages-label {
    display: none;
  }

  .dashboard-page-select {
    min-width: 160px;
  }

  .dashboard-body:not(.dashboard-view-body) .dashboard-container {
    margin-top: 0;
    padding: 18px 16px 28px;
  }

  .dashboard-body:not(.dashboard-view-body) .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
  }

  .dashboard-body:not(.dashboard-view-body) .dashboard-card {
    height: 170px;
  }

  .dashboard-body:not(.dashboard-view-body) .dashboard-title {
    font-size: 24px;
    line-height: 1.15;
  }

  .dashboard-body:not(.dashboard-view-body) .dashboard-subtitle {
    font-size: 16px;
  }

}

@media (max-width: 980px) and (min-width: 761px) {
  .dashboard-body:not(.dashboard-view-body) .dashboard-container {
    padding-left: 86px;
    padding-right: 16px;
  }
}

@media (max-width: 1400px) {
  .dashboard-top-container {
    padding-left: 235px;
    padding-right: 120px;
  }
}

@media (max-width: 1100px) {
  .dashboard-top-container {
    padding-left: 190px;
    padding-right: 90px;
  }
}

/* ===================================================== */
/* 🔥 HEADER SIMPLES */
/* ===================================================== */

@media (max-width: 1200px) {

  .menu {
    display: none;
  }

  .dashboard-body:not(.dashboard-view-body) .header-container {
    justify-content: space-between;
    padding: 0 12px;
  }

  .dashboard-body:not(.dashboard-view-body) .logo {
    position: static;
  }

  .dashboard-body:not(.dashboard-view-body) .logo img {
    height: clamp(120px, 22vw, 160px);
  }

  .dashboard-body:not(.dashboard-view-body) .header-right {
    display: flex;
    position: static;
    margin-left: auto;
    gap: 8px;
    flex-shrink: 0;
  }
}

/* ===================================================== */
/* FOOTER */
/* ===================================================== */

.footer-powered {
  position: fixed;
  bottom: 10px;
  right: 20px;
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  z-index: 5;
}

.footer-powered strong {
  color: #00c2a8;
}

.config-icon {
  width: 55px;
  height: 40px;
  cursor: pointer;
  opacity: 0.9;
  margin: 0 8px;
}

/* ===================================================== */
/* DROPDOWN ADMIN */
/* ===================================================== */

.dropdown-admin {
  position: relative;
}

.admin-btn,
.logout-btn {
  padding: 6px 12px;
  width: 108px;
  min-height: 31px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: 0.25s;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.logout-btn {
  width: 92px;
}

.admin-btn:hover,
.logout-btn:hover {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: translateY(-2px);
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 45px;
  background: #0f3b3d;
  border-radius: 10px;
  overflow: hidden;
  min-width: 220px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.dropdown-content a {
  display: block;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: 0.2s;
}

.dropdown-content a:hover {
  background: rgba(255,255,255,0.1);
}

.dropdown-admin.active .dropdown-content {
  display: block;
}

/* ===================================================== */
/* ================= USERS / ADMIN ====================== */
/* ===================================================== */

.form-box {
  max-width: 500px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-box-dashboard {
  max-width: 100%;
  width: 100%;
  background: rgba(9, 45, 51, 0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px;
}

.dashboard-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.dashboard-form-panel,
.dashboard-pages-panel {
  background: rgba(8, 32, 36, 0.45);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
}

.dashboard-form-section-title {
  color: #e7f7f3;
  font-size: 18px;
  font-weight: 700;
}

.dashboard-form-hint {
  color: rgba(231,247,243,0.72);
  font-size: 13px;
  margin-top: -2px;
}

.form-box input,
.form-box select {
  height: 45px;
  border-radius: 10px;
  border: 1px solid rgba(0, 171, 151, 0.35);
  padding: 0 12px;
  background: rgba(0, 171, 151, 0.18);
  color: #eaf7f5;
}

.form-box input::placeholder {
  color: rgba(234, 247, 245, 0.72);
}

.form-box input:focus,
.form-box select:focus {
  outline: none;
  border-color: #00c2a8;
  box-shadow: 0 0 0 2px rgba(0, 194, 168, 0.22);
  background: rgba(0, 171, 151, 0.24);
}

.form-box select option {
  background: #0f3b3d;
  color: #eaf7f5;
}

.form-box button {
  height: 45px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #184f52, #00c2a8);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.admin-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.users-box {
  flex: 1;
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
}

.users-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.users-box-header h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.users-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 10px;
  border: 1px solid rgba(0, 194, 168, 0.24);
  border-radius: 10px;
  background: rgba(3, 31, 38, 0.56);
}

.users-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
}

.users-filter-field-small {
  min-width: 190px;
}

.users-filter-field span {
  color: rgba(234, 247, 245, 0.86);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.users-box .users-filters .users-filter-field input,
.users-box .users-filters .users-filter-field select {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px;
  border-radius: 8px !important;
  border: 1px solid rgba(0, 194, 168, 0.34) !important;
  background: rgba(7, 43, 48, 0.92) !important;
  color: #eaf7f5 !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.users-box .users-filters .users-filter-field select {
  cursor: pointer;
}

.users-box .users-filters .users-filter-field input:focus,
.users-box .users-filters .users-filter-field select:focus {
  border-color: #00c2a8 !important;
  box-shadow: 0 0 0 2px rgba(0, 194, 168, 0.22) !important;
  background: rgba(6, 58, 62, 0.96) !important;
}

.users-box .users-filters .users-filter-field input::placeholder {
  color: rgba(234, 247, 245, 0.52);
}

.users-filter-field select option {
  background: #0f3b3d;
  color: #eaf7f5;
}

@media (max-width: 760px) {
  .users-box-header {
    align-items: stretch;
    flex-direction: column;
  }

  .users-filters,
  .users-filter-field,
  .users-filter-field-small {
    width: 100%;
    min-width: 0;
  }
}

.usuarios-existentes-box {
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid rgba(0, 194, 168, 0.35);
  border-radius: 12px;
  background: rgba(2, 32, 40, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.usuarios-existentes-box h4 {
  margin: 0 0 4px;
  color: #e6f4f3;
  font-size: 20px;
}

.usuarios-existentes-subtitle {
  margin: 0 0 12px;
  color: rgba(226, 238, 237, 0.82);
  font-size: 14px;
}

.btn-add-existing {
  width: 100%;
  min-height: 45px;
}

.btn-open-ad-modal {
  width: 100%;
  min-height: 42px;
  background: linear-gradient(135deg, #155e75, #0f766e);
  color: #fff;
}

.btn-open-ad-modal:hover {
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.35);
}

.usuarios-existentes-hint {
  display: block;
  margin-top: 8px;
  color: rgba(226, 238, 237, 0.72);
  font-size: 13px;
}

.usuario-existente-lista {
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(0, 194, 168, 0.45);
  border-radius: 10px;
  background: rgba(7, 69, 82, 0.95);
  padding: 6px;
  margin-top: -2px;
}

.usuario-existente-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  border: 0;
  background: transparent;
  color: #effafa;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.usuario-existente-item:hover {
  background: rgba(0, 194, 168, 0.2);
}

.usuario-existente-item-name {
  font-size: 15px;
  font-weight: 700;
}

.usuario-existente-item-email {
  font-size: 13px;
  opacity: 0.86;
}

.modal-subtitle {
  color: rgba(226, 238, 237, 0.78);
  font-size: 14px;
  margin: 8px 0 14px;
}

.modal-ad-users-box {
  max-width: 860px;
}

.ad-modal-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.ad-modal-toolbar input[type="text"] {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(0, 194, 168, 0.45);
  background: rgba(7, 69, 82, 0.92);
  color: #ecfeff;
  padding: 0 12px;
}

.ad-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d9f3f1;
  font-size: 13px;
  white-space: nowrap;
}

.ad-usuarios-resumo {
  font-size: 13px;
  color: rgba(214, 231, 229, 0.9);
  margin-bottom: 8px;
}

.ad-usuarios-lista {
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid rgba(0, 194, 168, 0.35);
  border-radius: 10px;
  background: rgba(4, 45, 56, 0.72);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-usuario-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.ad-usuario-item-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ad-usuario-item-name {
  color: #ecfdf5;
  font-size: 14px;
  font-weight: 600;
}

.ad-usuario-item-email {
  color: rgba(216, 243, 240, 0.9);
  font-size: 13px;
}

.ad-usuario-item-status {
  font-size: 12px;
  color: rgba(216, 243, 240, 0.78);
}

.ad-usuario-item-status.ok {
  color: #86efac;
}

.ad-usuario-item-status.exists {
  color: #fde68a;
}

@media (max-width: 760px) {
  .ad-modal-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ad-select-all-label {
    justify-content: flex-start;
  }
}

/* ================= TABELA ================= */

.users-table {
  width: 100%;
  color: white;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}

/* ================= BOTÕES ================= */

.btn-delete {
  background: #ff4d4d;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

.btn-perm {
  background: #00c2a8;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  margin-right: 5px;
}

.btn-action {
  border: none;
  padding: 6px 12px;
  margin: 2px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

/* ===================================================== */
/* 🔥 CORREÇÃO FINAL DEFINITIVA (NÃO QUEBRA NADA) */
/* ===================================================== */

.admin-container .users-box {
  overflow-x: auto;
}

.admin-container .users-table {
  width: 100%;
  table-layout: fixed;
}

/* ===== COLUNAS ===== */

/* Nome */
.admin-container .users-table th:nth-child(1),
.admin-container .users-table td:nth-child(1) {
  width: 25%;
}

/* Email (maior) */
.admin-container .users-table th:nth-child(2),
.admin-container .users-table td:nth-child(2) {
  width: 30%;
}

/* Setor (menor) */
.admin-container .users-table th:nth-child(3),
.admin-container .users-table td:nth-child(3) {
  width: 20%;
}

/* Admin */
.admin-container .users-table th:nth-child(4),
.admin-container .users-table td:nth-child(4) {
  width: 10%;
  text-align: center;
}

/* Ações */
.admin-container .users-table th:nth-child(5),
.admin-container .users-table td:nth-child(5) {
  width: 15%;
  text-align: right;
  white-space: nowrap;

  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

/* inputs não estouram */
.admin-container .users-table input,
.admin-container .users-table select {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* botões alinhados */
.admin-container .users-table td:nth-child(5) button {
  flex-shrink: 0;
}

/* ===================================================== */
/* 🔥 RESTAURA ESTILO BONITO DOS INPUTS (DASHBOARD) */
/* ===================================================== */

/* inputs (nome + link) */
.users-table input {
  height: 40px;
  border-radius: 8px;
  padding: 0 10px;

  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: white;

  font-size: 14px;

  transition: all 0.2s ease;
}

/* hover */
.users-table input:hover {
  border-color: #00c2a8;
}

/* foco */
.users-table input:focus {
  outline: none;
  border-color: #00c2a8;
  box-shadow: 0 0 0 2px rgba(0,194,168,0.25);
  background: rgba(255,255,255,0.12);
}

/* select bonito (categoria) */
.users-table select {
  height: 40px;
  border-radius: 8px;

  padding: 0 35px 0 10px;

  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: white;

  font-size: 14px;
  cursor: pointer;

  transition: all 0.2s ease;

  appearance: none;

  /* seta moderna */
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='18' viewBox='0 0 20 20' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* hover */
.users-table select:hover {
  border-color: #00c2a8;
}

/* foco */
.users-table select:focus {
  outline: none;
  border-color: #00c2a8;
  box-shadow: 0 0 0 2px rgba(0,194,168,0.25);
  background: rgba(255,255,255,0.12);
}

/* placeholder mais suave */
.users-table input::placeholder {
  color: rgba(255,255,255,0.5);
}

/* ===================================================== */
/* 🔥 CORREÇÃO DROPDOWN BRANCO (REAL) */
/* ===================================================== */

/* remove comportamento que quebra o select */
.users-table {
  table-layout: auto !important;
}

/* garante que select não estique errado */
.users-table select {
  width: 100%;
  max-width: 100%;
}

/* corrige altura visual do dropdown */
.users-table select option {
  padding: 8px;
}

/* remove "espaço fantasma" */
.users-table td {
  overflow: visible;
}

/* ===================================================== */
/* 🔥 RESTAURA LOGIN BONITO */
/* ===================================================== */

.login-card input {
  width: 100%;
  height: 48px;

  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.1);

  padding: 0 15px;

  background: #f9fafb;
  color: #111;

  font-size: 14px;

  transition: all 0.2s ease;
}

/* hover */
.login-card input:hover {
  border-color: #00c2a8;
}

/* foco */
.login-card input:focus {
  outline: none;
  border-color: #00c2a8;
  box-shadow: 0 0 0 2px rgba(0,194,168,0.2);
  background: #ffffff;
}

/* botão bonito de novo */
.login-card button {
  width: 100%;
  height: 48px;

  border-radius: 10px;
  border: none;

  background: linear-gradient(90deg, #184f52, #00c2a8);
  color: white;

  font-weight: bold;
  font-size: 15px;

  cursor: pointer;

  transition: all 0.2s ease;
}

.login-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,194,168,0.3);
}

/* ===================================================== */
/* 🔥 LOGIN ESTILO CLEAN (IGUAL SEGUNDA IMAGEM) */
/* ===================================================== */

.login-card {
  background: #f8f9fb;
  border-radius: 20px;
  padding: 40px;
}

/* INPUTS */
.login-card input {
  width: 100%;
  height: 50px;

  border-radius: 12px;
  border: 1px solid #e5e7eb;

  padding: 0 16px;

  background: #f3f4f6;
  color: #111827;

  font-size: 14px;

  transition: all 0.2s ease;
}

/* placeholder */
.login-card input::placeholder {
  color: #9ca3af;
}

/* hover */
.login-card input:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

/* foco */
.login-card input:focus {
  outline: none;
  border-color: #00c2a8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0,194,168,0.15);
}

/* TEXTO EX */
.login-tip {
  color: #6b7280;
  font-size: 13px;
}

/* BOTÃO */
.login-card button {
  width: 100%;
  height: 52px;

  border-radius: 12px;
  border: none;

  background: linear-gradient(90deg, #184f52, #00c2a8);
  color: white;

  font-size: 16px;
  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;
}

/* hover botão */
.login-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,194,168,0.25);
}

/* ===================================================== */
/* 🔥 ESPAÇAMENTO LOGIN (REFINAMENTO FINAL) */
/* ===================================================== */

/* container geral */
.login-card {
  padding: 45px 40px;
}

/* "Portal do Cliente" */
.login-card .small-title {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

/* título principal */
.login-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
}

/* descrição */
.login-card p {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 25px;
  max-width: 320px;
}

/* inputs (espaçamento entre eles) */
.login-card input {
  margin-bottom: 12px;
}

/* texto exemplo */
.login-tip {
  margin-top: 5px;
  margin-bottom: 18px;
  display: block;
}

/* botão */
.login-card button {
  margin-top: 5px;
}

/* ===================================================== */
/* 🔥 CORREÇÃO COLUNA AÇÕES (USUÁRIOS) */
/* ===================================================== */

/* REMOVE FLEX DO TD */
.admin-container .users-table td:nth-child(5) {
  display: table-cell !important;
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

/* container interno dos botões */
.admin-container .users-table td:nth-child(5) .acoes-wrapper {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* se não tiver wrapper, aplica direto */
.admin-container .users-table td:nth-child(5) button {
  margin-left: 6px;
}

/* HEADER AÇÕES CENTRALIZADO COM OS BOTÕES */
.admin-container .users-table th:nth-child(5) {
  text-align: right;
  padding-right: 10px;
}

/* ===================================================== */
/* 🔥 AJUSTE FINAL - USUÁRIOS */
/* ===================================================== */

/* 1. HEADER "AÇÕES" ALINHADO COM BOTÕES */
.admin-container .users-table th:nth-child(5) {
  text-align: right;
  padding-right: 16px;
}

/* 2. REMOVE VISUAL EXAGERADO DO ADMIN */
.admin-container .users-table td:nth-child(4) {
  text-align: center;
}

/* checkbox admin clean */
.admin-container .users-table td:nth-child(4) input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #00c2a8;
  cursor: pointer;
  transform: scale(1.1);
}

/* remove qualquer estilo antigo pesado (botão azul) */
.admin-container .users-table td:nth-child(4) button {
  display: none;
}

/* ===================================================== */
/* 🔥 CORRIGE COR DAS OPÇÕES DO SELECT */
/* ===================================================== */

/* opções do dropdown */
select option {
  color: #111 !important;        /* texto preto */
  background-color: #ffffff !important; /* fundo branco */
}

/* opção selecionada */
select option:checked {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

/* ===================================================== */
/* 🔥 CENTRALIZAR HEADER "AÇÕES" COM BOTÕES */
/* ===================================================== */

.admin-container .users-table th:nth-child(5) {
  text-align: right;
  padding-right: 22px; /* ajusta até ficar alinhado perfeito */
}

/* ===================================================== */
/* 🔥 CORREÇÃO BOTÕES SUMINDO (ISOLAR USUÁRIOS) */
/* ===================================================== */

/* remove a regra errada */
.admin-container .users-table td:nth-child(4) button {
  display: inline-block !important;
}

/* aplica esconder SOMENTE se for botão de admin específico */
.admin-container .users-table td:nth-child(4) .admin-btn {
  display: none;
}

/* ===================================================== */
/* 🔥 BOTÕES DINÂMICOS (AÇÕES) */
/* ===================================================== */

.btn-action {
  position: relative;
  overflow: hidden;

  padding: 7px 14px;
  border-radius: 8px;
  border: none;

  font-size: 13px;
  font-weight: 500;

  cursor: pointer;

  transition: all 0.25s ease;
}

/* ===== PERMISSÕES ===== */
.btn-perm {
  background: linear-gradient(135deg, #14b8a6, #0ea5a4);
  color: white;
}

.btn-perm:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 18px rgba(20,184,166,0.35);
}

/* ===== EXCLUIR ===== */
.btn-delete {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-delete:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 18px rgba(239,68,68,0.35);
}

/* ===== CLICK EFFECT ===== */
.btn-action:active {
  transform: scale(0.96);
  box-shadow: none;
}

/* ===== EFEITO DE BRILHO (SUTIL) ===== */
.btn-action::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.25),
    transparent
  );
  transform: skewX(-20deg);
}

/* anima no hover */
.btn-action:hover::after {
  left: 130%;
  transition: 0.6s;
}

/* ===================================================== */
/* 🔥 MODAL PERMISSÕES PREMIUM */
/* ===================================================== */

/* container lista */
#listaPermissoes {
  display: flex;
  flex-direction: column;
  gap: 0px; /* 🔥 mais espaço entre itens */
  margin: 20px 0;
  max-height: 300px;
  overflow-y: auto;
}

/* cada item */
#listaPermissoes label {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px 14px;
  border-radius: 10px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);

  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover bonito */
#listaPermissoes label:hover {
  background: rgba(0,194,168,0.12);
  border-color: rgba(0,194,168,0.3);
  transform: translateX(3px);
}

/* checkbox moderno */
#listaPermissoes input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #00c2a8;
}

/* texto */
#listaPermissoes label span {
  font-size: 14px;
  color: #e5e7eb;
}

/* ===================================================== */
/* 🔥 BOTÕES DO MODAL */
/* ===================================================== */

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* salvar */
.btn-modal-save {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;

  background: linear-gradient(135deg, #00c2a8, #00a892);
  color: white;
  font-weight: 600;

  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,194,168,0.4);
}

/* fechar */
.btn-modal-close {
  flex: 1;
  padding: 10px;
  border-radius: 10px;

  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;

  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-close:hover {
  background: rgba(255,255,255,0.1);
}

/* ===================================================== */
/* 🔥 REMOVE SCROLL HORIZONTAL DO MODAL */
/* ===================================================== */

/* container principal */
.modal-box {
  overflow: hidden;
}

/* lista permissões */
#listaPermissoes {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;   /* 🔥 remove horizontal */
  overflow-y: auto;
  padding-right: 4px;   /* evita cortar scrollbar */
}

/* cada item não pode estourar */
#listaPermissoes label {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* checkbox + texto alinhados corretamente */
#listaPermissoes input {
  flex-shrink: 0;
}

#listaPermissoes span {
  word-break: break-word; /* quebra texto grande */
}

#listaPermissoes .perm-dashboard-item {
  margin-bottom: 6px;
}

#listaPermissoes .perm-paginas-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px 24px;
}

#listaPermissoes .perm-pagina-item {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
}

#listaPermissoes .perm-pagina-item span {
  font-size: 13px;
  opacity: 0.92;
}

/* evita qualquer elemento ultrapassar */
.modal-box * {
  max-width: 100%;
}

/* ===================================================== */
/* 🔥 CATEGORIAS PERMISSÕES */
/* ===================================================== */

.categoria {
  margin-bottom: 8px;
}

/* título da categoria */
.categoria-titulo {
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;

  margin-bottom: 8px;
  padding-left: 4px;
}

/* grupo com leve separação visual */
.categoria label {
  margin-bottom: 6px;
}

/* header da categoria */
.categoria-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  cursor: pointer;
  padding: 10px 5px;

  font-weight: 600;
  color: #cbd5e1;
}

/* hover */
.categoria-header:hover {
  color: white;
}

/* botões selecionar */
.categoria-actions button {
  background: transparent;
  border: none;
  color: #00c2a8;
  font-size: 14px;
  cursor: pointer;
  margin-left: 6px;
}

.categoria-actions button:hover {
  transform: scale(1.2);
}

/* conteúdo */
.categoria-conteudo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

/* fechado */
.categoria-conteudo.fechado {
  display: none;
}

/* container do título */
.categoria-titulo-texto {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* seta */
.seta {
  font-size: 12px;
  transition: transform 0.2s ease;
  color: #9ca3af;
}

/* quando aberto (gira pra baixo) */
.categoria-conteudo:not(.fechado) ~ .categoria-header .seta {
  transform: rotate(90deg);
}

/* hover */
.categoria-header:hover .seta {
  color: #00c2a8;
}

/* botões categoria */
.btn-cat {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #9ca3af;

  border-radius: 6px;
  padding: 2px 6px;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover */
.btn-cat:hover {
  color: #00c2a8;
  border-color: #00c2a8;
}

/* estado ativo */
.btn-cat.ativo.check {
  background: rgba(0,194,168,0.2);
  color: #00c2a8;
  border-color: #00c2a8;
}

.btn-cat.ativo.uncheck {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  border-color: #ef4444;
}

/* efeito clique */
.btn-cat.click {
  transform: scale(0.9);
}

/* ===================================================== */
/* 🔥 CHECKBOX ADMIN - ALINHAMENTO */
/* ===================================================== */

.checkbox-admin {
  display: flex;
  align-items: center; /* 🔥 alinha verticalmente */
  gap: 10px;

  margin: 10px 0 15px 0;

  color: #ffffff; /* 🔥 texto branco */
  font-size: 14px;
}

/* checkbox */
.checkbox-admin input {
  width: 16px;
  height: 16px;
  accent-color: #00c2a8;
  cursor: pointer;
}

/* texto */
.checkbox-admin span {
  color: #ffffff;
}

/* ===================================================== */
/* 🔥 LISTA DE USUÁRIOS (CADASTRO DASHBOARD) */
/* ===================================================== */

#listaUsuariosPermissao {
  margin-top: 10px;

  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* cada usuário vira um "card" */
#listaUsuariosPermissao label {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px 14px;

  border-radius: 10px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);

  color: #e5e7eb; /* 🔥 texto branco */

  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover bonito */
#listaUsuariosPermissao label:hover {
  background: rgba(0,194,168,0.12);
  border-color: rgba(0,194,168,0.3);
  transform: translateX(3px);
}

/* checkbox */
#listaUsuariosPermissao input {
  width: 16px;
  height: 16px;

  accent-color: #00c2a8;

  cursor: pointer;
}

/* quando marcado */
#listaUsuariosPermissao input:checked + span {
  color: #00c2a8;
  font-weight: 500;
}

/* texto (IMPORTANTE) */
#listaUsuariosPermissao label {
  font-size: 14px;
}

/* ===================================================== */
/* 🔥 REMOVE SCROLL HORIZONTAL - USUÁRIOS DASHBOARD */
/* ===================================================== */

#listaUsuariosPermissao {
  width: 100%;
  max-width: 100%;

  overflow-y: auto;
  overflow-x: hidden; /* 🔥 remove horizontal */

  padding-right: 4px; /* evita cortar scrollbar */
}

/* cada item não pode estourar */
#listaUsuariosPermissao label {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* garante que nada ultrapasse */
#listaUsuariosPermissao * {
  max-width: 100%;
}

/* checkbox não encolhe */
#listaUsuariosPermissao input {
  flex-shrink: 0;
}

/* texto quebra se precisar */
#listaUsuariosPermissao span {
  word-break: break-word;
}

/* ===================================================== */
/* ================= PAGINAS DASHBOARD ================= */
/* ===================================================== */

.paginas-dashboard-lista {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 10px;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.pagina-dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1.7fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.pagina-dashboard-row input {
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 0 10px;
}

.pagina-dashboard-row input::placeholder {
  color: rgba(255,255,255,0.55);
}

.paginas-add-btn {
  margin-top: 6px;
  margin-bottom: 6px;
}

.dashboard-pages-panel .paginas-add-btn,
.modal-box .paginas-add-btn {
  width: 100%;
  justify-content: center;
}

.pagina-remove-btn {
  white-space: nowrap;
}

.modal-box-wide {
  width: min(980px, 92vw);
}

@media (max-width: 900px) {
  .dashboard-form-grid {
    grid-template-columns: 1fr;
  }

  .pagina-dashboard-row {
    grid-template-columns: 1fr;
  }
}

/* ===================================================== */
/* 🔥 BOTÃO SALVAR ALTERAÇÕES */
/* ===================================================== */

.btn-save {
  background: linear-gradient(135deg, #00c2a8, #00a892);
  color: white;

  border: none;
  border-radius: 10px;

  padding: 10px 18px;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition: all 0.25s ease;

  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* hover */
.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,194,168,0.35);
}

/* clique */
.btn-save:active {
  transform: scale(0.96);
}

#listaDashboards .acoes-td {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
}

/* ===================================================== */
/* =========== TABELA DASHBOARDS (AJUSTE) ============== */
/* ===================================================== */

/* ================= TABELA USUARIOS (ALINHAMENTO FINAL) ================ */
.admin-container .users-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.admin-container .users-table thead th,
.admin-container .users-table tbody td {
  display: table-cell !important;
  vertical-align: middle !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.admin-container .users-table .acoes-td {
  display: table-cell !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.admin-container .users-table .acoes-td .btn-action {
  margin-left: 6px;
}

.admin-container .dashboards-table {
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.admin-container .dashboards-table tbody tr {
  display: table-row !important;
}

.admin-container .dashboards-table thead th,
.admin-container .dashboards-table tbody td {
  display: table-cell !important;
  vertical-align: middle !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.admin-container .dashboards-table th:nth-child(1),
.admin-container .dashboards-table td:nth-child(1) {
  width: 28% !important;
}

.admin-container .dashboards-table th:nth-child(2),
.admin-container .dashboards-table td:nth-child(2) {
  width: 20% !important;
}

.admin-container .dashboards-table th:nth-child(3),
.admin-container .dashboards-table td:nth-child(3) {
  width: 37% !important;
}

.admin-container .dashboards-table th:nth-child(4),
.admin-container .dashboards-table td:nth-child(4) {
  width: 15% !important;
  text-align: right !important;
}

.admin-container .dashboards-table td:nth-child(4) {
  overflow: visible !important;
  padding-right: 10px !important;
}

.admin-container .dashboards-table .acoes-td {
  min-width: 170px;
}

.admin-container .dashboards-table .acoes-wrap-dashboard {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.admin-container .dashboards-table .btn-action {
  min-width: 76px;
  margin: 0;
}

/* ===================================================== */
/* 🔥 CONFIRMAÇÃO EXCLUIR */
/* ===================================================== */

.confirm-delete {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 13px;
  color: #e5e7eb;
}

/* botão sim */
.btn-confirm {
  background: #ef4444;
  border: none;
  color: white;

  padding: 5px 10px;
  border-radius: 6px;

  cursor: pointer;
  transition: 0.2s;
}

.btn-confirm:hover {
  background: #dc2626;
}

/* botão cancelar */
.btn-cancel {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;

  padding: 5px 10px;
  border-radius: 6px;

  cursor: pointer;
}

.btn-cancel:hover {
  background: rgba(255,255,255,0.1);
}

/* ===================================================== */
/* 🔥 TOAST GLOBAL (NOTIFICAÇÃO) */
/* ===================================================== */

.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);

  background: #0f172a;
  color: white;

  padding: 14px 22px;
  border-radius: 12px;

  font-size: 14px;
  font-weight: 500;

  opacity: 0;
  pointer-events: none;

  transition: all 0.3s ease;

  z-index: 9999;

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* quando aparece */
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* sucesso */
.toast.success {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* erro */
.toast.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ===================================================== */
/* LOGIN REDESIGN (TESTE VISUAL) */
/* ===================================================== */

.login-redesign {
  background: radial-gradient(circle at 20% 20%, #194d54 0%, #0d2d34 50%, #081b21 100%);
  overflow: hidden;
}

.login-redesign .login-page {
  position: relative;
}

.login-redesign .login-left {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(17, 72, 78, 0.95), rgba(8, 33, 40, 0.95)),
    radial-gradient(circle at 80% 20%, rgba(0, 194, 168, 0.25), transparent 45%);
}

.login-redesign .login-left-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 194, 168, 0.28), rgba(0, 194, 168, 0));
  filter: blur(8px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: loginGlowPulse 6s ease-in-out infinite;
}

.login-redesign .login-brand-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.login-redesign .logo-banner-animated {
  width: 440px;
  max-width: 82%;
  animation: logoFloat 4.5s ease-in-out infinite;
  filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.35));
}

.login-redesign .login-brand-caption {
  color: rgba(229, 246, 244, 0.85);
  font-size: 15px;
  letter-spacing: 0.2px;
  text-align: center;
}

.login-redesign .login-orbit {
  position: absolute;
  border-radius: 0;
  border: 1px solid rgba(0, 171, 151, 0.18);
  background: transparent;
  box-shadow: none;
}

.login-redesign .orbit-1 {
  width: 180px;
  height: 180px;
  top: 16%;
  right: 10%;
  animation: squareDrift 9s ease-in-out infinite;
}

.login-redesign .orbit-2 {
  width: 86px;
  height: 86px;
  bottom: 18%;
  left: 13%;
  background: rgba(0, 171, 151, 0.08);
  border-color: rgba(0, 171, 151, 0.1);
  animation: squareDriftReverse 8s ease-in-out infinite;
}

.login-redesign .login-right {
  background: linear-gradient(180deg, rgba(241, 246, 247, 0.96), rgba(230, 239, 241, 0.96));
}

.login-redesign .login-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 28px 55px rgba(5, 26, 31, 0.22);
  backdrop-filter: blur(6px);
}

.login-redesign .login-card .small-title {
  color: #4f6b70;
  letter-spacing: 0.3px;
}

.login-redesign .login-card h2 {
  color: #12353b;
}

.login-redesign .login-card p {
  color: #50666b;
}

.login-redesign .login-card input {
  background: rgba(248, 250, 251, 0.92);
}

.login-redesign .login-card button {
  background: linear-gradient(120deg, #0f4c53 0%, #0e7a78 46%, #00c2a8 100%);
  box-shadow: 0 10px 24px rgba(15, 76, 83, 0.24);
}

.login-redesign .login-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 120, 116, 0.28);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.012); }
}

@keyframes loginGlowPulse {
  0%, 100% { opacity: 0.72; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes squareDrift {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-7px) translateX(5px); }
}

@keyframes squareDriftReverse {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(7px) translateX(-5px); }
}

@media (max-width: 980px) {
  .login-redesign .login-page {
    flex-direction: column;
  }

  .login-redesign .login-left,
  .login-redesign .login-right {
    width: 100%;
  }

  .login-redesign .login-left {
    min-height: 34vh;
  }

  .login-redesign .logo-banner-animated {
    width: 300px;
  }

  .login-redesign .login-brand-caption {
    font-size: 13px;
  }

.login-redesign .login-card {
    width: min(420px, 92%);
    margin: 16px auto;
  }
}

/* ===================================================== */
/* DASHBOARD VIEW RESPONSIVO (SEM SCROLL HORIZONTAL) */
/* ===================================================== */

@media (max-width: 980px) {
  .dashboard-view-body .main-header {
    height: auto;
    min-height: 90px;
  }

  .dashboard-view-body {
    padding-top: 150px;
  }

  .dashboard-view-body .dashboard-top-container {
    max-width: 100%;
    padding: 10px 12px;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
  }

  .dashboard-view-body .dashboard-top-container .logo {
    display: none;
  }

  .dashboard-view-body .dashboard-top-container .dashboard-header-nav {
    order: 1;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
  }

  .dashboard-view-body .dashboard-top-container #dashboardListNav {
    margin-left: 0;
  }

  .dashboard-view-body .dashboard-top-container .dashboard-pages-nav {
    max-width: 100%;
  }

  .dashboard-view-body .dashboard-top-container .dashboard-page-select {
    min-width: 140px;
    max-width: 180px;
  }

  .dashboard-view-body .dashboard-top-container .header-right {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .dashboard-view-body {
    padding-top: 165px;
  }

  .dashboard-view-body .dashboard-top-container .dashboard-header-nav {
    justify-content: flex-start;
  }

  .dashboard-view-body .dashboard-top-container .dashboard-page-select {
    min-width: 128px;
    max-width: 155px;
  }
}
