/* UsynAI layout integrity layer. Loaded last. */

body.usynai-brand {
  overflow-wrap: normal;
  word-break: normal;
}

body.usynai-brand :is(
  p,
  small,
  span,
  strong,
  b,
  em,
  label,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  th,
  td,
  summary,
  button,
  a
) {
  word-break: normal;
  overflow-wrap: break-word;
}

body.usynai-brand :is(
  .app-main,
  .topbar,
  .topbar-copy,
  .dashboard,
  .panel,
  .business-profile-view,
  .business-profile-shell,
  .business-profile-form,
  .marketplace-settings,
  .marketplace-settings-grid,
  .marketplace-settings-card,
  .account-contact-settings,
  .account-contact-form,
  .admin-view,
  .admin-layout,
  .admin-section,
  .admin-user-card,
  .products-view,
  .products-toolbar,
  .profitability-view,
  .profitability-toolbar,
  .supplier-view,
  .assistant-layout,
  .assistant-main,
  .assistant-side,
  .ntin-view
) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.usynai-brand :is(
  .settings-section-head,
  .panel-header,
  .profile-form-head,
  .profile-section-title,
  .tariff-source-card,
  .marketplace-card-head,
  .admin-toolbar,
  .admin-cabinet-toolbar,
  .admin-section-head,
  .supplier-card-main,
  .products-head,
  .profitability-head,
  .assistant-head,
  .account-contact-actions
) > * {
  min-width: 0;
  max-width: 100%;
}

body.usynai-brand .account-contact-form {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

body.usynai-brand .account-contact-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
}

body.usynai-brand .account-contact-actions .settings-help {
  min-width: 0;
  max-width: 680px;
  width: 100%;
  margin: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

body.usynai-brand .account-contact-save {
  justify-self: end;
  white-space: nowrap;
}

body.usynai-brand :is(
  .settings-section-head,
  .profile-form-head,
  .profile-section-title,
  .tariff-source-card,
  .marketplace-card-head,
  .admin-toolbar,
  .admin-cabinet-toolbar,
  .admin-section-head,
  .products-toolbar,
  .profitability-toolbar,
  .supplier-card-actions,
  .assistant-composer
) {
  flex-wrap: wrap;
}

body.usynai-brand :is(
  .settings-account-email,
  .workspace-card small,
  .admin-user-card-head small,
  .admin-cabinet-facts strong,
  .product-cell small,
  .supplier-contact-links a,
  .supplier-contact-links span
) {
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  body.usynai-brand .account-contact-form {
    grid-template-columns: 1fr;
  }

  body.usynai-brand .account-contact-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.usynai-brand .account-contact-save {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 760px) {
  body.usynai-brand :is(
    .settings-section-head,
    .profile-form-head,
    .profile-section-title,
    .tariff-source-card,
    .admin-toolbar,
    .admin-cabinet-toolbar,
    .admin-section-head,
    .products-toolbar,
    .profitability-toolbar,
    .supplier-card-main,
    .assistant-head
  ) {
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
  }
}
