html,
body {
   height: 100%;
   max-height: 100dvh;
   max-width: 100dvw;
   font-family: "Poppins Regular", sans-serif;
   background-color: #f0f2f5;
   margin: 0;
   overflow-y: hidden;
}

.pointer {
   cursor: pointer !important;
}

.cursor-grab {
   cursor: grab;
}

/* Item arrastável */
#sortable li {
   cursor: grab;
   transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Quando estiver sendo arrastado */
#sortable li.dragging {
   transform: scale(1.05);
   box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
   cursor: grabbing;
   background: #f9f9f9;
   width: 80% !important;
}

/* Espaço deixado no lugar */
.dose-placeholder {
   background: #e0f7fa;
   border: 2px dashed #00acc1;
   height: 40px;
   margin: 5px 0;
   list-style: none;
}


/* Sidebar */
.sidebar {
   width: 65px;
   transition: width 0.3s ease, padding 0.3s ease;
   position: sticky;
   top: 80px;
   z-index: 1000;
   padding: 0.5rem;
   overflow-x: hidden;
   white-space: nowrap;
}

.sidebar .nav-link {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   color: #333;
   font-size: 0.9rem;
   padding: 0.75rem;
   border-radius: 0.5rem;
   transition: background 0.3s ease, padding 0.3s ease;
}

.sidebar .nav-link:hover {
   background-color: #f1f1f1;
}

.sidebar .link-text {
   display: none;
   opacity: 0;
   transition: opacity 0.3s ease;
}

.sidebar.expanded {
   width: 280px;
   transition: width 0.3s ease;
}

.sidebar.expanded .nav-link {
   justify-content: flex-start;
   padding-left: 1rem;
}

.sidebar.expanded .link-text {
   display: inline;
   opacity: 1;
}

.submenu-float {
   position: fixed;
   top: 120px;
   /* ajuste com base na posição do botão "Cadastros" */
   left: 80px;
   /* aparece à direita da sidebar de 72px */
   background: #fff;
   border-radius: 8px;
   padding: 0.5rem 0;
   box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
   display: none;
   z-index: 1100;
   width: 50vw;
   max-height: 500px;
   overflow-y: auto;
}

.submenu-float li {
   list-style: none;
}

.submenu-float li a {
   display: block;
   padding: 0.5rem 0.5rem;
   text-decoration: none;
   color: #333;
   font-size: 0.875rem;
}

/* .submenu-float li a:hover {
   background-color: #f1f1f1;
} */

.submenu-float li a .card:hover {
   box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Esconde a seta quando a sidebar está recolhida */
.sidebar:not(.expanded) .dropdown-arrow {
   display: none;
}

/* Exibe a seta quando expandida */
.sidebar.expanded .dropdown-arrow {
   display: inline;
}

/* Toggle Button */
.toggle-sidebar {
   border: none;
   background: transparent;
   transition: background-color 0.3s ease;
}

.toggle-sidebar:hover {
   background-color: #e9ecef;
   border-radius: 6px;
}

/* Responsivo */
@media (max-width: 768px) {
   .sidebar {
      position: fixed;
      z-index: 1050;
   }

   .sidebar.expanded+.flex-grow-1 {
      margin-left: 220px;
   }
}

/* Link de navegação */
.nav-link {
   color: #333;
   font-weight: 500;
   transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
   background: #f1f1f1;
   border-radius: 0.375rem;
}

/* Cartões */
.card {
   border: none;
   border-radius: 12px;
   transition: transform 0.3s ease;
}

.card:hover {
   transform: translateY(-4px);
}

.card-body {
   padding: 16px;
}

/* DATA TABLES */
.dt-paging ul.pagination li button {
   font-size: 0.975rem;
   /* equivalente ao sm */
   padding: 0.25rem 0.5rem;
}

table.data-table tbody tr td {
   vertical-align: middle;
}

div.dt-container div.dt-search input {
   margin: 0px;
}

/* FORMULARIOS */
.label-danger {
   background-color: #d9534f
}

.label-danger[href]:focus,
.label-danger[href]:hover {
   background-color: #c9302c
}

select[readonly].select2-hidden-accessible+.select2-container {
   pointer-events: none;
   touch-action: none;
   opacity: 0.6;
   /* Optional: to visually indicate readonly state */
   cursor: no-drop;
   /* Optional: to visually indicate non-interactiveness */
}

.text-orange {
   color: orange !important;
}