@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

body {
  font-family: "Montserrat", sans-serif !important;
  background-color: #f8f9fc;
}

/* ============ LAYOUT ============ */
#wrapper {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

#wrapper #content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
  width: 100%;
}

#wrapper #content-wrapper #content {
  flex: 1 0 auto;
}

.bee-footer {
  width: 100%;
  margin-top: auto;
  padding: 1rem 0;
}

/* ============ SIDEBAR ============ */
.bee-sidebar {
  width: 14rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background-color: #fff;
  border-right: 1px solid #e3e6f0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.bee-sidebar__brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10px;
  transition: justify-content 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bee-sidebar__brand img {
  transition:
    opacity 0.4s ease,
    max-width 0.4s ease;
  max-width: 120px;
}

.bee-sidebar__toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #3e415c;
}

.bee-sidebar__toggle i {
  font-size: 24px;
  color: #3e415c;
}

.bee-sidebar__toggle:hover {
  background: rgba(43, 107, 49, 0.08);
}

.bee-sidebar__divider {
  margin: 0.25rem 1rem;
  border: 0;
  border-top: 1px solid #e3e6f0;
}

.bee-sidebar__heading {
  padding: 0.5rem 1.5rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2b6b31;
  white-space: nowrap;
  overflow: hidden;
}

.bee-sidebar__item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  position: relative;
  width: auto;
  margin: 4px 8px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #3e415c;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.bee-sidebar__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #1e5f2548, #1e5f2591);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.bee-sidebar__item:hover::before {
  width: 100%;
}

.bee-sidebar__item:hover {
  background-color: rgba(20, 118, 255, 0.08);
  box-shadow: 0 2px 8px rgba(20, 118, 255, 0.15);
}

.bee-sidebar__item i,
.bee-sidebar__item span {
  position: relative;
  z-index: 1;
}

.bee-sidebar__item i {
  font-size: 23px;
  color: #3e415c;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.bee-sidebar__item span {
  color: #3e415c;
  transition: color 0.3s ease;
  flex: 1;
}

.bee-sidebar__item:hover i {
  color: #2b6b31;
  transform: scale(1.1);
}

.bee-sidebar__item:hover span {
  color: #ffffff;
  font-weight: 500;
}

.bee-sidebar__item.active span {
  color: #2b6b31;
  font-weight: 600;
}

.bee-sidebar__item.active i {
  color: #3e415c;
}

.bee-sidebar__item--collapse::after {
  margin-left: auto;
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid #9c9ea5;
  border-bottom: 2px solid #9c9ea5;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.bee-sidebar__item--collapse.collapsed::after {
  transform: rotate(-45deg);
}

/* Submenú (Cuentas) */
.bee-sidebar__sub {
  padding: 0 8px;
}

.bee-sidebar__sub-inner {
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 0.15rem 1.75rem rgba(58, 59, 69, 0.1);
}

.bee-sidebar__sub-item {
  display: block;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  color: #3e415c;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.bee-sidebar__sub-item:hover {
  background-color: #f0f4ff;
  color: #2b6b31;
}

.bee-sidebar__sub-item.active {
  color: #f39c12;
  font-weight: 700;
}

/* Sidebar colapsado (escritorio) */
.bee-sidebar.toggled {
  width: 6.5rem;
}

.bee-sidebar.toggled .bee-sidebar__item {
  justify-content: center;
  padding: 12px 8px;
}

.bee-sidebar.toggled .bee-sidebar__item span,
.bee-sidebar.toggled .bee-sidebar__item--collapse::after {
  display: none;
}

.bee-sidebar.toggled .bee-sidebar__item.active i {
  color: #2b6b31;
}

.bee-sidebar.toggled .bee-sidebar__heading {
  visibility: hidden;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.bee-sidebar.toggled .bee-sidebar__brand {
  justify-content: center;
}

.bee-sidebar.toggled .bee-sidebar__brand img {
  opacity: 0;
  visibility: hidden;
  max-width: 0;
  margin: 0;
  padding: 0;
  transform: scale(0.8);
}

.bee-sidebar.toggled .bee-sidebar__sub {
  display: none;
}

/* ============ TOPBAR ============ */
.bee-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.bee-topbar__btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #1e5f24;
  cursor: pointer;
  font-size: 18px;
}

.bee-topbar__btn:hover {
  background: rgba(20, 118, 255, 0.08);
}

.bee-topbar__search {
  margin-right: auto;
  margin-left: 0.75rem;
}

