html {
  width: 100%;
}

body {
  overflow-x: hidden !important;
}

body.show-spinner>main {
  overflow: hidden !important;
}

/* Hide everything under body tag */
body.show-spinner>* {
  opacity: 0;
}

/* Spinner */
body.show-spinner::after {
  content: " ";
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  border-top-color: rgba(0, 0, 0, 0.3);
  animation: spin 1s ease-in-out infinite;
  -webkit-animation: spin 1s ease-in-out infinite;
  left: calc(50% - 15px);
  top: calc(50% - 15px);
  position: fixed;
  z-index: 1;
}

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

@-webkit-keyframes spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}

body{
  min-height: calc(100% - 79px);
}

/* menu changes */
.navbar{
  height: 50px;
  padding: 0.5rem 0 0.5rem 0
}

.menu{
  padding-top: 50px;
  height: calc(100% - 50px) !important
}

.menu .main-menu{
  height: calc(100% - 50px) !important
}

.logo{
  background-size: 100%;
}

/* main page according to new menu format */

main {
  margin-top: 75px;
  margin-right: 25px;
  margin-bottom: 20px;
}

/* list table changes */

.data-table-rows table td{
  padding: 0.4rem;
}

table.dataTable td {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* page footer */

footer.page-footer{
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  height: 60px;
}

.logo-mobile {
  background-size: 100%;
}

.formButtonPosition{
  text-align: center;
}

/* Include buttons */
.form-group .btAddItem{
  padding: 2px 4px 2px 4px;
  border-radius: 8px;
}

.custom-scroll-list{
  max-height: 260px;
  overflow-y: scroll;
}

.searchStandardSelected{
  width: 100%;
}

.searchStandardSelected tbody tr td{
  cursor: pointer;
}

.searchStandard tbody tr td{
  cursor: pointer;
}

.w100{
  width: 100%;
}

.mg-left0{
  margin-left:0px
}

.menu .sub-menu {
  height: calc(100% - 45px)
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 192px !important;
}

.fileList {
  padding-top: 10px;
  max-height: 300px;
  overflow-y: scroll;
}

.fileSection {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fileSection p{
  width: 100%;
  height: 15px;
  text-align: center;
  margin: 0px;
}

.fileSection i{
  width: 100%;
  height: 15px;
  text-align: center;
  margin: 0px;
}

.fileSection button{
  padding: 4px 8px 4px 8px;
  margin-left: 2px;
}

.padding4 {
  padding: 4px 4px 4px 4px !important;
}

.card-body {
  padding: 16px 16px 16px 16px !important;
}

.dnone{
  display: none !important;
}

.pb-small{
  height: 92px
}

.mp-related{
  height: 215px;
}

/* for dark mode */
.dark .weight-visor{
  font-size: 50px;
  border: none !important;
  background-color: #1e2022;
  color: #d0d0d0 !important;
}

.light .weight-visor{
  font-size: 50px;
  border: none !important;
  background-color: #f8f9fa;
  color: #1e2022 !important;
}

.weight-bottom{
  height: 380px!important;
}

.bcode-visor{
  font-size: 20px;
  border: none !important;
  background-color: transparent;
}

.bcode-visor:focus{
  background-color: transparent;
}

.oplist{
  height: 350px;
  overflow-y: scroll;
}

.mb-80{
  margin-bottom: 80px !important;
}

.pb-60{
  padding-bottom: 60px !important;
}

.sfield .lead {
  font-size: 0.8rem !important;
  line-height: 1.1rem !important;
  font-weight: 300;
}

.sop :hover {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
}

.displaySuccess {
  border-color:#9EC600;
  background-color:#9EC600;
  color: black
}

.displaySuccess .text-white{
  color: black !important;
}

.displaySuccess .form-control{
  background-color: #9EC600;
  color: black !important;
}

.displayError {
  border-color:#eb4034;
  background-color:#eb4034;
  color: white
}

.displayError .text-white{
  color: white !important;
}

.displayError .form-control{
  background-color: #eb4034;
  color: white !important;
}

.dark .opCheck {
  background-color: #1e2022;
  border-radius: .75rem;
  padding: .4rem;
}

.light .opCheck {
  background-color: #f8f9fa;
  border-radius: .75rem;
  padding: .4rem;
}

#palletCode{
  font-size: 1.1rem;
}

.text-success{
  color: #9EC600 !important;
}

.fieldData{
  cursor: pointer;
}

.fieldData :hover {
  background-color: #e2e6ea;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.dark .clicable:hover {
  background-color: #e2e6ea;
  border-radius: 0.5rem;
  cursor: pointer;
}

.light .clicable:hover {
  background-color: #1e2022;
  border-radius: 0.5rem;
  cursor: pointer;
}

.dark .unitSelected{
  color: white;
}

.light .unitSelected{
  color: black;
}

.light .text-color-custom{
  color: black;
}

.dark .text-color-custom{
  color: white;
}

.lop{
  cursor: pointer;
  border: 1px solid #1e2022;
  border-radius: 8px;
  padding: 4px 8px 4px 8px;
  margin: 2px;
}

.lop.selected{
  background-color: rgb(56, 103, 138);;
  color: white;
}

.spallet{
  cursor: pointer;
}

.scrollable {
  width: 100%;
  border-collapse: collapse;
}

.scrollable thead, 
.scrollable tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed; /* evita desalinhamento */
}

