/*
 * Camada global de responsividade adaptativa.
 * Mantem os layouts desktop/mobile existentes e melhora principalmente a faixa tablet.
 */

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

:where(.admin-main,.admin-content,.page-heading,.page-heading>div,.page-heading__actions,.toolbar,.form-card,.form-grid,.form-field,.section-heading,.content-card,.registration-form-card,.survey-card,.event-dashboard-panel,.attendance-report-card,.dashboard-section,.app-settings-card,.app-screen-card){min-width:0;max-width:100%;}

:where(h1,h2,h3,h4,h5,h6,p,span,strong,small,label,a,td,th){overflow-wrap:anywhere;}

.admin-table-wrap{max-width:100%;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;}
.admin-table{max-width:100%;}

/* Tablet / notebooks compactos: o menu lateral vira gaveta para devolver largura ao conteudo. */
@media(max-width:1180px){
  .admin-shell{grid-template-columns:minmax(0,1fr);}
  .sidebar{position:fixed;left:-280px;top:0;z-index:50;width:260px;height:100dvh;box-shadow:20px 0 50px rgba(0,0,0,.25);transition:left .2s ease;}
  .admin-body.sidebar-open .sidebar{left:0;}
  .icon-button{display:inline-flex;}
  .admin-topbar{padding:0 22px;}
  .admin-main{padding:24px;}
  .page-heading{align-items:flex-start;flex-wrap:wrap;gap:18px;margin-bottom:22px;}
  .page-heading>div:first-child{flex:1 1 440px;min-width:0;}
  .page-heading h1{font-size:clamp(1.8rem,3.3vw,2.1rem);line-height:1.12;}
  .page-heading p{max-width:760px;}
  .page-heading__actions{display:flex;align-items:center;justify-content:flex-start;gap:9px;flex-wrap:wrap;max-width:100%;}
  .toolbar{flex-wrap:wrap;align-items:stretch;}
  .search-box{width:min(100%,560px);}
  .form-card{padding:20px;}
  .admin-table th,.admin-table td{padding:12px 13px;}
}

/* Faixa tablet: melhora densidade e evita componentes espremidos. */
@media(min-width:681px) and (max-width:1100px){
  .container{width:min(calc(100% - 40px),var(--container));}
  .button{min-height:44px;padding:9px 15px;}
  .page-heading .button,.page-heading__actions .button{width:auto;}
  .external-sync-heading form{width:auto;}
  .form-grid{gap:16px;}
  .section-heading{gap:18px;}

  /* Editor de evento / pesquisa */
  .event-overview-grid,
  .form-builder-columns,
  .form-preview-shell,
  .app-two-column,
  .app-settings-grid,
  .roulette-config-grid{grid-template-columns:minmax(0,1fr)!important;}

  .event-overview-grid>.event-overview-main:first-child{padding-right:0!important;}
  .form-card--event-overview .form-sidebar{border-left:0!important;border-top:1px solid #e2e8f0;padding-left:0!important;padding-top:22px;}
  .form-card--event-overview .form-sidebar .button--primary{margin-top:10px;}
  .form-card--sticky,.roulette-live-preview{position:static!important;top:auto!important;}
  .field-palette__grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .rich-editor-image-sizer__controls{grid-template-columns:130px minmax(0,1fr) auto;}

  /* Simulador: nunca ultrapassa a area util do tablet. */
  .simulator-stage{min-height:0;padding:18px;}
  .device-frame--tablet,.device-frame--landscape{max-width:100%;}
  .device-frame--tablet{width:min(768px,100%);height:min(900px,78dvh);}
  .device-frame--landscape{width:min(1024px,100%);height:min(680px,72dvh);}

  /* Publico */
  .site-header__inner{min-height:72px;gap:18px;}
  .brand img{width:min(260px,42vw);max-height:48px;}
  .site-header__cta{min-height:42px;padding:9px 14px;font-size:.86rem;}

  .event-detail-hero__grid,
  .info-grid,
  .registration-grid{grid-template-columns:minmax(0,1fr)!important;}
  .event-detail-hero__image{max-width:680px;}
  .registration-copy{position:static!important;}
  .registration-copy h2{font-size:clamp(1.8rem,4vw,2.15rem);}
  .event-information,.registration-section{padding-block:58px;}

  .privacy-layout{grid-template-columns:minmax(0,1fr)!important;gap:30px;}
  .privacy-nav{position:static!important;top:auto!important;}
  .privacy-nav nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px;}
  .privacy-meta{grid-template-columns:repeat(3,minmax(0,1fr));}

  .survey-card{padding:28px;gap:22px;}
  .survey-fields{gap:18px;}
  .survey-hero{padding:48px 0 36px;}

  .status-event-card{grid-template-columns:minmax(180px,220px) minmax(0,1fr);gap:20px;}
}

