:root {
  --tuya-primary: #ff4800;
}

html {
  overflow-x: hidden;
}

body.bg-dashboard {
  background: #f4f6f9;
  overflow-x: clip;
}

.gestor-navbar .container-fluid {
  max-width: 100%;
}

.navbar-brand {
  font-weight: 600;
  max-width: min(55vw, 14rem);
}

@media (min-width: 576px) {
  .navbar-brand {
    max-width: min(40vw, 18rem);
  }
}

@media (min-width: 992px) {
  .navbar-brand {
    max-width: none;
  }
}

.stat-card {
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
}

.stat-card-filter {
  cursor: pointer;
  transition: box-shadow 0.15s ease, outline-color 0.15s ease;
}

.stat-card-filter:hover {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.1);
}

.stat-card-filter:focus-visible {
  outline: 2px solid var(--tuya-primary);
  outline-offset: 2px;
}

.stat-card-active {
  box-shadow: 0 0 0 2px var(--tuya-primary), 0 0.25rem 0.75rem rgba(255, 72, 0, 0.12);
}

.device-row-offline {
  opacity: 0.75;
}

.badge-online {
  background-color: #198754;
}

.badge-offline {
  background-color: #6c757d;
}

.dp-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
}

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

.btn-tuya:hover {
  background: #e04000;
  border-color: #e04000;
  color: #fff;
}

@media (max-width: 991.98px) {
  .table-responsive {
    font-size: 0.9rem;
  }

  .gestor-navbar-nav {
    width: 100%;
  }

  .gestor-navbar .nav-link,
  .gestor-navbar .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .gestor-navbar .dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding-left: 0.75rem;
  }

  .gestor-navbar .dropdown-item {
    border-radius: 0.375rem;
  }

  .gestor-navbar-actions .btn-sm {
    width: 100%;
    min-height: 44px;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .gestor-navbar-actions {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
  }

  .gestor-navbar-actions .btn-sm {
    width: auto;
    flex: 1 1 auto;
  }
}

.nav-link.active,
.dropdown-item.active {
  font-weight: 600;
}

.gc-brand-logo {
  max-height: 2.5rem;
  width: auto;
  object-fit: contain;
}

.gc-brand-tile {
  min-height: 5.5rem;
}