/* UCHOA v201.2 - corrigir faixas escuras nos modulos operacionais.
   - Visao Geral (dashboard.html) e Producao (producao.html) NAO entram no escopo.
   - Nao altera sidebar, autenticacao, tabelas de dados, JS ou modais.
   - Classe gg-v2012 aplicada apenas nas paginas escolhidas.
*/
body.gg-v2012 {
  --gg212-ink: #132d50;
  --gg212-muted: #5e728d;
  --gg212-rule: #dde6f2;
  --gg212-accent: #1364df;
  --gg212-surface: #ffffff;
}

/* Faixa v193-v198: agora um cabecalho claro, compacto e legivel.
   Especificidade propositalmente maior que gg193/gg195/gg196.
   Inclui correcoes para classes gg195-edge/gg196-edge geradas por JS. */
@media screen {
  body.cash035-shared.gg-v2012 :is(.gg193-hero, .gg195-edge.gg193-hero, .gg196-edge.gg193-hero),
  body.cash035-shared.gg-v2012 main.gg198-retiradas-main > section.gg198-retiradas-hero {
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    float: none !important;
    display: block !important;
    overflow: visible !important;
    isolation: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: calc(100% - 48px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 48px) !important;
    margin: 22px 24px 22px !important;
    padding: 22px 26px !important;
    border: 1px solid var(--gg212-rule) !important;
    border-radius: 15px !important;
    background: var(--gg212-surface) !important;
    background-color: var(--gg212-surface) !important;
    background-image: none !important;
    color: var(--gg212-ink) !important;
    box-shadow: 0 4px 18px rgba(17, 43, 82, .055) !important;
    clip-path: none !important;
    filter: none !important;
    text-align: left !important;
  }

  body.cash035-shared.gg-v2012 .gg193-hero::before,
  body.cash035-shared.gg-v2012 .gg193-hero::after {
    content: none !important;
    display: none !important;
  }
  body.cash035-shared.gg-v2012 .gg193-hero h1 {
    display: block !important;
    color: var(--gg212-ink) !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: clamp(25px, 2.5vw, 33px) !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em !important;
    text-align: left !important;
    position: static !important;
    inset: auto !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 5px 0 8px !important;
    padding: 0 !important;
    transform: none !important;
    text-shadow: none !important;
    overflow: visible !important;
    white-space: normal !important;
  }
  body.cash035-shared.gg-v2012 .gg193-hero :is(p,small,.sm66-sub) {
    color: var(--gg212-muted) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    margin-top: 0 !important;
  }
  body.cash035-shared.gg-v2012 .gg193-hero :is(.eyebrow,[class*="kicker"],[class*="eyebrow"],.sm66-eyebrow) {
    color: #3065ac !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .11em !important;
    line-height: 1.5 !important;
    text-align: left !important;
    margin: 0 0 4px !important;
  }
  /* Headers with actions: keep actions in view; no rearrangement of DOM. */
  body.cash035-shared.gg-v2012 :is(.gg193-hero.crud-heading,.gg193-hero.erp011-heading,.gg193-hero.chat184-heading),
  body.cash035-shared.gg-v2012 main.gg198-retiradas-main > section.gg198-retiradas-hero {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px 22px !important;
  }
  body.cash035-shared.gg-v2012 :is(.gg193-hero.crud-heading,.gg193-hero.erp011-heading,.gg193-hero.chat184-heading, .gg198-retiradas-hero) > div:first-child {
    position: static !important;
    transform: none !important;
    min-width: 0 !important;
    flex: 1 1 300px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center !important;
  }
  body.cash035-shared.gg-v2012 .gg193-hero :is(button, a.ops038-cta) {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    align-self: center !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    border-radius: 10px !important;
  }
  body.cash035-shared.gg-v2012 .gg193-hero a.ops038-cta {
    background: #eaf1ff !important;
    color: #1354ac !important;
    border: 1px solid #cbdefb !important;
  }
  body.cash035-shared.gg-v2012 .gg193-hero .erp011-tag {
    background: #ecf3ff !important;
    color: #225aa8 !important;
    border: 1px solid #d7e6fb !important;
  }
  body.cash035-shared.gg-v2012 main.gg198-retiradas-main > section.gg198-retiradas-hero > a.ops038-cta {
    align-self: center !important;
    margin: 0 !important;
  }
}