/* Tabelas administrativas passam a cards apenas no tablet.
   Mobile continua usando os layouts compactos ja existentes. */
@media(min-width:681px) and (max-width:1100px){
  .admin-table-wrap--responsive{overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none;}

  .responsive-card-table{display:block;width:100%;min-width:0!important;}
  .responsive-card-table thead{display:none;}
  .responsive-card-table tbody{display:grid;gap:14px;}
  .responsive-card-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid #dfe8e1;border-radius:15px;background:#fff;box-shadow:0 5px 18px rgba(15,23,42,.045);}
  .responsive-card-table tbody tr[hidden]{display:none!important;}
  .responsive-card-table tbody tr>td{display:block;min-width:0!important;padding:12px 15px;border:0;border-bottom:1px solid #edf2ee;text-align:left!important;white-space:normal;}
  .responsive-card-table tbody tr>td::before{content:attr(data-label);display:block;margin-bottom:5px;color:#718078;font-size:.67rem;font-weight:850;line-height:1.2;letter-spacing:.05em;text-transform:uppercase;}
  .responsive-card-table tbody tr>td:first-child,
  .responsive-card-table tbody tr>td[data-card-full="true"],
  .responsive-card-table tbody tr>td.table-actions{grid-column:1/-1;}
  .responsive-card-table tbody tr>td:first-child{padding-top:15px;background:#fbfdfb;}
  .responsive-card-table tbody tr>td.table-actions{display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:11px 14px;border-bottom:0;background:#fbfdfb;white-space:normal;}
  .responsive-card-table tbody tr>td.table-actions::before{display:none;}
  .responsive-card-table tbody tr>td.table-actions form{display:flex;margin:0;}
  .responsive-card-table .icon-action{margin:0;width:38px;height:38px;flex:0 0 38px;}
  .responsive-card-table .survey-response-answers{min-width:0;max-width:100%;}
  .responsive-card-table .survey-response-suggestion{line-height:1.5;}
  .responsive-card-table .external-sync-error{max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;}
  .responsive-card-table .attendance-interest{max-width:none;}

  /* Participacao: cards mais informativos no tablet; mobile segue com Nome + Situacao. */
  .responsive-card-table--attendance tbody tr>td:first-child{grid-column:1/-1;}
  .responsive-card-table--attendance tbody tr>td:nth-child(5){grid-column:1/-1;}
  .responsive-card-table--attendance tbody tr>td:nth-child(6),
  .responsive-card-table--attendance tbody tr>td:nth-child(7){background:#fbfdfb;border-bottom:0;}
}

/* Ajustes de densidade especificos para tablet. */
@media(min-width:681px) and (max-width:980px){
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
  .registration-summary,.external-sync-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  .registration-summary>div:last-child:nth-child(odd){grid-column:1/-1;}
  .attendance-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
  .attendance-metrics--secondary{grid-template-columns:repeat(3,minmax(0,1fr));}
  .attendance-source-summary{grid-template-columns:1fr;}
  .attendance-history-item{grid-template-columns:1fr;gap:4px;}
  .event-dashboard-charts{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"interaction" "participation" "segments" "interests"!important;}
  .event-dashboard-panel--interaction,.event-dashboard-panel--segments,.event-dashboard-panel--interests,.event-dashboard-participation-cards{grid-column:auto!important;}
  .event-dashboard-summary,.event-dashboard-summary--admin{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .event-dashboard-summary--admin .event-metric-card:last-child:nth-child(odd){grid-column:1/-1;}
}

/* Tablet estreito: acoes e cabecalhos quebram de forma previsivel sem virar mobile. */
@media(min-width:681px) and (max-width:820px){
  .admin-main{padding:20px;}
  .admin-topbar{padding:0 18px;}
  .page-heading>div:first-child{flex-basis:100%;}
  .page-heading__actions{width:100%;}
  .page-heading__actions .button{flex:1 1 190px;}
  .toolbar>.search-box{width:100%;}
  .form-card{padding:18px;}
  .field-palette__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .event-dashboard-summary,.event-dashboard-summary--admin{grid-template-columns:minmax(0,1fr)!important;}
  .privacy-meta{grid-template-columns:minmax(0,1fr);}
}

/* Mobile: somente salvaguardas globais, preservando o visual ja aprovado. */
@media(max-width:680px){
  .admin-main{width:100%;max-width:100%;}
  .admin-topbar{padding-inline:16px;}
  .page-heading,.toolbar,.page-heading__actions{max-width:100%;}
  .page-heading__actions{min-width:0;}
  .form-card,.dashboard-section,.event-dashboard-panel,.attendance-report-card{max-width:100%;}
  input,select,textarea,button{max-width:100%;}
}

/* Kiosk/aplicativo: escala intermediaria para tablets sem afetar a composicao mobile. */
@media(min-width:761px) and (max-width:1100px){
  .virtual-app__brand{padding:18px 20px 6px;}
  .virtual-app__brand img{width:min(170px,26vw);}
  .app-screen{padding:22px clamp(22px,4vw,38px) 34px;}
  .app-screen__inner{width:min(700px,100%);}
  .app-registration-form{padding:24px;}
  .app-form-grid{gap:14px;}
  .roulette-wrap{width:min(370px,52vw);}
}

/* Mobile universal: todas as tabelas administrativas viram cards completos.
   A camada JS adiciona data-label automaticamente a partir do cabecalho, inclusive em tabelas futuras. */
@media(max-width:680px){
  .admin-table-wrap--responsive{overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;}
  .responsive-card-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;}
  .responsive-card-table thead{display:none!important;}
  .responsive-card-table tbody{display:grid!important;gap:12px!important;width:100%;}
  .responsive-card-table tbody tr{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%;overflow:hidden;border:1px solid #dfe8e1;border-radius:14px;background:#fff;box-shadow:0 4px 16px rgba(15,23,42,.045);}
  .responsive-card-table tbody tr[hidden]{display:none!important;}
  .responsive-card-table tbody tr>td{display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:11px 13px!important;border:0!important;border-bottom:1px solid #edf2ee!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere;}
  .responsive-card-table tbody tr>td::before{content:attr(data-label);display:block;margin:0 0 5px;color:#718078;font-size:.64rem;font-weight:850;line-height:1.2;letter-spacing:.055em;text-transform:uppercase;}
  .responsive-card-table tbody tr>td:first-child{padding-top:14px!important;background:#fbfdfb;}
  .responsive-card-table tbody tr>td:last-child{border-bottom:0!important;}
  .responsive-card-table tbody tr>td.table-actions{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;flex-wrap:wrap;padding:10px 12px!important;background:#fbfdfb;}
  .responsive-card-table tbody tr>td.table-actions::before{display:none!important;}
  .responsive-card-table tbody tr>td.table-actions form{display:flex;margin:0;}
  .responsive-card-table tbody tr>td[colspan]{display:block!important;padding:0!important;border:0!important;background:transparent!important;}
  .responsive-card-table tbody tr>td[colspan]::before{display:none!important;}
  .responsive-card-table .empty-table{padding:26px 14px!important;font-size:.84rem;}
  .responsive-card-table .icon-action{width:38px;height:38px;min-height:38px;margin:0!important;flex:0 0 38px;}
  .responsive-card-table details{max-width:100%;}
  .responsive-card-table summary{cursor:pointer;}
  .responsive-card-table .survey-response-answers{display:grid;gap:9px;min-width:0;max-width:100%;}
  .responsive-card-table .survey-response-answers>div{min-width:0;}
  .responsive-card-table .survey-response-answers span{white-space:normal;overflow-wrap:anywhere;}
  .responsive-card-table .external-sync-error,.responsive-card-table .attendance-interest{max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}

  /* Participantes: remove o modo antigo Nome + Situacao e exibe todo o registro no card. */
  .attendance-table th,.attendance-table td,
  .attendance-table th:nth-child(1),.attendance-table td:nth-child(1),
  .attendance-table th:nth-child(2),.attendance-table td:nth-child(2),
  .attendance-table th:nth-child(3),.attendance-table td:nth-child(3),
  .attendance-table th:nth-child(4),.attendance-table td:nth-child(4),
  .attendance-table th:nth-child(5),.attendance-table td:nth-child(5),
  .attendance-table th:nth-child(6),.attendance-table td:nth-child(6),
  .attendance-table th:nth-child(7),.attendance-table td:nth-child(7){display:block!important;width:auto!important;text-align:left!important;}
  .attendance-table td:nth-child(1) small{display:block!important;}
  .attendance-table .attendance-status{display:inline-flex!important;max-width:100%;white-space:normal;text-align:left;}

  /* Lista de eventos: mantem os quatro atalhos em grade dentro do card. */
  .responsive-card-table .event-card__identity{grid-column:1/-1;}
  .responsive-card-table .event-card__actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important;}
  .responsive-card-table .event-card__primary-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%;}
  .responsive-card-table .event-card__actions .event-list-action{display:inline-flex!important;width:100%!important;min-width:0;height:40px;min-height:40px;margin:0!important;padding:0 8px!important;justify-content:center;}
  .responsive-card-table .event-card__actions .event-list-action span{display:inline!important;}
  .responsive-card-table .event-card__secondary-actions{display:flex!important;justify-content:flex-start!important;gap:7px!important;width:100%;padding-top:8px;border-top:1px solid #e8efea;}
}

@media(max-width:390px){
  .responsive-card-table .event-card__primary-actions{grid-template-columns:minmax(0,1fr)!important;}
}

/* --------------------------------------------------------------------------
   Respostas da pesquisa: ajuste fino de colunas e breakpoints criticos.
   Evita que Sugestao (230px) + Respostas (280px) comprimam a tabela.
   -------------------------------------------------------------------------- */
.survey-responses-page{min-width:0;max-width:100%;}
.survey-responses-page .admin-table-wrap{max-width:100%;}
.survey-responses-table{width:100%;}
.survey-responses-table .survey-response-suggestion{min-width:0;max-width:none;}
.survey-responses-table .survey-response-details,
.survey-responses-table .survey-response-answers{min-width:0;max-width:100%;}
.survey-responses-table .survey-response-answers>div{min-width:0;}
.survey-responses-table .survey-response-answers strong,
.survey-responses-table .survey-response-answers span{overflow-wrap:anywhere;word-break:normal;}
.survey-responses-table .survey-col-cpf{white-space:nowrap;}
.survey-responses-table .survey-col-actions{white-space:nowrap;}

/* Desktop compacto / notebooks: mantem tabela, mas distribui a largura de forma realista. */
@media(min-width:1181px) and (max-width:1586px){
  .survey-responses-page .survey-responses-heading{align-items:flex-end;gap:18px;}
  .survey-responses-page .survey-responses-heading>div:first-child{min-width:0;flex:1 1 auto;}
  .survey-responses-page .survey-responses-heading .page-heading__actions{flex:0 0 auto;}

  .survey-responses-page .admin-table-wrap--responsive{overflow-x:hidden;}
  .survey-responses-table{table-layout:fixed;min-width:0!important;}
  .survey-responses-table th,
  .survey-responses-table td{min-width:0!important;padding:12px 10px;vertical-align:top;}
  .survey-responses-table th{font-size:.7rem;}
  .survey-responses-table td{font-size:.86rem;line-height:1.42;}
  .survey-responses-table td>strong{line-height:1.35;}
  .survey-responses-table td>small{line-height:1.35;}
  .survey-responses-table .survey-response-details summary{white-space:normal;line-height:1.35;}
  .survey-responses-table .survey-response-answers{gap:8px;margin-top:10px;}
  .survey-responses-table .survey-response-answers>div{padding-bottom:7px;}

  .survey-responses-table--admin .survey-col-participant{width:21%;}
  .survey-responses-table--admin .survey-col-cpf{width:12%;}
  .survey-responses-table--admin .survey-col-date{width:14%;}
  .survey-responses-table--admin .survey-col-suggestion{width:25%;}
  .survey-responses-table--admin .survey-col-answers{width:20%;}
  .survey-responses-table--admin .survey-col-actions{width:8%;}

  .survey-responses-table--manager .survey-col-participant{width:22%;}
  .survey-responses-table--manager .survey-col-cpf{width:13%;}
  .survey-responses-table--manager .survey-col-date{width:15%;}
  .survey-responses-table--manager .survey-col-suggestion{width:27%;}
  .survey-responses-table--manager .survey-col-answers{width:23%;}
}

/* Na ponta inferior do desktop compacto, economiza alguns pixels sem perder legibilidade. */
@media(min-width:1181px) and (max-width:1280px){
  .survey-responses-table th,
  .survey-responses-table td{padding-left:8px;padding-right:8px;}
  .survey-responses-table td{font-size:.82rem;}
  .survey-responses-table th{font-size:.66rem;letter-spacing:.04em;}
  .survey-responses-table .survey-col-date{font-size:.79rem;}
}

/* Tablet 821-980: cards em duas colunas para metadados e blocos largos para conteudo. */
@media(min-width:821px) and (max-width:980px){
  .survey-responses-page .survey-responses-heading{width:100%;gap:16px;}
  .survey-responses-page .survey-responses-heading>div:first-child{width:100%;}
  .survey-responses-page .survey-responses-heading .page-heading__actions{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .survey-responses-page .survey-responses-heading .page-heading__actions .button{width:100%;min-width:0;justify-content:center;}

  .survey-responses-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr));}
  .survey-responses-table tbody tr>td.survey-col-participant,
  .survey-responses-table tbody tr>td.survey-col-suggestion,
  .survey-responses-table tbody tr>td.survey-col-answers,
  .survey-responses-table tbody tr>td.survey-col-actions{grid-column:1/-1;}
  .survey-responses-table tbody tr>td.survey-col-cpf,
  .survey-responses-table tbody tr>td.survey-col-date{grid-column:auto;}
  .survey-responses-table .survey-col-cpf{white-space:normal;}
  .survey-responses-table .survey-response-answers{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;}
  .survey-responses-table .survey-response-answers>div{padding:9px 10px;border:1px solid #e8efea;border-radius:10px;background:#fbfdfb;}
  .survey-responses-table .survey-response-answers>div:last-child{border-bottom:1px solid #e8efea;}
}

/* Mobile <=680: card compacto; CPF e data dividem linha quando houver espaco. */
@media(max-width:680px){
  .survey-responses-page .survey-responses-heading{gap:14px;margin-bottom:18px;}
  .survey-responses-page .survey-responses-heading>div:first-child{width:100%;}
  .survey-responses-page .survey-responses-heading .page-heading__actions{display:grid!important;width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .survey-responses-page .survey-responses-heading .page-heading__actions .button{width:100%!important;min-width:0;min-height:42px;padding-inline:10px;justify-content:center;font-size:.8rem;}

  .survey-responses-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .survey-responses-table tbody tr>td.survey-col-participant,
  .survey-responses-table tbody tr>td.survey-col-suggestion,
  .survey-responses-table tbody tr>td.survey-col-answers,
  .survey-responses-table tbody tr>td.survey-col-actions,
  .survey-responses-table tbody tr>td[colspan]{grid-column:1/-1!important;}
  .survey-responses-table tbody tr>td.survey-col-cpf,
  .survey-responses-table tbody tr>td.survey-col-date{grid-column:auto!important;}
  .survey-responses-table .survey-col-cpf{white-space:normal;}
  .survey-responses-table .survey-response-suggestion{font-size:.88rem;line-height:1.5;}
  .survey-responses-table .survey-response-details summary{display:inline-flex;align-items:center;min-height:34px;}
  .survey-responses-table .survey-response-answers{grid-template-columns:minmax(0,1fr)!important;gap:8px!important;margin-top:8px;}
  .survey-responses-table .survey-response-answers>div{padding:9px 10px;border:1px solid #e8efea!important;border-radius:9px;background:#fbfdfb;}
  .survey-responses-table .survey-response-answers>div:last-child{border-bottom:1px solid #e8efea!important;}
}

/* Telefones estreitos: volta CPF/Data e acoes para uma unica coluna. */
@media(max-width:430px){
  .survey-responses-page .survey-responses-heading .page-heading__actions{grid-template-columns:minmax(0,1fr);}
  .survey-responses-table tbody tr{grid-template-columns:minmax(0,1fr)!important;}
  .survey-responses-table tbody tr>td.survey-col-cpf,
  .survey-responses-table tbody tr>td.survey-col-date{grid-column:1/-1!important;}
}

/* --------------------------------------------------------------------------
   Datas em tabelas: nunca quebrar dia/mes/ano ou data + horario.
   A classe e aplicada automaticamente pelo admin-base.js a colunas atuais e futuras.
   -------------------------------------------------------------------------- */
.admin-table th.table-date-column,
.admin-table td.table-date-cell,
.admin-table td[data-label="Data"],
.admin-table td[data-label^="Data "],
.admin-table td[data-label="Último envio"],
.survey-responses-table .survey-col-date,
.event-card__date{
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
  hyphens:none!important;
}

/* Em cards, o rotulo pode quebrar normalmente, mas o valor da data permanece inteiro. */
.responsive-card-table tbody tr>td.table-date-cell::before,
.responsive-card-table tbody tr>td[data-label="Data"]::before,
.responsive-card-table tbody tr>td[data-label^="Data "]::before,
.responsive-card-table tbody tr>td[data-label="Último envio"]::before{
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

/* --------------------------------------------------------------------------
   CPF, telefone e sequencias numericas estruturadas: nunca quebrar no meio.
   As classes sao aplicadas automaticamente pelo admin-base.js e podem ser
   usadas diretamente fora de tabelas por meio de .numeric-sequence.
   -------------------------------------------------------------------------- */
.numeric-sequence,
.admin-table th.table-structured-number-column,
.admin-table td.table-structured-number-cell,
.admin-table td[data-label="CPF"],
.admin-table td[data-label="CNPJ"],
.admin-table td[data-label="Telefone"],
.admin-table td[data-label="Telefone / WhatsApp"],
.admin-table td[data-label="WhatsApp"],
.admin-table td[data-label="Celular"],
.survey-responses-table .survey-col-cpf{
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
  hyphens:none!important;
}

/* No modo card, somente o valor numerico fica sem quebra; o rotulo pode quebrar. */
.responsive-card-table tbody tr>td.table-structured-number-cell::before,
.responsive-card-table tbody tr>td[data-label="CPF"]::before,
.responsive-card-table tbody tr>td[data-label="CNPJ"]::before,
.responsive-card-table tbody tr>td[data-label="Telefone"]::before,
.responsive-card-table tbody tr>td[data-label="Telefone / WhatsApp"]::before,
.responsive-card-table tbody tr>td[data-label="WhatsApp"]::before,
.responsive-card-table tbody tr>td[data-label="Celular"]::before{
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

/* --------------------------------------------------------------------------
   Respostas da pesquisa: telas grandes e integridade das palavras.
   Regra permanente: nesta tabela nenhuma palavra pode ser fragmentada.
   O conteudo quebra apenas nos espacos naturais e as linhas crescem em altura.
   -------------------------------------------------------------------------- */
.survey-responses-table th,
.survey-responses-table td,
.survey-responses-table td *,
.survey-responses-table .survey-response-suggestion,
.survey-responses-table .survey-response-details,
.survey-responses-table .survey-response-details summary,
.survey-responses-table .survey-response-answers,
.survey-responses-table .survey-response-answers > div,
.survey-responses-table .survey-response-answers strong,
.survey-responses-table .survey-response-answers span{
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}

.survey-responses-table th{
  white-space:nowrap;
}

.survey-responses-table td{
  white-space:normal;
}

.survey-responses-table .survey-col-cpf,
.survey-responses-table .survey-col-date,
.survey-responses-table .survey-col-actions{
  white-space:nowrap!important;
}

/* Desktop amplo >= 1584px: usa o espaco extra para priorizar textos longos. */
@media(min-width:1584px){
  .survey-responses-page .admin-table-wrap--responsive{
    overflow-x:hidden;
  }

  .survey-responses-table{
    width:100%;
    min-width:0!important;
    table-layout:fixed;
  }

  .survey-responses-table th,
  .survey-responses-table td{
    min-width:0!important;
    padding:14px 12px;
    vertical-align:top;
  }

  .survey-responses-table td{
    font-size:.88rem;
    line-height:1.5;
  }

  .survey-responses-table th{
    font-size:.72rem;
    letter-spacing:.045em;
  }

  .survey-responses-table .survey-response-suggestion{
    max-width:none;
    line-height:1.5;
  }

  .survey-responses-table .survey-response-details summary{
    line-height:1.4;
  }

  .survey-responses-table .survey-response-answers{
    min-width:0;
    gap:9px;
    margin-top:10px;
  }

  /* Admin possui a coluna adicional de acoes. */
  .survey-responses-table--admin .survey-col-participant{width:18%;}
  .survey-responses-table--admin .survey-col-cpf{width:10%;}
  .survey-responses-table--admin .survey-col-date{width:12%;}
  .survey-responses-table--admin .survey-col-suggestion{width:31%;}
  .survey-responses-table--admin .survey-col-answers{width:22%;}
  .survey-responses-table--admin .survey-col-actions{width:7%;}

  /* Manager nao possui Acoes; o espaco e redistribuido para conteudo. */
  .survey-responses-table--manager .survey-col-participant{width:19%;}
  .survey-responses-table--manager .survey-col-cpf{width:11%;}
  .survey-responses-table--manager .survey-col-date{width:13%;}
  .survey-responses-table--manager .survey-col-suggestion{width:31%;}
  .survey-responses-table--manager .survey-col-answers{width:26%;}
}

/* Cards: mantem a mesma regra de nao fragmentar palavras em tablet/mobile. */
@media(max-width:980px){
  .survey-responses-table tbody tr > td,
  .survey-responses-table tbody tr > td *,
  .survey-responses-table .survey-response-answers span,
  .survey-responses-table .survey-response-answers strong,
  .survey-responses-table .survey-response-suggestion{
    word-break:normal!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
  }
}

/* --------------------------------------------------------------------------
   Mobile admin: fluxo vertical do cabecalho sem altura fantasma.
   Em <=980px o admin-base muda .page-heading para flex-direction:column.
   O flex-basis de 440px usado no desktop passava a ser altura no eixo vertical,
   empurrando toolbars, acoes e cards para baixo. Em layouts em coluna, o bloco
   de texto deve voltar a ter altura baseada somente no conteudo.
   -------------------------------------------------------------------------- */
@media(max-width:980px){
  .page-heading{
    min-height:0!important;
    height:auto!important;
    align-content:normal!important;
  }

  .page-heading>div:first-child{
    flex:0 1 auto!important;
    flex-basis:auto!important;
    width:100%;
    min-height:0!important;
    height:auto!important;
  }
}

@media(max-width:680px){
  .admin-main{
    display:block;
  }

  .page-heading{
    gap:14px;
    margin-bottom:18px;
  }

  .page-heading>div:first-child{
    margin:0;
  }

  /* Mantem o fluxo visual natural: cabecalho -> acoes/filtros -> conteudo. */
  .page-heading + .toolbar,
  .page-heading + .attendance-config-warning,
  .page-heading + .attendance-source-summary,
  .page-heading + .attendance-metrics,
  .page-heading + .event-dashboard-summary{
    margin-top:0!important;
  }
}
