/* Homologacao – alinhamento responsivo e sistema de chamados, 20/11/2026 */

/* Central de chamados: cards, protocolos e registro de historico (nao chat) */
.cg-ticket-center { display:grid; gap:18px; min-width:0; }
.cg-ticket-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.cg-ticket-stats > div {
  background:#fff; border:1px solid #e1e7ee; border-radius:16px;
  display:grid; gap:2px; padding:16px 18px; min-width:0;
}
.cg-ticket-stats strong { font-size:clamp(22px,2vw,30px); color:#182748; font-weight:850; }
.cg-ticket-stats span { color:#657185; font-size:12px; font-weight:650; }
.cg-ticket-workspace {
  display:grid; grid-template-columns:minmax(260px,.8fr) minmax(0,1.35fr);
  align-items:start; gap:18px; min-width:0;
}
.cg-ticket-column,.cg-ticket-detail-column {
  background:rgba(255,255,255,.97); border:1px solid #e1e7ef;
  border-radius:18px; min-width:0; overflow:hidden;
}
.cg-ticket-column-header {
  padding:18px 18px 12px; display:flex; gap:10px; align-items:center; justify-content:space-between;
}
.cg-ticket-column-header h2 { margin:0; font-size:18px; }
.cg-ticket-column-header small { color:#69778b; }
.cg-ticket-filters { display:grid; gap:10px; padding:0 18px 16px; }
.cg-ticket-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.cg-ticket-fields > * { min-width:0; }
.cg-ticket-filters .input,.cg-ticket-filters .select { width:100%; min-width:0; }
.cg-ticket-list { display:grid; max-height:620px; overflow-y:auto; border-top:1px solid #e7ebf0; }
.cg-ticket-list-item {
  width:100%; display:flex; gap:10px; justify-content:space-between; align-items:center;
  padding:14px 16px; color:#172033; background:#fff; text-align:left;
  border:0; border-bottom:1px solid #edf0f3; cursor:pointer; min-height:88px;
}
.cg-ticket-list-item:hover,.cg-ticket-list-item:focus-visible { background:#f3f6fd; }
.cg-ticket-list-item.is-active { background:#f1f5ff; box-shadow:inset 3px 0 0 #5a67d8; }
.cg-ticket-list-main { display:grid; gap:4px; min-width:0; flex:1 1 auto; }
.cg-ticket-list-main strong {
  font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cg-ticket-list-main small { font-size:11px; color:#69768a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cg-ticket-list-badges { display:grid; justify-items:end; gap:6px; flex:0 0 auto; }
.cg-ticket-list-badges small { font-size:11px; color:#67738a; }
.cg-ticket-detail { padding:22px; display:grid; gap:18px; min-width:0; }
.cg-ticket-detail-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; min-width:0; }
.cg-ticket-detail-header > div { min-width:0; }
.cg-ticket-detail-header h2 { margin:6px 0; overflow-wrap:anywhere; font-size:clamp(18px,2vw,23px); }
.cg-ticket-detail-header p { margin:0; font-size:12px; color:#68778b; line-height:1.6; }
.cg-ticket-section { min-width:0; border-top:1px solid #edf0f4; padding-top:18px; display:grid; gap:12px; }
.cg-ticket-section h3 { font-size:15px; margin:0; }
.cg-ticket-section .field { margin:0; min-width:0; }
.cg-ticket-section textarea { width:100%; min-width:0; min-height:100px; resize:vertical; }
.cg-ticket-description { margin:0; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.cg-ticket-history { padding-left:22px; margin:0; display:grid; gap:13px; }
.cg-ticket-history li { padding-left:3px; }
.cg-ticket-history li strong { font-size:13px; }
.cg-ticket-history li time { margin-left:10px; color:#69778a; font-size:11px; }
.cg-ticket-history li p { margin:6px 0 0; color:#4d5b6d; white-space:pre-wrap; overflow-wrap:anywhere; }
.cg-ticket-resolution { background:#f1f8f6; border:1px solid #d5ebe2; border-radius:12px; padding:14px; }
.cg-ticket-resolution p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.cg-ticket-treatment > .btn,.cg-ticket-section > .btn { justify-self:start; min-height:44px; }
.cg-ticket-empty { min-height:280px; display:grid; place-content:center; padding:30px; text-align:center; color:#657185; }
.cg-ticket-empty h3 { margin:0 0 8px; color:#172033; }
.cg-ticket-empty p { margin:0; }
.cg-ticket-composer { display:grid; gap:15px; padding:20px; }
.cg-ticket-composer header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cg-ticket-composer h2 { margin:0; }
.cg-ticket-composer .field { margin:0; min-width:0; }
.cg-ticket-composer .input,.cg-ticket-composer .select { width:100%; min-width:0; }
.cg-ticket-composer .btn { justify-self:start; }
.cg-privacy-inbox { display:grid; gap:12px; }
.cg-privacy-inbox > details {
  background:#fff; padding:16px; border:1px solid #e0e7ef;
  border-radius:14px; min-width:0;
}
.cg-privacy-inbox summary { cursor:pointer; font-weight:750; display:flex; gap:10px; justify-content:space-between; }
.cg-privacy-inbox details[open] summary { border-bottom:1px solid #e7edf4; padding-bottom:12px; margin-bottom:12px; }
.cg-privacy-inbox .field { min-width:0; }
.cg-privacy-inbox textarea { width:100%; }
.cg-privacy-inbox p { overflow-wrap:anywhere; }
.cg-ticket-center .btn,.cg-privacy-inbox .btn { white-space:normal; text-align:center; }
.support-hub,.support-hub-content,.dashboard-panel,.result-charts-grid,.result-summary-grid { min-width:0; }
.support-hub-tabs { max-width:100%; overflow-x:auto; flex-wrap:wrap; gap:8px; }
.support-hub-tabs button { flex:0 0 auto; }

@media(max-width:1050px){
  .cg-ticket-workspace { grid-template-columns:1fr; }
  .cg-ticket-list { max-height:360px; }
}
@media(max-width:720px){
  .cg-ticket-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cg-ticket-detail { padding:16px; }
  .cg-ticket-detail-header { flex-direction:column; }
  .cg-ticket-fields { grid-template-columns:1fr; }
  .cg-ticket-column-header,.cg-ticket-filters { padding-left:14px; padding-right:14px; }
  .cg-ticket-list-item { padding:13px 14px; }
  .dashboard-page-header.result-detail-header { gap:12px; }
  .result-detail-header-actions { display:flex; flex-wrap:wrap; width:100%; gap:8px; }
  .result-detail-header-actions .btn { min-width:0; flex:1 1 auto; }
  .result-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .result-charts-grid { grid-template-columns:minmax(0,1fr); }
  .result-summary-card,.result-chart-card { min-width:0; }
  .support-hub-tabs { flex-wrap:nowrap; padding-bottom:4px; }
  .support-hub .dashboard-page-header { align-items:stretch; gap:12px; }
  .support-hub .dashboard-page-header .btn { min-height:44px; }
  .legal-page-shell,.legal-document-card { min-width:0; max-width:100%; }
  .legal-document-card .field input,.legal-document-card .field select,.legal-document-card .field textarea { max-width:100%; width:100%; }
}
@media(max-width:390px){
  .cg-ticket-stats > div { padding:12px; }
}


/* Homologacao: alinhamento da home publica e do painel no iPhone — 20/11/2026.
   Sobrescritas intencionalmente restritas ao mobile, sem alterar telas ao vivo. */
@media (max-width: 760px) {
  html.nzn-liquid-glass-ui .entry-gateway-shell {
    min-height: 100svh !important;
    min-height: 100dvh !important;
    box-sizing: border-box !important;
    width: 100% !important;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html.nzn-liquid-glass-ui .entry-gateway-card {
    width: min(100%, 520px) !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 22px !important;
    padding: clamp(24px, 6vw, 34px) !important;
    border-radius: 28px !important;
  }
  html.nzn-liquid-glass-ui .entry-gateway-logo {
    width: min(65%, 210px) !important;
    height: auto !important;
    margin: 0 auto !important;
    flex: 0 0 auto !important;
  }
  html.nzn-liquid-glass-ui .entry-gateway-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
  }
  html.nzn-liquid-glass-ui .entry-gateway-copy h1 {
    font-size: clamp(29px, 7.8vw, 42px) !important;
    line-height: 1.08 !important;
    text-wrap: balance;
  }
  html.nzn-liquid-glass-ui .entry-gateway-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    gap: 12px !important;
    margin: 0 !important;
  }
  html.nzn-liquid-glass-ui .entry-choice-card {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) 20px !important;
    grid-template-rows: auto !important;
    min-height: 86px !important;
    padding: 14px 16px !important;
    align-content: center !important;
    align-items: center !important;
    justify-items: stretch !important;
    justify-content: normal !important;
    gap: 12px !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }
  html.nzn-liquid-glass-ui .entry-choice-icon {
    width: 54px !important;
    height: 54px !important;
    justify-self: center !important;
    align-self: center !important;
  }
  html.nzn-liquid-glass-ui .entry-choice-copy {
    display: flex !important;
    min-width: 0 !important;
    align-items: center !important;
    align-self: center !important;
  }
  html.nzn-liquid-glass-ui .entry-choice-copy strong {
    font-size: clamp(15px, 4.25vw, 19px) !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere;
  }
  html.nzn-liquid-glass-ui .entry-choice-arrow {
    position: static !important;
    width: 20px !important;
    height: 24px !important;
    justify-self: center !important;
    align-self: center !important;
    background: transparent !important;
  }

  /* Todos os modulos usam o mesmo eixo icone/titulo.
     O ultimo card impar ocupa a linha inteira, mas nao vira horizontal. */
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid,
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid.master-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid > .home-module-card {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 58px minmax(40px, auto) !important;
    align-items: center !important;
    align-content: center !important;
    justify-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    min-height: 164px !important;
    padding: 18px 12px !important;
    text-align: center !important;
  }
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid > .home-module-card:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 58px minmax(40px, auto) !important;
    min-height: 164px !important;
    align-items: center !important;
    align-content: center !important;
    justify-items: center !important;
    justify-content: center !important;
    padding: 18px 12px !important;
    text-align: center !important;
  }
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid .home-module-icon-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    justify-self: center !important;
    align-self: center !important;
    margin: 0 !important;
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
  }
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid .home-module-copy,
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid > .home-module-card:last-child:nth-child(odd) .home-module-copy {
    display: flex !important;
    min-width: 0 !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    align-self: center !important;
    margin: 0 !important;
    text-align: center !important;
  }
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid .home-module-copy strong {
    display: block !important;
    max-width: 100% !important;
    font-size: clamp(13px, 3.65vw, 17px) !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid .home-module-arrow {
    display: none !important;
  }
}

@media (max-width: 375px) {
  html.nzn-liquid-glass-ui .entry-gateway-card { padding: 22px 18px !important; }
  html.nzn-liquid-glass-ui .entry-choice-card { grid-template-columns: 48px minmax(0, 1fr) 18px !important; gap: 10px !important; }
  html.nzn-liquid-glass-ui .entry-choice-icon { width: 48px !important; height: 48px !important; }
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid,
  html.nzn-liquid-glass-ui .cg-dashboard-v2.dashboard-home-page .home-module-grid.master-grid { gap: 10px !important; }
}


/* Canal de contato: link discreto nos termos e formulario em pagina separada. */
.legal-contact-short {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  margin:18px 0;
  border:1px solid rgba(132,145,179,.18);
  border-radius:14px;
  background:rgba(245,248,253,.68);
  color:#68758b;
  font-size:13px;
  line-height:1.4;
}
.legal-contact-short a {
  color:#415fc8;
  font-size:13px;
  font-weight:750;
  text-decoration:underline;
  text-underline-offset:3px;
  white-space:nowrap;
}
.cg-contact-page .cg-contact-card {
  width:min(100%,740px);
  margin-inline:auto;
}
.cg-contact-page .cg-contact-card > section {
  display:block;
  margin-top:18px;
}
.cg-contact-page .cg-contact-card form {
  display:grid;
  gap:14px;
  margin-top:16px;
}
.cg-contact-page .cg-contact-card form .field {
  min-width:0;
}
.cg-contact-page .cg-contact-card input,
.cg-contact-page .cg-contact-card select,
.cg-contact-page .cg-contact-card textarea {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  max-width:100%;
}
.cg-contact-page .cg-contact-card .cg-privacy-track {
  margin-top:20px;
  border-radius:14px;
}
@media(max-width:600px) {
  .legal-contact-short { align-items:flex-start; flex-direction:column; gap:6px; }
  .cg-contact-page .cg-contact-card { padding:22px 18px !important; }
  .cg-contact-page .cg-contact-card form .btn { width:100%; }
}


/* Resultados: 5 colunas reais apos retirar o segundo botao "Ver resultado".
   Evita espaco fantasma reservado para uma sexta coluna no desktop. */
.clean-dashboard-page .results-panel .result-row,
.cg-dashboard-v2 .results-panel .result-row {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1.7fr) 96px 86px minmax(140px, .8fr) !important;
  align-items: center;
}
@media (max-width: 980px) and (min-width: 681px) {
  .clean-dashboard-page .results-panel .result-row,
  .cg-dashboard-v2 .results-panel .result-row {
    grid-template-columns: 44px minmax(0, 1fr) 88px 88px !important;
  }
  .clean-dashboard-page .results-panel .result-row .result-presenter,
  .cg-dashboard-v2 .results-panel .result-row .result-presenter {
    grid-column: 2 / -1;
  }
}
@media (max-width: 680px) {
  .clean-dashboard-page .results-panel .result-row,
  .cg-dashboard-v2 .results-panel .result-row {
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }
  .clean-dashboard-page .results-panel .result-row .result-metric,
  .clean-dashboard-page .results-panel .result-row .result-presenter,
  .cg-dashboard-v2 .results-panel .result-row .result-metric,
  .cg-dashboard-v2 .results-panel .result-row .result-presenter {
    display: none !important;
  }
}
