/*
 GODS SALGADOS
 V10.1 MOBILE / PWA
*/

/* Desktop permanece inalterado */

@media (max-width: 768px) {

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 78px;
  }

  button,
  input,
  select {
    min-height: 44px;
  }

  /* Rolagem mais confortável no celular */
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* Evita zoom automático do iPhone nos campos */
  input,
  select,
  textarea {
    font-size: 16px;
  }

}

/* Celulares menores */

@media (max-width: 480px) {

  body {
    padding-bottom: 74px;
  }

}


/* =========================================
   GODS V10.1 - BARRA INFERIOR MOBILE
   ========================================= */

.gods-mobile-nav {
  display: none;
}

@media (max-width: 768px) {

  .gods-mobile-nav {
    position: fixed;
    display: flex;
    left: 0;
    right: 0;
    bottom: 0;

    height: 72px;

    background: rgba(255,255,255,.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-top: 1px solid #e5e7eb;

    box-shadow:
      0 -8px 25px rgba(15,23,42,.08);

    z-index: 9999;

    padding:
      5px
      max(5px, env(safe-area-inset-right))
      max(5px, env(safe-area-inset-bottom))
      max(5px, env(safe-area-inset-left));
  }

  .gmn-item {
    flex: 1;

    border: 0;
    background: transparent;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 2px;

    min-width: 0;
    min-height: 58px;

    padding: 3px 1px;

    font-family: inherit;
    font-size: 10px;
    font-weight: 700;

    color: #64748b;

    cursor: pointer;

    border-radius: 12px;

    transition: .18s ease;
  }

  .gmn-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 25px;

    font-size: 21px;
    line-height: 1;
  }

  .gmn-item.active {
    color: #f4511e;
  }

  .gmn-item.active .gmn-icon {
    transform: translateY(-1px);
  }

  body {
    padding-bottom:
      calc(82px + env(safe-area-inset-bottom));
  }

}


/* V10.1 - CABECALHO MOBILE LIMPO */
@media (max-width: 768px) {

  header .moreDetails {
    display: none !important;
  }

  header {
    min-height: 86px;
  }

}

/* ========================================
   GODS V10.1 - MENU MAIS MOBILE
   ======================================== */

.gods-more-overlay {
  display: none;
}

@media (max-width:768px) {

  .gods-more-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;

    background: rgba(15,23,42,.48);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    align-items: flex-end;
  }

  .gods-more-overlay.open {
    display: flex;
  }

  .gods-more-sheet {
    width: 100%;
    max-height: 82vh;

    background: #fff;

    border-radius: 24px 24px 0 0;

    padding:
      10px 18px
      calc(22px + env(safe-area-inset-bottom));

    box-shadow: 0 -20px 60px rgba(15,23,42,.20);

    overflow-y: auto;
  }

  .gods-more-handle {
    width: 42px;
    height: 5px;

    margin: 2px auto 17px;

    border-radius: 999px;

    background: #d1d5db;
  }

  .gods-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
  }

  .gods-more-head strong {
    display: block;

    font-size: 24px;
    color: #111827;
  }

  .gods-more-head small {
    display: block;

    margin-top: 3px;

    color: #64748b;
    font-size: 13px;
  }

  .gods-more-close {
    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 50%;

    background: #f1f5f9;

    font-size: 25px;
    color: #334155;
  }

  .gods-more-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 11px;
  }

  .gods-more-grid button {
    min-height: 88px;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: #fff;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: 15px;

    color: #1f2937;

    box-shadow: 0 4px 12px rgba(15,23,42,.04);
  }

  .gods-more-grid button span {
    font-size: 23px;
    margin-bottom: 7px;
    color: #f4511e;
  }

  .gods-more-grid button b {
    font-size: 14px;
  }

  .gods-more-logout {
    width: 100%;
    min-height: 50px;

    margin-top: 16px;

    border: 1px solid #fee2e2;
    border-radius: 14px;

    background: #fff7f7;

    color: #dc2626;

    font-weight: 800;
    font-size: 14px;
  }

  body.gods-menu-open {
    overflow: hidden;
  }

}

/* GODS V10.1 - ICONES MOBILE PROFISSIONAIS */

@media (max-width:768px) {

  .gmn-icon svg {
    width: 23px;
    height: 23px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .gmn-item {
    position: relative;
  }

  .gmn-item.active {
    color: #f4511e;
  }

  .gmn-item.active::before {
    content: "";

    position: absolute;
    top: -5px;
    left: 50%;

    width: 28px;
    height: 3px;

    transform: translateX(-50%);

    border-radius: 0 0 4px 4px;

    background: #f4511e;
  }

}


/* =========================================
   GODS V10.1 - PEDIDOS / KANBAN MOBILE
   ========================================= */

@media (max-width: 768px) {

  /* Área de pedidos */
  #board {
    width: 100%;
    gap: 12px;
    align-items: start;
  }

  /* Cada coluna do fluxo */
  #board .col {
    border-radius: 18px;
    min-width: calc(100vw - 56px);
    scroll-snap-align: start;
  }

  /* Cards dos pedidos */
  #board .card {
    width: 100%;
    min-height: 118px;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 10px;
  }

  #board .card .num {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
  }

  #board .card .client {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.35;
  }

  #board .card .meta {
    margin-top: 10px;
    gap: 7px;
    font-size: 12px;
  }

  /* Botões operacionais */
  #board .quick {
    width: 100%;
    min-height: 48px;

    margin-top: 13px;

    border-radius: 12px;

    font-size: 13px;
    font-weight: 800;
  }

  /*
    Em Geral mantemos navegação horizontal
    entre as etapas.
  */
  body:not(.gods-sector-focus) #board {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 7px;
  }

  /*
    Nos setores operacionais,
    a coluna passa a ocupar toda a largura.
  */
  body.gods-sector-focus #board {
    display: block !important;
    overflow-x: visible;
  }

  body.gods-sector-focus #board .col {
    width: 100%;
    min-width: 100%;
  }

}
