/* your styles go here */

td.yes {
  background-color: green;
}
td.no {
  background-color: red;
}

div.pdbottom {
padding-bottom: 15px;
}

.pagina {
@include position(absolute, 0, 0);
transition: width 0.3s linear;
background-color: #F4F7FA;
min-height: 100vh;
padding-bottom: 50px;

}

.centro {
position: fixed; /* or absolute */
top: 10%;
left: 25%;
}

.modal-dialog2 {

max-width: 700px;
margin: 1.75rem auto;

}

.botao2 {

background-color: #f7a185;
border: none;
color: white;

height: 25px;
width: 25px;
font-size: 14px;
margin: 4px 2px;
position: relative;
left: 150px;
}
.botao4 {

background-color: #f7a185;
border: none;
color: white;

height: 25px;
width: 25px;
font-size: 14px;
margin: 4px 2px;
position: relative;
left: 450px;
}

.botao3 {border-radius: 50%;}

.terminaltexto{
height: 25px;
width: 25px;
font-size: 14px;
margin: 4px 2px;
position: absolute;
left: 50x;
}

.terminaltexto2{
height: 25px;
width: 25px;
font-size: 14px;
margin: 4px 2px;
position: absolute;
left: 580px;
}

.fiotexto{
height: 25px;
width: 240px;
font-size: 14px;
margin: 4px 2px;
position: absolute;
left: 220px;
}


.fiotextold{
height: 25px;
width: 25px;
font-size: 14px;
margin: 45px 2px;
position: absolute;
left: 320px;
}

.terminaltexto2ld{
height: 25px;
width: 25px;
font-size: 14px;
margin: 45px 2px;
position: absolute;
left: 580px;
}


.fiotextord{
height: 25px;
width: 25px;
font-size: 14px;
margin: 45px 2px;
position: absolute;
left: 320px;
}

.terminaltexto2rd{
height: 25px;
width: 25px;
font-size: 14px;
margin: 45px 2px;
position: absolute;
left: 50px;
}

.tabelateste {
border-collapse: collapse;
width: 100%;
table-layout: fixed;
}

.tabelateste th, .tabelateste td {
border: 1px solid #ccc;
padding: 8px;
}

.tabelateste thead {
background-color: #f59171;
}

.tabelateste th {
font-size: 16px;
}

.tabelateste tr:nth-child(even) {
background-color: #f2f2f2;
}

.tabelateste .dragging {
background-color: #ddd;
color: #777;
}

.tabelateste tbody {
transition: background-color 0.2s ease;
}

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

.tabelaproj th, .tabelaproj td {
border: 1px solid #ccc;
padding: 8px;
}

.tabelaproj thead {
background-color: rgb(255, 198, 198);
}

.tabelaproj th {
font-size: 16px;
}
.blue-background {
background-color: #add8e6;
}

.yellow-background {
background-color: #ffd700;
}

.red-background {
background-color: #ffd1dc !important;
}

.green-background {
background-color: #ffec8b !important;
}


.gray-background {
background-color: #98fb98 !important;
}

.purple-background {
background-color: #d8bfd8 !important;
}

.tabelaproj tbody {
transition: background-color 0.2s ease;
}


.tabelap{
width: 100%;
}

.tabelah{
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px;
background-color: rgb(255, 198, 198); 
}
.tabelah p{
color: #666;
font-weight: bold;
}

.tabelai {

padding: 0.15rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
color: #495057;
border-radius: 0;
border: 1px solid #ced4da;
}

.btnt {
font-weight: 400;
border: 1px solid transparent;
padding: 0.25rem 0.75rem;
font-size: 0.9rem;
color: white;
line-height: 1.5;
border-radius: 0;
-webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
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;
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, -webkit-box-shadow 0.15s ease-in-out;
}

.btnt:focus, .btn.focus {
outline: 0;
-webkit-box-shadow: 0 0 0 0.2rem rgba(255, 63, 63, 0.25);
box-shadow: 0 0 0 0.2rem rgba(255, 63, 63, 0.25);
}

.btnt.disabled, .btn:disabled {
opacity: .65;
}