.bee-topbar__nav {
  display: flex;
  align-items: center;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bee-topbar__item {
  display: flex;
  align-items: center;
}

.bee-topbar__link {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  max-height: 2.5rem;
  color: #3e415c;
  text-decoration: none;
  font-size: 18px;
  position: relative;
  border-radius: 0.35rem;
  padding: 0 0.5rem;
}

.bee-topbar__link:hover {
  background: rgba(20, 118, 255, 0.08);
  color: #3e415c;
}

.bee-topbar__badge {
  position: absolute;
  top: 2px;
  right: 0;
  font-size: 9px;
  transform: scale(0.9);
  transform-origin: top right;
}

.bee-topbar__divider {
  width: 1px;
  height: 2rem;
  background: #e3e6f0;
  margin: 0 0.5rem;
}

/* Lista de alertas */
.dropdown-list {
  width: 18rem;
}

.dropdown-list .dropdown-header {
  background-color: #2b6b31;
  color: #fff;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-weight: 500;
  font-size: 12px;
}

.dropdown-list #notificacionesDropdown {
  max-height: 300px;
  overflow-y: auto;
}

.icon-circle {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============ PÁGINA ============ */
.headings-dashboard {
  display: flex;
  flex-direction: column;
}

.bee-page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: #2d3748;
}

span.heading-date {
  font-weight: 500;
  color: #2b6b31;
  font-size: 14px;
}

.input-search {
  border: 1px solid #d8d8d8 !important;
  border-radius: 20px;
  padding: 10px;
}

.input-search:focus {
  box-shadow: 0 0 5px #2b6b31a1;
  border-color: #2b6b31 !important;
  outline: none;
}

.selectize-input.focus {
  box-shadow: 0 0 5px #2b6b31a1;
  border-color: #2b6b31 !important;
  outline: none;
}

#buscarProducto:focus {
  border-color: #2b6b31 !important;
  box-shadow: 0 0 5px #2b6b31a1 !important;
  outline: none;
}

.inputdate {
  padding: 10px 20px;
  border-radius: 25px;
  border: 1px solid #dadbdd;
  color: #8f919f;
}

.btn__dropdown {
  border-radius: 30px;
  padding: 10px;
  font-size: 14px;
  background: #fff;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}

.btn__dropdown:focus {
  box-shadow: 0 0 5px rgba(20, 118, 255, 0.5);
  border-color: #2b6b31 !important;
  outline: none;
}

#dateRangeDropdown i {
  font-size: 18px;
  opacity: 0.8;
}

.dropdown-menu {
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
}

.dropdown-menu .dropdown-item {
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  padding: 10px 20px;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f0f4ff;
  color: #2b6b31;
}

.icon__item {
  font-size: 16px;
  position: relative;
  top: 1px;
  color: #2b6b31 !important;
}

/* ============ TARJETAS DASHBOARD ============ */
.card__dash--custom {
  border-radius: 20px;
  border: none;
}

.heading-card {
  padding: 10px 20px;
}

.heading-card__subtitle {
  font-weight: 500;
  font-size: 14px;
}

.heading-card__subtitle i {
  font-size: 15px;
  color: #2b6b31;
}

.heading-card__subtitle--flex {
  display: flex;
  align-items: center;
  gap: 8px;
}

.heading-card__subtitle--bold {
  font-weight: bold;
}

.heading-card__title {
  font-size: 23px;
  font-weight: bold;
}

.heading-card__percentaje {
  font-size: 16px;
  font-weight: 600;
}

.heading-card__percentaje--green {
  color: #05c168;
}

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

.hr-card-custom {
  margin: 0 auto;
  max-width: 100%;
}

.online-point {
  font-size: 10px;
}

.online {
  color: #05c168;
  text-shadow: 0px 0px 5px #05c168;
}

.offline {
  color: #2c72339c;
  text-shadow: 0px 0px 5px #2c723247;
}

