/* FINDB STÚDIO — CP392-R1
   Central de Empresas — padronização visual mobile sobre CP391-R1.
   Exclusivamente CSS: sem DOM, JS, contratos, dados ou regras alterados.
   Escopo: .app-shell.context-businesses .businesses-admin e #businessForm.
   A composição funcional dos controles e os destinos permanecem intactos.
*/
@media screen and (max-width:780px) {
  /* Tokens tipográficos e espaciais ÚNICOS em todas as telas do Business Core. */
  .app-shell.context-businesses .businesses-admin,
  #businessModal:has(#businessForm) {
    --biz-type-eyebrow: 9px;
    --biz-type-caption: 10px;
    --biz-type-description: 11px;
    --biz-type-label: 11px;
    --biz-type-card-title: 12.5px;
    --biz-type-section: 14.5px;
    --biz-type-page: 19px;
    --biz-weight-description: 400;
    --biz-weight-label: 500;
    --biz-weight-heading: 600;
    --biz-leading-description: 1.55;
    --biz-space-1: 4px;
    --biz-space-2: 8px;
    --biz-space-3: 12px;
    --biz-space-4: 16px;
    --biz-muted-unified: #a0a6b4;
    font-family: Sora, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  /* Padrão de leitura comum: todo texto descritivo usa peso leve. */
  .app-shell.context-businesses .businesses-admin p,
  #businessForm p {
    font-size: var(--biz-type-description);
    font-weight: var(--biz-weight-description);
    line-height: var(--biz-leading-description);
    overflow-wrap: break-word;
  }
  .app-shell.context-businesses .businesses-admin small,
  #businessForm small {
    font-weight: var(--biz-weight-description);
    line-height: 1.45;
  }

  /* Cabeçalhos e hierarquia de TODA a Central de Empresas. */
  .app-shell.context-businesses .businesses-admin .page-heading h1 {
    font-size: var(--biz-type-page);
    font-weight: var(--biz-weight-heading);
    line-height: 1.26;
    letter-spacing: -.018em;
  }
  .app-shell.context-businesses .businesses-admin :is(
    .business-core-section .panel-head h2,
    .business-core-hero-copy h2,
    .business-campaign-gateway-head strong
  ) {
    font-size: var(--biz-type-section);
    font-weight: var(--biz-weight-heading);
    line-height: 1.35;
    letter-spacing: -.012em;
  }
  .app-shell.context-businesses .businesses-admin :is(
    .business-core-unit-head strong,
    .business-core-platform strong,
    .business-core-platform-head strong,
    .business-core-campaign-head strong,
    .business-commercial-classification strong,
    .business-core-principle strong
  ) {
    font-size: var(--biz-type-card-title);
    font-weight: var(--biz-weight-heading);
    line-height: 1.4;
    letter-spacing: -.006em;
  }
  .app-shell.context-businesses .businesses-admin :is(
    .page-heading p,
    .business-core-section .panel-head p,
    .business-core-hero-copy p,
    .business-core-unit p,
    .business-core-platform p,
    .business-core-platform-large > p,
    .business-core-platform-note,
    .business-core-principle p,
    .business-campaign-gateway-head p,
    .business-commercial-profile .panel-head p,
    .business-commercial-classification small,
    .business-commercial-offerings small,
    .business-core-unit small,
    .business-core-platform small,
    .business-core-campaign-head small
  ) {
    font-size: var(--biz-type-description);
    font-weight: var(--biz-weight-description);
    line-height: var(--biz-leading-description);
    letter-spacing: 0;
    color: var(--biz-muted-unified);
    overflow-wrap: break-word;
  }
  .app-shell.context-businesses .businesses-admin :is(
    .eyebrow,
    .business-core-summary span,
    .business-summary span,
    .business-core-kpis span,
    .business-core-platform-kpis span,
    .business-core-platform-head > div > span,
    .business-core-campaign-head span:first-child,
    .business-commercial-classification article > span,
    .business-commercial-offerings article > span
  ) {
    font-size: var(--biz-type-eyebrow);
    font-weight: var(--biz-weight-label);
    letter-spacing: .055em;
    line-height: 1.4;
  }
  .app-shell.context-businesses .businesses-admin :is(
    .business-core-summary small,
    .business-core-platform-kpis small,
    .business-core-kpis small,
    .business-core-unit-meta span,
    .business-core-platform-note small
  ) {
    font-size: var(--biz-type-caption);
    font-weight: var(--biz-weight-description);
    line-height: 1.45;
  }
  .app-shell.context-businesses .businesses-admin :is(
    .primary-btn,.secondary-btn,.compact,.business-filters button,
    .business-core-state,.business-state
  ) {
    font-weight: var(--biz-weight-label);
    letter-spacing: 0;
  }

  /* Lista: cabeçalho permanece junto à marca, porém badges, meta e ações
     ocupam a largura total ABAIXO da marca, sem coluna morta. */
  .app-shell.context-businesses .business-card {
    grid-template-columns: 44px minmax(0,1fr);
    column-gap: 9px;
    row-gap: 8px;
    padding: 11px;
    align-items: start;
    min-width: 0;
  }
  .app-shell.context-businesses .business-logo {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }
  .app-shell.context-businesses .business-main { display: contents; }
  .app-shell.context-businesses .business-title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    align-items: start;
    min-width: 0;
    gap: 6px;
  }
  .app-shell.context-businesses .business-title strong {
    font-size: var(--biz-type-card-title);
    font-weight: var(--biz-weight-heading);
    line-height: 1.35;
  }
  .app-shell.context-businesses .business-title small {
    font-size: var(--biz-type-caption);
    font-weight: var(--biz-weight-description);
    line-height: 1.4;
  }
  .app-shell.context-businesses .business-products {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 2px 0 0;
    align-items: center;
    min-width: 0;
    gap: 5px;
  }
  .app-shell.context-businesses .business-meta {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
    min-width: 0;
    gap: 3px 7px;
  }
  .app-shell.context-businesses .business-meta span {
    font-size: var(--biz-type-caption);
    font-weight: var(--biz-weight-description);
    line-height: 1.45;
  }
  .app-shell.context-businesses .business-products span {
    font-size: var(--biz-type-caption);
    font-weight: var(--biz-weight-label);
    line-height: 1.3;
  }
  .app-shell.context-businesses .business-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    display: grid;
    grid-template-columns: minmax(0,1.3fr) minmax(0,.85fr) minmax(0,.85fr) 44px;
    gap: 5px;
    width: 100%;
    min-width: 0;
    margin-top: 2px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: nowrap;
  }
  .app-shell.context-businesses .business-actions :is(.compact,.icon-btn) {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 5px 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    font-size: 10.2px;
    font-weight: var(--biz-weight-label);
    line-height: 1.2;
  }
  .app-shell.context-businesses .business-actions .business-more {
    min-width: 44px;
    width: 44px;
    font-size: 13px;
    letter-spacing: -.02em;
  }
  .app-shell.context-businesses .business-summary strong,
  .app-shell.context-businesses .business-core-summary strong,
  .app-shell.context-businesses .business-core-kpis strong,
  .app-shell.context-businesses .business-core-platform-kpis strong {
    font-weight: var(--biz-weight-heading);
  }

  /* Workspace 360°: ritmo único e leitura suave em blocos descritivos. */
  .app-shell.context-businesses .business-core-section,
  .app-shell.context-businesses .business-campaign-gateway {
    padding: var(--biz-space-3);
  }
  .app-shell.context-businesses .business-core-section .panel-head {
    display: grid;
    gap: var(--biz-space-1);
  }
  .app-shell.context-businesses .business-core-section .panel-head h2 { margin: 2px 0 0; }
  .app-shell.context-businesses .business-core-section .panel-head p { margin-top: 5px; }
  .app-shell.context-businesses :is(
    .business-core-platform-large,
    .business-core-unit,
    .business-core-campaign,
    .business-campaign-gateway,
    .business-commercial-profile
  ) { min-width: 0; }
  .app-shell.context-businesses .business-core-platform-large { gap: var(--biz-space-2); }
  .app-shell.context-businesses .business-core-platform-large > p { margin: 4px 0 5px; }
  .app-shell.context-businesses .business-core-platform-actions { margin-top: 7px; }
  .app-shell.context-businesses .business-campaign-gateway-head > div { gap: 5px; }
  .app-shell.context-businesses .business-campaign-gateway-head p { margin-top: 7px; }
  .app-shell.context-businesses .business-core-platform-kpis { margin-top: var(--biz-space-2); }
  .app-shell.context-businesses .business-core-state {
    font-size: var(--biz-type-eyebrow);
    font-weight: var(--biz-weight-label);
  }
  .app-shell.context-businesses .business-commercial-classification article,
  .app-shell.context-businesses .business-commercial-offerings article { min-width: 0; }
  .app-shell.context-businesses .business-commercial-offerings b { font-weight: var(--biz-weight-label); }

  /* O aviso informativo verde: ícone+título na primeira linha,
     texto corrido em 100% da largura na linha seguinte. */
  .app-shell.context-businesses .business-core-principle {
    grid-template-columns: 27px minmax(0,1fr);
    gap: 0 9px;
    align-items: center;
    padding: 12px;
    min-width: 0;
  }
  .app-shell.context-businesses .business-core-principle > span {
    grid-column: 1;
    grid-row: 1;
    width: 27px;
    height: 27px;
    font-size: 12px;
    font-weight: var(--biz-weight-heading);
  }
  .app-shell.context-businesses .business-core-principle > div { display: contents; }
  .app-shell.context-businesses .business-core-principle > div > strong {
    grid-column: 2;
    grid-row: 1;
    font-size: 11.7px;
    font-weight: var(--biz-weight-heading);
    line-height: 1.4;
    min-width: 0;
  }
  .app-shell.context-businesses .business-core-principle > div > p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 9px 0 0;
    font-size: var(--biz-type-description);
    line-height: var(--biz-leading-description);
    font-weight: var(--biz-weight-description);
  }

  /* Formulário: o modal fica fora de .app-shell, por isso recebe escopo próprio.
     Mesmo sistema tipográfico, sem mudar widgets nem seu DOM. */
  #businessModal:has(#businessForm) .business-modal > header h2 {
    font-size: var(--biz-type-section);
    font-weight: var(--biz-weight-heading);
    line-height: 1.3;
  }
  #businessModal:has(#businessForm) .business-modal > header p,
  #businessForm :is(
    .field-help,
    .business-official-channels-head p,
    .business-social-channels-head small,
    .business-taxonomy-editor-head p,
    .business-taxonomy-note,
    .business-taxonomy-safety p,
    .business-logo-editor-copy small,
    .business-offering-selector-grid small
  ) {
    font-size: var(--biz-type-description);
    font-weight: var(--biz-weight-description);
    line-height: var(--biz-leading-description);
    letter-spacing: 0;
    color: var(--biz-muted-unified);
  }
  #businessForm :is(
    .business-official-channels-head h3,
    .business-taxonomy-editor-head h3
  ) {
    font-size: var(--biz-type-section);
    font-weight: var(--biz-weight-heading);
    line-height: 1.35;
    letter-spacing: -.012em;
  }
  #businessForm :is(
    .business-form-grid .field > span,
    .business-official-field > span,
    .business-social-channels-head strong,
    .business-social-channel-badge strong,
    .business-logo-editor-copy strong
  ) {
    font-size: var(--biz-type-label);
    font-weight: var(--biz-weight-label);
    line-height: 1.4;
    letter-spacing: 0;
  }
  #businessForm :is(
    .business-official-channels-head .eyebrow,
    .business-taxonomy-editor-head .eyebrow,
    .business-taxonomy-select small,
    .business-taxonomy-core-badge
  ) { font-size: var(--biz-type-eyebrow); font-weight: var(--biz-weight-label); }
  #businessForm :is(
    .business-taxonomy-select strong,
    .business-social-channel-badge small,
    .business-taxonomy-editor .business-offering-selector-grid strong
  ) { font-weight: var(--biz-weight-label); }
  #businessForm .business-taxonomy-select strong { font-size: 11.5px !important; }
  #businessForm .business-taxonomy-select small { font-size: var(--biz-type-eyebrow) !important; }
  #businessForm .business-taxonomy-editor-head { margin-bottom: var(--biz-space-3); }
  #businessForm .business-taxonomy-editor-head h3 { margin: 3px 0 6px; }
  #businessForm .business-taxonomy-editor-head p { margin: 0 0 7px; }
  #businessForm .business-official-channels-head h3 { margin: 3px 0 7px; }
  #businessForm .business-official-channels-head p { margin: 0 0 8px; }
  #businessForm .business-social-channels-head small { margin-top: 3px; }
  #businessForm .business-social-channels-head { margin-top: var(--biz-space-4); }
  #businessForm .business-social-channel-row { gap: var(--biz-space-2); }
  #businessForm .business-social-channel-input input {
    font-weight: var(--biz-weight-description);
    font-size: 12.5px;
  }
  #businessForm :is(
    .business-official-field > input,
    .business-phone-control input[data-phone-input],
    .business-form-grid .field input,
    .business-form-grid .field select,
    .business-city-button
  ) { font-weight: var(--biz-weight-description); font-size: 13px; }
  #businessForm :is(
    .business-social-channels-head .secondary-btn,
    .business-logo-editor-copy .secondary-btn,
    .business-modal-actions .secondary-btn,
    .business-modal-actions .primary-btn
  ) { font-weight: var(--biz-weight-label); }
}

/* CP392-R1: área de toque mantém 44px mesmo em telas estreitas. */
@media screen and (max-width:359px) {
  .app-shell.context-businesses .business-card {
    grid-template-columns: 40px minmax(0,1fr);
    padding: 10px;
  }
  .app-shell.context-businesses .business-logo { width: 40px; height: 40px; }
  .app-shell.context-businesses .business-actions { column-gap: 4px; }
  .app-shell.context-businesses .business-actions :is(.compact,.icon-btn) { font-size: 9.8px; padding-inline: 3px; }
  .app-shell.context-businesses .business-actions .business-more { font-size: 12px; }
}