.btnt:not([disabled]):not(.disabled):active, .btn:not([disabled]):not(.disabled).active {
background-image: none;
}

.btnt-primary {
color: color-yiq(#f7a185);
background-color: #f7a185;
border-color: #f7a185;
}

.btnt-primary:hover {
color: color-yiq(#ff1919);
background-color: #ff1919;
border-color: #ff0c0c;
}

.btnt-primary:focus, .btn-primary.focus {
-webkit-box-shadow: 0 0 0 0.2rem rgba(255, 63, 63, 0.5);
box-shadow: 0 0 0 0.2rem rgba(255, 63, 63, 0.5);
}

.btnt-primary.disabled, .btn-primary:disabled {
background-color: #f7a185;
border-color: #f7a185;
}

.btnt-primary:not([disabled]):not(.disabled):active, .btn-primary:not([disabled]):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
color: color-yiq(#ff0c0c);
background-color: #ff0c0c;
border-color: #fe0000;
-webkit-box-shadow: 0 0 0 0.2rem rgba(255, 63, 63, 0.5);
box-shadow: 0 0 0 0.2rem rgba(255, 63, 63, 0.5);
}

.iconp-add {
background: transparent url("../img/plus.png") no-repeat scroll center center;
}

.iconp-imp {
background: transparent url("../img/file.png") no-repeat scroll center center;
}

.iconp {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
width: 32px;
height: 32px;
background-size: 100% 100%;
}



.button-text {
margin-top: 30px;
}

#tblichec-container {
width: 100%; /* Garante que o contêiner ocupe 100% da largura */
}

.tabelateste {
width: 100%; /* Garante que a tabela ocupe 100% da largura disponível */
table-layout: auto; /* Permite que o conteúdo da tabela controle o layout das colunas */
}

.modal-body {
padding: 0; /* Remove espaçamentos extras */
}

.table th, .table td {
white-space: nowrap; /* Evita que o conteúdo da tabela quebre linhas, se necessário */
}





.status-badge {
display: inline-flex;
align-items: center;
padding: 5px 10px;
border-radius: 12px;
font-size: 0.9rem;
font-weight: bold;
}

.status-active {
background-color: #d4f8e8;
color: #28a745;
}

.status-waiting {
background-color: #fff3cd;
color: #ffcc00;
}

.status-info {
  background-color: #fff3cd;
  color: #ea02ff;
  }

.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
margin-right: 8px;
}

.dot-active {
background-color: #28a745;
}

.dot-waiting {
background-color: #ffcc00;
}

.status-error {
background-color: #f8d7da;
color: #dc3545;
}

.dot-error {
background-color: #dc3545;
}

.dot-info {
  background-color: #ea02ff;
}

