/* Shared content axis and type scale for Master routes only. */
.master-layout {
  --master-content-max: 1240px;
  --master-gutter: clamp(18px, 3vw, 40px);
  --master-heading-font: Inter, Arial, sans-serif;
  --master-page-title: clamp(1.875rem, 2.7vw, 2.5rem);
  --master-section-title: 1.25rem;
  --master-body-text: .9375rem;
  --master-helper-text: .875rem;
  --master-control-text: .9375rem;
}

.master-layout .dashboard-main {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--master-content-max) + var(--master-gutter) + var(--master-gutter));
  margin-inline: auto;
  padding: 32px var(--master-gutter) 56px;
  font-size: var(--master-body-text);
  line-height: 1.5;
}

.master-layout .dashboard-main > section {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-inline: 0;
}

.master-layout .dashboard-main :is(h1, h2, h3) {
  font-family: var(--master-heading-font);
  text-wrap: pretty;
}

.master-layout .dashboard-main h1 {
  margin-block: 0 8px;
  font-size: var(--master-page-title);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.04em;
}

.master-layout .dashboard-main :is(
  .master-section-heading,
  .wa-section-heading,
  .settings-section-heading,
  .profile-section-heading,
  .contacts-detail-head,
  .platform-health
) h2 {
  font-size: var(--master-section-title);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.master-layout .dashboard-main .eyebrow {
  font-size: var(--master-helper-text);
  font-weight: 750;
  line-height: 1.35;
}

.master-layout .dashboard-main :is(
  .master-dashboard-heading,
  .establishments-heading,
  .master-users-heading,
  .wa-heading-row,
  .contacts-heading,
  .platform-page-heading,
  .master-smtp-page > header,
  .master-contact-page > header,
  .profile-header
) p:last-child {
  max-width: 72ch;
  font-size: var(--master-body-text);
  line-height: 1.55;
}

.master-layout .dashboard-main :is(.profile-section-heading, .wa-section-heading) h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.master-layout .dashboard-main :is(label, button, input, select, textarea) {
  font-family: Inter, Arial, sans-serif;
}

.master-layout .dashboard-main label { font-size: var(--master-helper-text); line-height: 1.4; }
.master-layout .dashboard-main :is(input, select, textarea) { font-size: var(--master-control-text); }
.master-layout .dashboard-main button:not(.icon-button):not(.icon-action):not(.modal-close):not(.contacts-detail-close):not(.wa-dialog-close) {
  font-size: var(--master-control-text);
  line-height: 1.35;
}

.master-layout .dashboard-main small {
  font-size: var(--master-helper-text);
  line-height: 1.4;
}

/* Forms can be shorter than data-heavy pages while retaining the same left edge. */
.master-layout .master-smtp-form { max-width: 1040px; }
.master-layout .master-settings-page:not(.platform-whatsapp-page) .settings-panel,
.master-layout .profile-page > form { max-width: 900px; }

@media (max-width: 700px) {
  .master-layout { --master-gutter: 16px; }
  .master-layout .dashboard-main { padding-block: 28px 48px; }
}