/* ============ BOTONES DE PRODUCTO ============ */
.btn-add-product {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background: linear-gradient(135deg, #2b6b31 0%, #31913a 100%);
  color: #fff !important;
  border: none;
  transition: all 0.3s ease;
}

.btn-add-product:hover {
  color: #fff !important;
  box-shadow:
    0 7px 14px rgba(50, 50, 93, 0.1),
    0 3px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  filter: brightness(0.8);
}

.btn-danger-product {
  background: linear-gradient(135deg, #c92a2a 0%, #e74a3b 100%);
  color: white;
  border: none;
  transition: all 0.3s ease;
  display: none !important;
}

.show-btn-danger {
  display: flex !important;
  animation: fadeIn 0.3s ease;
}

.btn-edit-product {
  background: linear-gradient(135deg, #f39c12 0%, #c2941d 100%);
  color: white;
  border: none;
  transition: all 0.3s ease;
}

.btn-delete-product {
  background: linear-gradient(135deg, #e74a3b 0%, #c92a2a 100%);
  color: white;
  border: none;
  transition: all 0.3s ease;
}

.btn-cancel-product {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary-custom {
  background: #1b4c20;
  border: 1px solid #1b4c20;
}

.btn-primary-custom:hover {
  background: #2b6b31;
  border: 1px solid #2b6b31;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-warning-custom {
  background: #d99132;
  border: 1px solid #d99132;
}

/* ============ MODALES ============ */
.bee-modal-content {
  border-radius: 15px;
  overflow: hidden;
}

.bee-modal-header.bg-gradient-primary {
  background: linear-gradient(135deg, #2b6b31 0%, #104e16 100%);
}

.bee-modal-header.bg-gradient-danger {
  background: linear-gradient(135deg, #e74a3b 0%, #c92a2a 100%);
}

.bee-modal-header.bg-gradient-info {
  background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
}

.bee-modal-header.bg-gradient-warning {
  background: linear-gradient(121deg, #e2ab1e 100%, #f6c23e 0%);
}

.bee-modal-header span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.bee-modal-header .icon-title-modal {
  font-size: 25px;
  line-height: 0;
}

.bee-modal-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

#estadoLabel,
#editEstadoLabel {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  margin-left: 1.5rem;
}

#modalEliminarProducto .btn-danger {
  background: linear-gradient(135deg, #e74a3b 0%, #c92a2a 100%);
  border: none;
  transition: all 0.3s ease;
}

#modalEliminarProducto .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(231, 74, 59, 0.4);
}

#modalEliminarProducto .card {
  border-radius: 10px;
}

#modalEliminarProducto .alert {
  border-radius: 10px;
  border-left: 4px solid #f6c23e;
}

.alert-icon-container {
  animation: shake 0.5s;
}

/* ============ FORMULARIOS ============ */
.form-control-lg {
  border-radius: 8px;
  border: 1px solid #d1d3e2;
  transition: all 0.3s ease;
}

.form-control:focus,
.custom-field-input:focus,
.input-search:focus,
#buscarProducto:focus {
  border-color: #2b6b3154 !important;
  box-shadow:
    0 0 0 3px rgba(54, 185, 204, 0.1),
    inset 0 0 0 1px #2b6b3154 !important;
  outline: none;
}

.custom-control-input:checked ~ .custom-control-label::before {
  color: #fff;
  border-color: #2b6b31;
  background-color: #2b6b31;
}

.custom-switch-lg .custom-control-label::before {
  width: 3rem;
  height: 1.5rem;
  border-radius: 3rem;
}

.custom-switch-lg .custom-control-label::after {
  width: calc(1.5rem - 4px);
  height: calc(1.5rem - 4px);
  border-radius: calc(1.5rem - 4px);
}

.custom-switch-lg .custom-control-input:checked ~ .custom-control-label::after {
  transform: translateX(1.5rem);
}

.custom-file-label::after {
  background: #2b6b31;
  color: white;
}

/* ============ INPUT GROUP (buscador productos) ============ */
.input-group {
  position: relative;
  display: flex;
}

#buscarProducto {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  padding: 12px 16px !important;
  border: 2px solid #e8e8e8 !important;
  border-left: none !important;
  background-color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-radius: 0 8px 8px 0 !important;
  color: #2d3748;
}

#buscarProducto:hover:not(:focus) {
  border-color: #d0d0d0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

#buscarProducto::placeholder {
  color: #a0aec0;
  font-weight: 400;
}

.input-group-text {
  background: #1e5f24 !important;
  color: #ffffff;
  border: none;
  border-right: none !important;
  padding: 4px 16px !important;
  border-radius: 8px 0 0 8px !important;
  font-size: 14px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 10px rgba(54, 185, 204, 0.2);
}

.input-group-text i {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff !important;
}

.input-group-text--right {
  background: #1e5f24 !important;
  border: none !important;
  box-shadow: 0 3px 10px rgba(54, 185, 204, 0.2);
  border-radius: 0px 8px 8px 0px !important;
  position: relative;
  left: -2px;
}

.input-group:hover .input-group-text i {
  transform: scale(1.1);
}

#buscarProducto:focus ~ .input-group-text,
.input-group-text:has(~ #buscarProducto:focus) {
  box-shadow: 0 6px 20px rgba(54, 185, 204, 0.3) !important;
}

.input-group + small {
  transition: all 0.3s ease;
  color: #718096;
  font-size: 12px;
  margin-top: 8px;
  display: block;
}

.modal-body .input-group-text {
  background: #cbcbcb !important;
  font-weight: 500;
  box-shadow: none;
}

.modal-body .input-group-text--right {
  background: #cbcbcb !important;
  border: none !important;
  box-shadow: none;
  border-radius: 0px 9px 9px 0px !important;
}

/* ============ PAGINACIÓN ============ */
.page-link {
  position: relative;
  display: block;
  padding: 5px 10px;
  color: #4e73df;
  text-decoration: none;
  background-color: #e9b151;
  border: 1px solid #dee2e6;
  transition:
    color 0.15s ease-in-out,
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  border-radius: 5px;
  margin: 0 2px;
}

.page-link:hover {
  z-index: 2;
  color: #fff;
  background-color: #2b6b31;
  border-color: #1cc88a;
  text-decoration: none;
}

.page-item.active .page-link {
  z-index: 3;
  color: #fff;
  background-color: #2b6b31;
  border-color: #1cc88a;
  border-radius: 5px;
}

#catalogosTableBody td button strong {
  color: #2b6b31;
  margin-right: 10px;
}