/* Gerencial uses dash036-hero, not gg193-hero. Preserve actions and weather. */
@media screen {
  body.cash035-shared.gg-v2012 main.dash036 > .dash036-hero {
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px 24px !important;
    width: calc(100% - 48px) !important;
    max-width: calc(100% - 48px) !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 22px 24px !important;
    padding: 22px 26px !important;
    background: #fff !important;
    background-image: none !important;
    color: var(--gg212-ink) !important;
    border: 1px solid var(--gg212-rule) !important;
    border-radius: 15px !important;
    overflow: visible !important;
    box-shadow: 0 4px 18px rgba(17,43,82,.055) !important;
    text-align: left !important;
  }
  body.cash035-shared.gg-v2012 .dash036-hero::before,
  body.cash035-shared.gg-v2012 .dash036-hero::after {content:none!important;display:none!important;}
  body.cash035-shared.gg-v2012 .dash036-hero > div:first-child {min-width:0!important;flex:1 1 360px!important;}
  body.cash035-shared.gg-v2012 .dash036-hero h1 {
    color:var(--gg212-ink)!important;font-size:clamp(25px,2.5vw,33px)!important;
    line-height:1.2!important;margin:5px 0 8px!important;letter-spacing:-.025em!important;
    position:static!important;transform:none!important;
  }
  body.cash035-shared.gg-v2012 .dash036-hero :is(p,.dash036-heroright,.dash036-heroright div) {color:var(--gg212-muted)!important;}
  body.cash035-shared.gg-v2012 .dash036-hero .dash036-kicker {color:#3065ac!important;}
  body.cash035-shared.gg-v2012 .dash036-heroactions {margin-top:14px!important;}
  body.cash035-shared.gg-v2012 .dash036-heroactions a {
    background:#1262da!important;color:#fff!important;border:1px solid #1262da!important;
    border-radius:9px!important;
  }
  body.cash035-shared.gg-v2012 .dash036-heroactions a + a {
    background:#edf4ff!important;color:#184c90!important;border-color:#d5e3fa!important;
  }
  body.cash035-shared.gg-v2012 .dash036-heroright {min-width:170px!important;max-width:265px!important;text-align:right!important;}
  body.cash035-shared.gg-v2012 main.dash036 {padding-top:0!important;min-width:0!important;}
}

/* Caixa uses the separate cash034 layout, v197 has !important selectors. */
@media screen {
  body.cash034-body.gg-v2012 .cash034-app > main.cash034-main > .gg197-caixa-hero {
    box-sizing:border-box!important;
    width:calc(100% - 48px)!important;
    max-width:calc(100% - 48px)!important;
    height:auto!important;
    min-height:0!important;
    margin:22px 24px!important;
    padding:22px 26px!important;
    position:relative!important;
    transform:none!important;
    background:#fff!important;
    background-image:none!important;
    color:var(--gg212-ink)!important;
    border:1px solid var(--gg212-rule)!important;
    border-radius:15px!important;
    box-shadow:0 4px 18px rgba(17,43,82,.055)!important;
    overflow:visible!important;
    gap:18px!important;
  }
  body.cash034-body.gg-v2012 .gg197-caixa-hero h1 {
    color:var(--gg212-ink)!important;
    font-size:clamp(25px,2.5vw,33px)!important;
    margin:5px 0 8px!important;
    line-height:1.2!important;
  }
  body.cash034-body.gg-v2012 .gg197-caixa-hero p {color:var(--gg212-muted)!important;}
  body.cash034-body.gg-v2012 .gg197-caixa-hero .cash034-eyebrow {color:#3065ac!important;}
  body.cash034-body.gg-v2012 .cash034-main > .gg197-caixa-content {
    padding-top:0!important;
  }
}

/* Light finishing touches only inside reviewed modules; no table overflow hacks. */
body.gg-v2012 main :is(.panel, .gg178-metric, .dash036-panel):not(.gg193-hero) {
  border-color:#dce5f1 !important;
}
body.gg-v2012 main :is(input,select,textarea):focus-visible {
  outline:2px solid #8ab8ff!important;
  outline-offset:1px!important;
}
@media screen and (max-width:760px) {
  body.cash035-shared.gg-v2012 .gg193-hero,
  body.cash035-shared.gg-v2012 main.gg198-retiradas-main > section.gg198-retiradas-hero,
  body.cash035-shared.gg-v2012 main.dash036 > .dash036-hero,
  body.cash034-body.gg-v2012 .cash034-app > main.cash034-main > .gg197-caixa-hero {
    width:calc(100% - 24px)!important;
    max-width:calc(100% - 24px)!important;
    min-height:0!important;
    height:auto!important;
    margin:12px!important;
    padding:19px 17px!important;
    border-radius:12px!important;
  }
  body.cash035-shared.gg-v2012 .dash036-heroright {text-align:left!important;}
}
@media print {
  body.gg-v2012 .gg193-hero,
  body.gg-v2012 .dash036-hero,
  body.gg-v2012 .gg197-caixa-hero {
    background:#fff!important;box-shadow:none!important;color:#111!important;
    border-color:#ddd!important;
  }
}