/* .scrollable thead {
  background: #3195a5;
} */

.scrollable tbody {
  display: block;
  max-height: 300px; /* altura do corpo visível */
  overflow-y: auto;
  overflow-x: hidden;
}

.scrollable th, 
.scrollable td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.lscroll {
  display: flex;
  flex-wrap: nowrap;
  min-height: 130px;     /* impede quebra de linha */
  overflow-x: auto;       /* ativa scroll horizontal */
  gap: 1rem;              /* espaçamento entre cards */
  padding-bottom: 8px;  /* thumb | track */
}

.dark .lscroll {
  scrollbar-width: thin;        /* fino */
  scrollbar-color: #444 #111; 
}

.lscroll::-webkit-scrollbar {
    height: 8px;                  /* altura da barra horizontal */
}

.lscroll::-webkit-scrollbar-track {
    background: #111;             /* fundo da trilha (tema escuro) */
    border-radius: 8px;
}

.lscroll::-webkit-scrollbar-thumb {
    background: #444;             /* cor da barra */
    border-radius: 8px;
}

.lscroll::-webkit-scrollbar-thumb:hover {
    background: #666;             /* cor ao passar o mouse */
}

.lscroll > .col,
.lscroll> div {
  flex: 0 0 auto;         /* evita que se expandam */
  width: 360px !important;          /* define largura de cada card */
}

#listOperators {
  font-size: 12pt;
}

.filterTable{
  cursor: pointer;
}

#listSectors .active{
  border-color: #3195a5;
  border-width: 2px;
}

.fishIcon{
  font-size: 48pt;
  color: #3195a5;
}

.adjusted{
  color: #ddd;
  background-image: linear-gradient(to right top, #38688b, #427599, #46789b);;
}

.adjusted .progressbar-text{
  color: white !important;
}

.table-fixed-header thead th {
    position: sticky;
    top: 0;
    /* background: #fff; */
    z-index: 5;
}

.table-fixed-header tbody {
    display: block;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
}

.table-fixed-header thead,
.table-fixed-header tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.dark .radial {
  --size: 60px;
  --thickness: 6px;
  --color: #007bff;;
  --bg: #8f8f8f;

  text-align: center;
  padding-top: 20px;

  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #343a40 79%, transparent 80% 100%),
    conic-gradient(var(--color) calc(var(--value) * 1%), var(--bg) 0);
  position: relative;
}

.light .radial {
  --size: 60px;
  --thickness: 6px;
  --color: #007bff;
  --bg: #ddd;

  text-align: center;
  padding-top: 20px;
  color: #1e2022;

  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(closest-side, white 79%, transparent 80% 100%),
    conic-gradient(var(--color) calc(var(--value) * 1%), var(--bg) 0);
  position: relative;
}

.radial::before {
  content: calc(var(--value) * 1%) "%";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.jq-toast-wrap,
.jq-toast-single {
    position: fixed !important;
    z-index: 999999 !important;
}


#picking-List{
  max-height: 400px;
  overflow-y: scroll;
}

.dark .dropdown-item {
  color: #ffffff !important;
}

/* Inline loading spinner — scoped to a component, not fixed to viewport */
.loading-local {
  display: block;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(56, 103, 138, 0.2);
  border-top-color: #38688b;
  border-radius: 50%;
  -webkit-animation: spin 1s ease-in-out infinite;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}

.tableMin{
  min-height: 200px;
  position: relative;
}

.tableMin tr td {
  padding: 0.1rem !important;
}

.tableMin .resumo-spinner-row td{
  height: 200px;
  vertical-align: middle;
  padding: 0 !important;
}

/* Chart canvas wrapper — fixed height prevents ResizeObserver infinite loop */
.chart-canvas-wrap {
  position: relative;
  height: 280px;
  margin-top: 20px;
}

/* Chart loading placeholder — same height as the canvas */
.chart-load-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 194px;
}

