:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===============================
   BASE
================================*/
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

html,
body {
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===============================
   TOPBAR
================================*/
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
}

.topbar__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s ease;
}

.topbar__link:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

/* ===============================
   FOOTER
================================*/
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  background: var(--surface);
}

/* ===============================
   CONTENT
================================*/
main {
  flex: 1;
}

.content {
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  min-height: calc(100vh - 120px);
}

/* ===============================
   SECTIONS / CARDS / TABLES
================================*/
.section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.section__header h1 {
  margin: 0;
  font-size: 1.8rem;
}

.section__header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.section__actions {
  display: flex;
  gap: 0.75rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn--secondary {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--primary);
}

/* Grids */
.grid {
  display: grid;
  gap: 1rem;
}

.grid--stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
}

.card--stat {
  position: relative;
  overflow: hidden;
}

.card--stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 60%);
  pointer-events: none;
}

.card__label {
  font-size: 0.9rem;
  color: var(--muted);
}

.card__value {
  font-size: 2rem;
  margin-top: 0.35rem;
}

.card__trend {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.card__trend--up {
  color: #16a34a;
}

.card__trend--down {
  color: #dc2626;
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card__header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.card__action {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* Tabelas */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.9rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.table__muted {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.table__actions {
  display: flex;
  gap: 0.5rem;
}

.table__badge--ok {
  color: #16a34a;
  font-weight: 600;
}

.table__badge--alert {
  color: #dc2626;
  font-weight: 600;
}

/* Status */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status--confirmed {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.status--pending {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.status--viewed {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}

/* ===============================
   AUTH (login etc.)
================================*/
.auth {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.auth__card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 1.25rem;
  box-shadow: 0 30px 50px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.auth__title {
  margin: 0;
  font-size: 1.75rem;
}

.auth__subtitle {
  margin: 0.75rem 0 1.5rem;
  color: var(--muted);
  line-height: 1.5;
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth__label {
  font-weight: 600;
}

.auth__input {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-size: 1rem;
}

.auth__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.auth__forgot {
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
}

.auth__highlight {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--muted);
}

.auth__highlight h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
}

.auth__highlight ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0;
  line-height: 1.6;
}

/* ===============================
   RESPONSIVIDADE
================================*/
@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 1rem;
  }

  .topbar__brand {
    width: 100%;
    justify-content: space-between;
  }

  .topbar__nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    order: 3;
  }

  .topbar__link {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.6rem;
  }

  .section__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth__actions {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
}

/* ===============================
   AJUSTES DE MARGENS
================================*/
h1.h3 {
  margin-left: 0 !important;
}

p.text-muted {
  margin-left: 0 !important;
}





.alert-success {
  background-color: #0ba94f !important;
  color: #ffffff !important;
  border: 1px solid #c3e6cb !important;
  padding: 15px !important;
  margin-bottom: 20px !important;
  border-radius: 5px !important;
}

/* Estilo para as mensagens de erro */
.alert-danger {
  background-color: #d52133 !important;
  color: #ffffff !important;
  border: 1px solid #f5c6cb !important;
  padding: 15px !important;
  margin-bottom: 20px !important;
  border-radius: 5px !important;
}

/* Garantir layout em coluna e ocupar altura total */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background-color: #f2f2f2 !important;
}

.container {
  flex: 1;
}

.login-container {
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: rgb(58, 80, 176);
}

.navbar-nav {
  margin-left: auto;
}

/* Redução dos espaços */
.main-wrapper {
  flex: 1 0 auto;
  min-height: 0;
  padding-top: 5px;
  padding-bottom: 0 !important;
  background-color: #f5f6fa;
}

.container-fluid.px-md-5.py-3 {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  margin-bottom: 0 !important;
}

/* Cards laterais ajustados */
.card-like-box {
  background-color: #fff;
  border-radius: 0;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  width: 100%;
  margin: 0 10px;
}

.card-like-box-dash {
  background-color: #fff;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  min-height: calc(50vh);
  width: 100%;
  margin-bottom: 0 !important;
}

/* Ajuste responsivo - Tela pequena */
@media (max-width: 768px) {
  .card-like-box {
    padding: 1.5rem;
    margin: 10px 0;
  }
}

/* Ajuste para telas médias */
@media (min-width: 768px) {
  .card-like-box {
    padding: 2rem;
    margin: 0 15px;
    width: calc(100% - 30px);
  }
}

body {
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: 0 !important;
}

.badge {
  font-size: 0.75rem;
  padding: 0.35em 0.6em;
  border-radius: 0.35rem;
}

.img {
  max-width: 100%;
  height: auto;
  display: block;
}

.table th {
  text-align: left !important;
}

.btn-danger-huawei {
  background-color: #e85454;
  color: #fff;
  border: none;
}

.btn-danger-huawei:hover {
  background-color: #cc4444;
  color: #fff;
}

.card-like-box-dash {
  width: 200px;
  height: 200px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card {
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  background-color: #e9ecef;
}

.card a {
  text-decoration: none;
  color: inherit;
}

.disabled-card {
  pointer-events: none;
  opacity: 0.5;
  filter: grayscale(60%);
  transition: 0.3s;
}

.disabled-card:hover {
  transform: none;
  box-shadow: none;
}

.disabled-link {
  cursor: default;
  text-decoration: none;
}

.dropdown-menu-toogle-left {
  top: 100% !important;
  left: -140px !important;
}

.header-image-spacing {
  padding-top: 5px;
  padding-bottom: 5px;
}

@media (min-width: 768px) {
  .header-image-spacing {
    padding-top: 15px;
    padding-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none;
  }
}

.badge.bg-success {
  font-size: 0.9em;
  padding: 6px;
}

.card-title {
  font-weight: bold;
}

.badge-evento {
  background-color: #198754;
  color: white;
}

.card-like-box-user {
  background-color: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
  padding: 16px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .card-like-box-user {
    padding: 12px;
    margin-bottom: 15px;
  }

  table {
    font-size: 11px;
  }

  .table-responsive {
    overflow-x: auto;
  }

  #fig_vendas,
  #fig_mapa {
    width: 100% !important;
    height: auto !important;
  }
}

.produtos-container {
  position: relative;
  padding-top: 50px;
}

.img-white-filter {
  filter: brightness(0) invert(1);
}

.step-icon img {
  width: 30px;
  height: auto;
  filter: brightness(0) invert(1);
}

.linha-horizontal {
  position: absolute;
  top: 73px;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.icone-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.icone-produto {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.icone-produto.ativo {
  background: linear-gradient(to bottom, #2c3eae, #4e73df);
  transform: scale(1.1);
}

.card-wrapper {
  position: relative;
  z-index: 2;
}

.disabled-card {
  opacity: 0.4;
  pointer-events: none;
}

.disabled-link {
  pointer-events: none;
}

.card {
  border-radius: 20px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.shadow {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.table-scroll-y {
  overflow-y: auto;
  overflow-x: auto;
}

body {
  background: linear-gradient(to bottom right, #1e3c72, #2a5298);
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.login-card {
  background: rgb(58, 80, 176);
  backdrop-filter: blur(100px);
  border-radius: 10px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.2);
  color: white;
}

.login-card .form-control {
  background-color: #ffffff;
  border: none;
  border-radius: 5px;
}

.login-card .input-group-text {
  background-color: #ffffff;
  border: none;
  border-radius: 5px 0 0 5px;
}

.login-btn {
  background: linear-gradient(to right, #0052d4, #4364f7);
  border: none;
  color: white;
  padding: 10px;
  font-weight: bold;
  letter-spacing: 1px;
}

.login-btn:hover {
  background: linear-gradient(to right, #4364f7, #6fb1fc);
}

.remember-forgot {
  font-size: 0.9rem;
}

.remember-forgot a {
  color: #ddd;
  text-decoration: none;
}

.remember-forgot a:hover {
  text-decoration: underline;
}

.logo-circle {
  background-color: #ffffff;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-circle i {
  font-size: 2rem;
  color: #2a5298;
}

.copyright {
  color: #ccc;
  font-size: 0.85rem;
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 576px) {
  .login-card {
    margin-left: 1cm;
    margin-right: 1cm;
  }
}

.hidden {
  display: none !important;
}

.navbar-toggler-icon.color-multi {
  filter: invert(1);
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-center {
  top: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

.disabled-card {
  opacity: 0.6;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

.floating-bg-icons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.floating-bg-icons .icon-float {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgb(255, 255, 255);
  animation: explodeIcon ease-out infinite;
  transform-origin: center center;
}

@keyframes explodeIcon {
  0% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 0.6;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.8) rotate(360deg);
    opacity: 0;
  }
}

#alertBox {
  font-size: 14px;
  padding: 10px 15px;
  margin-bottom: 10px;
}

.page-content {
  position: relative;
}

.loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .7);
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-icon {
  width: 3rem;
  height: 3rem;
}

.tree {
  margin-left: 10px;
}

.tree-item {
  margin-bottom: 10px;
}

.tree-sub {
  margin-left: 20px;
  margin-top: 5px;
}

#chartdiv {
  width: 100%;
  height: 520px;
  max-height: 520px;
  overflow: hidden;
}