.crm-mobile-label { display: none; }

/* Keep the desktop toolbar unchanged. On phones, the title and actions get
   separate rows; normal flow accounts for any extra translated button rows. */
@media (max-width: 720px) {
  .topbar {
    position: sticky;
    left: auto;
    right: auto;
    top: 0;
    height: auto;
    width: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px 8px;
    padding: calc(10px + env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px)) 10px
      max(12px, env(safe-area-inset-left, 0px));
  }
  .topbar > div:first-of-type { min-width: 0; margin-left: 0; }
  .topbar h1 { font-size: 17px; line-height: 1.35; overflow-wrap: break-word; }
  .topbar .top-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
  }
  .top-actions > button,
  .top-actions > select {
    flex: 0 0 auto;
    max-width: 100%;
    min-height: 38px;
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .top-actions .secondary,
  .top-actions .operations-install-button { padding: 8px 10px; }
  .top-actions .language-button { width: auto; min-width: 96px; padding: 8px; }
  .top-actions .primary { width: auto; height: auto; padding: 8px 10px; font-size: 12px; }
  .top-actions .primary::first-letter { font-size: inherit; }
  .topbar + main { margin-left: 0; padding-top: 16px; }
  .topbar [hidden] { display: none !important; }

  /* CRM: the desktop seven/eight-column tables become labelled customer cards. */
  .crm-v83, .crm-v83 * { min-width: 0; }
  .crm-v83 { max-width: 100%; }
  .crm-v83 .crm-directory { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .crm-v83 .crm-directory input { width: 100%; font-size: 16px; }
  .crm-v83 .crm-task-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
  .crm-v83 .crm-task-kpis .kpi { padding: 12px; min-height: 92px; }
  .crm-v83 .crm-view-nav { display: flex; flex-wrap: wrap; gap: 4px; overflow: visible; }
  .crm-v83 .crm-view-nav button { flex: 1 1 130px; padding: 10px 8px; white-space: normal; overflow-wrap: anywhere; }
  .crm-v83 .panel-header,
  .crm-v83 .crm-objection-library > header,
  .crm-v83 .crm-risk-zone > header,
  .crm-v83 .crm-completed-view > header { flex-wrap: wrap; gap: 10px; align-items: flex-start; }
  .crm-v83 .crm-mine-stage-filter { display: flex; flex-wrap: wrap; width: 100%; }
  .crm-v83 .crm-mine-stage-filter select { flex: 1 1 130px; min-width: 0; max-width: 100%; }
  .crm-v83 .table-wrap { display: block !important; overflow: visible; }
  .crm-v83 table, .crm-v83 .crm-development-table table {
    display: block; width: 100%; min-width: 0; max-width: 100%;
  }
  .crm-v83 thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .crm-v83 tbody { display: grid; gap: 10px; padding: 10px; }
  .crm-v83 tbody tr { display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow-wrap: anywhere; }
  .crm-v83 tbody tr[hidden] { display: none !important; }
  .crm-v83 tbody td { display: block; width: auto; max-width: none; min-width: 0; padding: 10px 12px; white-space: normal; border-bottom: 1px solid #edf2f3; }
  .crm-v83 tbody td:last-child { border-bottom: 0; }
  .crm-v83 tbody td:first-child > strong { font-size: 15px; }
  .crm-v83 .crm-mobile-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
  .crm-v83 .crm-row-actions { gap: 8px; }
  .crm-v83 .crm-row-actions button, .crm-v83 .crm-inline-more button { min-height: 38px; font-size: 12px; }
  .crm-v83 .crm-inline-more > summary { min-height: 36px; padding: 8px 0; font-size: 12px; }
  .crm-v83 .crm-situation-empty, .crm-v83 .crm-situation-latest { width: 100%; }
  .crm-v83 .crm-stage-basis { max-width: none; }
  .crm-v83 .crm-route-grid.cardinal,
  .crm-v83 .crm-objection-library > div,
  .crm-v83 .crm-completed-list { grid-template-columns: minmax(0, 1fr); }
  .crm-v83 .crm-risk-card header,
  .crm-v83 .crm-objection-library article > div { flex-wrap: wrap; }
  .crm-v83 .crm-script-cell { min-width: 0; max-width: none; }
}
#registrationReferrerSettings input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  flex: 0 0 16px;
}