.table-responsive2{
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#unitsList {
  overflow: hidden;
}

#unitsList ul .alert-info {
  background-color: rgba(255,255,255,0.2);
  border: none;
  border-radius: 4px;
  color: inherit;
  padding: 4px 6px;
}

.dashboard-sq-banner .card-body{
  width: 100% !important;
}

#unitsList ul li {
  padding-left: 8px;
  padding-right: 8px;
}

.card-menu{
  padding-left:0px !important;
  padding-right: 0px !important;
}

.card-menu h5{
  padding-left: 16px !important;;
}

.card-menu h6{
  padding-left: 16px !important;;
}

.card-menu ul li{
  padding-left: 4px !important;;
}

.resumo-scroll {
  max-height: 340px;
  overflow-x: auto;
  overflow-y: auto;
}

.resumo-scroll table {
  table-layout: fixed;
  border-collapse: collapse;
}

.resumo-scroll th,
.resumo-scroll td {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Right-align all numeric columns (everything except Faixa Peso) */
.resumo-scroll th:not(:first-child),
.resumo-scroll td:not(:first-child) {
  text-align: right;
}

/* Sticky body cells — first 4 columns */
.resumo-scroll td:nth-child(1) { position: sticky; left: 0;     z-index: 1; background: var(--foreground-color, #fff); }
.resumo-scroll td:nth-child(2) { position: sticky; left: 50px;  z-index: 1; background: var(--foreground-color, #fff); }
.resumo-scroll td:nth-child(3) { position: sticky; left: 100px; z-index: 1; background: var(--foreground-color, #fff); }
.resumo-scroll td:nth-child(4) { position: sticky; left: 150px; z-index: 1; background: var(--foreground-color, #fff); }

/* Sticky header — all cells stick to top */
.resumo-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--foreground-color, #fff);
}

/* Corner cells: first 4 headers stick to both top and left */
.resumo-scroll thead th:nth-child(1) { left: 0;     z-index: 3; }
.resumo-scroll thead th:nth-child(2) { left: 50px;  z-index: 3; }
.resumo-scroll thead th:nth-child(3) { left: 100px; z-index: 3; }
.resumo-scroll thead th:nth-child(4) { left: 150px; z-index: 3; }

/* Separator rows (alert-info) override sticky bg */
.resumo-scroll .alert-info td:nth-child(1),
.resumo-scroll .alert-info td:nth-child(2),
.resumo-scroll .alert-info td:nth-child(3),
.resumo-scroll .alert-info td:nth-child(4) {
  background: inherit;
}

/* Dark mode background for sticky cells */
.dark .resumo-scroll td:nth-child(1),
.dark .resumo-scroll td:nth-child(2),
.dark .resumo-scroll td:nth-child(3),
.dark .resumo-scroll td:nth-child(4),
.dark .resumo-scroll thead th {
  background: var(--foreground-color, #1d2231);
}

.clickable-banner {
  cursor: pointer;
}

.kpi-card {
  height: 100%;
}

.clickable-kpi {
  cursor: pointer;
}

.dashboard-filled-line-chart {
  height: 400px !important;
}

/* Nurseries list — fills remaining vertical space */
#nurseriesList {
  height: calc(100vh - 180px);
  align-items: stretch;
}

/* Each nursery card wrapper — flex column so inner card fills height */
.nursery-card-wrap {
  display: flex;
  flex-direction: column;
  min-width: 336px;
  width: 360px;
  flex: 0 0 auto;
}

.nursery-card-wrap .card {
  flex: 1;
}

/* Card body fills remaining height via flex column */
.nursery-card-wrap .card-body {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

/* Nursery badge tags — larger than default */
.nursery-tag {
  font-size: 0.8rem;
  padding: 0.35em 0.55em;
  margin-right: 2px;
  margin-bottom: 2px;
}

.nursery-tag-genetica {
  font-size: 0.75rem;
  padding: 0.3em 0.5em;
}

/* Table area fills remaining card space */
.nursery-card-wrap .table-responsive2 {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 16px;
}