/* Badges personalizadas para tela de corte */
.corte-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.corte-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.badge-fio-counter {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.badge-quantidade {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  color: white;
}

.badge-imprimir {
  color: white;
  cursor: pointer;
}

.badge-imprimir-origem {
  background: linear-gradient(135deg, #17a2b8, #138496);
}

.badge-imprimir-origem:hover {
  background: linear-gradient(135deg, #138496, #117a8b);
}

.badge-imprimir-destino {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
}

.badge-imprimir-destino:hover {
  background: linear-gradient(135deg, #e68a00, #fd7e14);
}


.badge-linha {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  color: white;
}

/* Removed corte-dot classes - no longer needed */

/* Botões modernos para tela de corte */
.corte-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.corte-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.corte-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.corte-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.btn-anterior {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
}

.btn-anterior:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a6268, #343a40);
}

.btn-proximo {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.btn-proximo:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3, #004085);
}

.btn-proximos-fios {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  font-size: 0.9rem;
  padding: 10px 16px;
}

.btn-proximos-fios:hover:not(:disabled) {
  background: linear-gradient(135deg, #20c997, #17a2b8);
}

/* Ícones para os botões */
.corte-button::before {
  content: '';
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.btn-anterior::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>');
}

.btn-proximo::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>');
}

#tabagrpes {
  table-layout: fixed;
}.celula-mesclada { background-color: #fff3cd !important; }

.corte-toolbar {
  gap: 12px;
}

/* ====================================================================
   SEÇÃO DE EMENDA - Inline na tela de corte
   ==================================================================== */

/* Container da seção de emenda */
.emenda-pill-container {
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
}

/* Pill de alerta exibida junto aos botões */
.emenda-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-width: 2px;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.emenda-pill i {
  font-size: 1rem;
}

/* Estilos por tipo de emenda */
.emenda-pill.emenda-destino {
  background: linear-gradient(135deg, #ff9500, #ff6b00);
  color: white;
  border-color: #e85d00;
}

.emenda-pill.emenda-origem {
  background: linear-gradient(135deg, #ff6b00, #e85d00);
  color: white;
  border-color: #cc5200;
}

.emenda-pill.emenda-dupla {
  background: linear-gradient(135deg, #ff3333, #cc0000);
  color: white;
  border-color: #990000;
}

/* Alinhamento fixo dos terminais independente de selos */
#imgTerminalEsquerda, #imgTerminalDireita {
  margin-bottom: 10px !important;
}

/* Ocultar navbar em dispositivos mobile para ganhar espaço */
body.mobile-layout .page-header,
body.mobile-layout .navbar,
body.mobile-layout .header,
body.mobile-layout .breadcrumb-holder {
  display: none !important;
}

/* Ajustar padding do conteúdo principal quando navbar está oculta */
body.mobile-layout .content-inner,
body.mobile-layout .page-content,
body.mobile-layout {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Garantir que o conteúdo use toda a altura da tela */
body.mobile-layout .content-inner {
  min-height: 100vh !important;
}

/* PWA específico - ocultar elementos desnecessários quando instalado */
@media (display-mode: standalone) {
  /* Ocultar elementos de navegação web quando em modo PWA */
  .web-only {
    display: none !important;
  }

  /* Ajustar padding para PWA */
  body {
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  /* Melhorar aparência em full screen */
  .container-fluid {
    padding-left: env(safe-area-inset-left) !important;
    padding-right: env(safe-area-inset-right) !important;
  }
}

/* Ajustes mobile e PWA para tela de corte sem scroll */
@media screen and (max-width: 768px) {
  /* Remover scroll do body */
  body, html {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height - considera barras do navegador */
    position: fixed !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Ocultar header completamente em mobile */
  .header, .navbar {
    display: none !important;
  }

  /* Ajustar tela de corte para ocupar 100% da altura */
  #stltelct {
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    padding-top: 0 !important;
  }

  #stltelct .container-fluid {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 8px !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }

  /* Reduzir tamanhos para caber na tela 720x360 */
  #stltelct header {
    flex-shrink: 0 !important;
  }

  #stltelct header h1 {
    font-size: 1rem !important;
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
  }

  #stltelct header .d-flex {
    margin-bottom: 8px !important;
  }

  .corte-badge {
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    margin: 0 3px !important;
  }

  #stltelc3 {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #stltelc3 .d-flex {
    width: 100% !important;
    margin-bottom: 8px !important;
  }

  /* Reduzir tamanho da visualização do fio */
  #imgFio {
    height: 12px !important;
    width: 350px !important;
  }

  #imgTerminalEsquerda, #imgTerminalDireita {
    height: 35px !important;
    width: 70px !important;
  }

  /* Reduzir tamanho do QR Code */
  #qrCodeDisplay {
    margin-bottom: 5px !important;
  }

  #qrCodeDisplay canvas {
    max-width: 80px !important;
    max-height: 80px !important;
    width: 80px !important;
    height: 80px !important;
  }

  /* Ajustar botões */
  .form-group.row {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
  }

  .corte-button {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    min-width: 70px !important;
  }

  .btn-proximos-fios {
    font-size: 0.65rem !important;
    padding: 6px 10px !important;
  }

  /* Ajustar indicador de emenda em mobile */
  .emenda-pill-container {
    margin-left: 6px !important;
  }

  .emenda-pill {
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
  }

  .emenda-pill i {
    font-size: 1rem !important;
  }

  /* Compactar textos */
  #stltelct .text-center div {
    font-size: 0.75rem !important;
    margin-bottom: 1px !important;
    line-height: 1.2 !important;
  }

  /* Ajustar espaçamentos gerais */
  .mb-3 {
    margin-bottom: 8px !important;
  }

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