/* ============ SCROLL TO TOP ============ */
.scroll-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(52, 58, 64, 0.5);
  color: #fff;
  text-align: center;
  line-height: 2.75rem;
  z-index: 1050;
  text-decoration: none;
}

.scroll-to-top:hover {
  background: #343a40;
  color: #fff;
}

/* ============ ANIMACIONES / MISC ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 3s linear infinite;
}

.txtloading {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  gap: 10px;
}

.txtloading i {
  color: #2b6b31;
  font-size: 20px;
}

.txtSystem {
  color: #2b6b31;
}

tr.sin-resultados {
  animation: fadeIn 0.3s ease;
}

tbody tr[style*="display: none"] {
  animation: fadeOut 0.2s ease;
}

/* ============ RESPONSIVE (móvil) ============ */
@media (max-width: 767px) {
  .bee-sidebar {
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    background: #fff;
    width: 14rem !important;
    transform: translateX(0);
    transition:
      transform 0.3s ease-in-out,
      width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0.15rem 1.75rem rgba(58, 59, 69, 0.3);
  }

  body.sidebar-toggled .bee-sidebar {
    transform: translateX(-100%);
  }

  body:not(.sidebar-toggled)::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  }

  .bee-sidebar__brand {
    justify-content: center;
  }

  .bee-sidebar__toggle {
    display: none;
  }

  .bee-sidebar.toggled {
    width: 14rem !important;
  }

  /* Re-mostrar textos en móvil aunque el sidebar esté "toggled" */
  .bee-sidebar.toggled .bee-sidebar__item span,
  .bee-sidebar.toggled .bee-sidebar__item--collapse::after {
    display: inline;
  }

  .bee-sidebar.toggled .bee-sidebar__heading {
    visibility: visible;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .bee-sidebar.toggled .bee-sidebar__brand {
    justify-content: space-between;
  }

  .bee-sidebar.toggled .bee-sidebar__brand img {
    opacity: 1;
    visibility: visible;
    max-width: 120px;
    transform: scale(1);
  }

  .bee-sidebar.toggled .bee-sidebar__sub {
    display: block;
  }

  .bee-sidebar .bee-sidebar__item {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    gap: 0;
    margin: 3px auto;
    padding: 10px 15px !important;
    min-width: 6rem;
  }

  .bee-sidebar .bee-sidebar__item span {
    font-size: 12px;
    margin-top: 5px;
  }

  .bee-sidebar .bee-sidebar__item i {
    font-size: 24px;
    margin-right: 0;
  }

  .bee-sidebar__item--collapse::after {
    margin-left: 0;
    margin-top: 5px;
  }

  .bee-sidebar__heading {
    margin: 0.5rem auto;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 95%;
  }

  #content-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  #topnavbar li .bee-topbar__link {
    padding: 0px !important;
    height: auto;
  }

  #topnavbar .bee-topbar__item {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .table .btn-outline-info,
  .btn-outline-warning,
  .btn-outline-danger {
    margin-bottom: 10px !important;
  }
}
