/* ========================================================
   ALMAH Fitness — Painel Administrativo Corporativo
   Folha de Estilos Modular (admin.css)
   ======================================================== */

:root {
  --almah-moss: #1E3A2F;
  --almah-moss-light: #2C5343;
  --almah-moss-dark: #12241D;
  --almah-cacau: #4A3525;
  --almah-cacau-light: #634833;
  --almah-terra: #D95D39;
  --almah-terra-hover: #C24C29;
  --almah-offwhite: #FAF8F5;
  --almah-sand: #EAE2D6;
  --almah-sand-light: #F4EFEB;
  --almah-onyx: #1C1917;
  --almah-olive: #4D5544;
  --almah-nude: #C4A496;
  --almah-malva: #8C6A6B;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--almah-sand-light);
}
::-webkit-scrollbar-thumb {
  background: var(--almah-nude);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--almah-cacau);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Abas de Navegação (Tabs) */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
.aba-btn.active {
  background-color: var(--almah-terra) !important;
  color: var(--almah-offwhite) !important;
  box-shadow: 0 4px 12px rgba(217, 93, 57, 0.35);
}

/* Sidebar Retrátil (Desktop & Mobile) */
#sidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#sidebar.collapsed {
  width: 5rem !important;
}
#sidebar.collapsed .sidebar-text {
  display: none !important;
}
#sidebar.collapsed .sidebar-icon-only {
  display: flex !important;
}
#sidebar.collapsed .aba-btn {
  justify-content: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}
#sidebar.collapsed #badgePedidosPendentes {
  display: none !important;
}
#mainWrapper {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#mainWrapper.sidebar-collapsed {
  margin-left: 5rem !important;
}

/* Transição e Proporção Real da Logo Oficial na Sidebar */
#sidebarLogoImg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quando Sidebar estiver retraída (w-20 / 5rem no desktop) */
#sidebar.collapsed #sidebarHeader {
  padding-top: 0.875rem !important;
  padding-bottom: 0.875rem !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

#sidebar.collapsed #sidebarLogoImg:not(.hidden) {
  display: block !important;
  height: 2.5rem !important; /* h-10 (40px) */
  width: 2.5rem !important;  /* w-10 (40px) */
  padding: 0.25rem !important; /* p-1 (4px) */
  margin-bottom: 0 !important;
  border-radius: 0.625rem !important;
}

#sidebar.collapsed #sidebarLogoImg:not(.hidden) ~ #sidebarIconFallback {
  display: none !important;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #D1D5DB;
  transition: 0.3s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--almah-moss);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* Dropzone de Upload (Drag & Drop) */
.dropzone-box {
  border: 2px dashed #D1D5DB;
  transition: all 0.2s ease-in-out;
}
.dropzone-box:hover,
.dropzone-box.drag-over {
  border-color: var(--almah-moss);
  background-color: rgba(30, 58, 47, 0.04);
}

/* Estilos de Impressão de Etiquetas Térmicas EAN-13 */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body > *:not(#modalEtiquetas) {
    display: none !important;
  }
  #modalEtiquetas {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
  }
  #modalEtiquetas .modal-etiquetas-janela {
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .no-print {
    display: none !important;
  }
  #areaImpressaoEtiquetas {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 8px !important;
    padding: 4px !important;
    page-break-after: always;
  }
  .etiqueta-card {
    border: 1px dashed #444 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    background: #fff !important;
  }
  #areaImpressaoCarne {
    position: static !important;
    display: block !important;
    background: #fff !important;
    color: #000 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