/* Preview da Etiqueta - Modo Debug */
.etiqueta-preview-container {
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  border: 2px solid #333;
  border-radius: 8px;
  padding: 20px;
  font-family: monospace;
  max-width: 600px;
  margin: 0 auto;
}

.etiqueta-preview-container .preview-field {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
}

.etiqueta-preview-container .preview-field:last-child {
  border-bottom: none;
}

.etiqueta-preview-container .preview-label {
  font-weight: bold;
  color: #333;
  min-width: 120px;
}

.etiqueta-preview-container .preview-value {
  color: #000;
  font-weight: 600;
  text-align: right;
}

.zpl-code-container {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 15px;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
}

.zpl-code-container pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ====================================================================
   ESTILOS RESPONSIVOS PARA TELA FERRAMENTAS CADASTRADAS
   ================================================================== */

/* Mobile: <= 768px */
@media (max-width: 768px) {
  /* Seção ferramentas - scroll natural */
  #stabespe {
    padding-bottom: 70px !important; /* Espaço para botão fixo */
  }

  #stabespe .container-fluid {
    padding: 10px !important;
  }

  /* Título compacto */
  #stabespe .ferramentas-titulo,
  #stabespe header h1 {
    font-size: 1.1rem !important;
    margin-bottom: 10px !important;
    line-height: 1.2 !important;
    padding: 5px 0 !important;
  }

  /* Container da tabela */
  #stabespe .row {
    margin: 0 !important;
  }

  #stabespe .col-12 {
    padding: 0 !important;
  }

  /* Tabela de aplicadores - compacta */
  #taplicd,
  #stabespe .ferramentas-table {
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
  }

  /* Header da tabela - reduzido */
  #taplicd thead th,
  #stabespe .ferramentas-table thead th {
    font-size: 0.95rem !important;
    padding: 8px 10px !important;
    background-color: #f7a185 !important;
    border: none !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
  }

  /* Linhas da tabela - compactas */
  #taplicd tbody td,
  #stabespe .ferramentas-table tbody td {
    font-size: 0.9rem !important;
    padding: 8px 10px !important;
    line-height: 1.3 !important;
    border-bottom: 1px solid #dee2e6 !important;
  }

  /* Linhas clicáveis - feedback visual */
  #taplicd tbody tr,
  #stabespe .ferramentas-table tbody tr {
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
  }

  #taplicd tbody tr:active,
  #stabespe .ferramentas-table tbody tr:active {
    background-color: #e0e0e0 !important;
  }

  /* Botão fixo no rodapé - sempre visível */
  .ferramentas-footer-fixed {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: linear-gradient(to top, rgba(255,255,255,1) 70%, rgba(255,255,255,0)) !important;
    padding: 10px 15px 15px 15px !important;
    text-align: center !important;
    display: none !important; /* Oculto por padrão */
  }

  /* Mostrar botão fixo apenas quando seção #stabespe estiver visível */
  #stabespe:not(.d-none) ~ .ferramentas-footer-fixed,
  #stabespe:not(.d-none) .ferramentas-footer-fixed {
    display: block !important;
  }

  /* Estilo do botão voltar */
  .ferramentas-footer-fixed .btn-ferramentas-voltar,
  .ferramentas-footer-fixed button {
    width: 100% !important;
    max-width: 250px !important;
    font-size: 0.95rem !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    border-radius: 25px !important;
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    border: none !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    transition: all 0.2s ease !important;
    color: white !important;
  }

  .ferramentas-footer-fixed .btn-ferramentas-voltar:active,
  .ferramentas-footer-fixed button:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
  }
}

/* Tablets: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  #stabespe .ferramentas-titulo {
    font-size: 1.4rem !important;
  }

  #taplicd thead th {
    font-size: 1rem !important;
    padding: 10px !important;
  }

  #taplicd tbody td {
    font-size: 0.95rem !important;
    padding: 10px !important;
  }

  /* Botão normal em tablets */
  .ferramentas-footer-fixed {
    display: none !important;
  }
}
