.onboarding-body {
  background: #f5f6ef;
}
.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 25px max(28px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid #e4e9dc;
  background: #fff;
}
.onboarding-header > a:last-child {
  font-size: 12px;
  color: #688058;
}
.onboarding-shell {
  display: grid;
  grid-template-columns: 0.85fr 1.2fr;
  gap: 65px;
  width: min(1200px, calc(100% - 60px));
  margin: 65px auto;
}
.onboarding-shell > aside {
  padding-top: 35px;
  min-width: 0;
}
.onboarding-shell h1 {
  font-size: 49px;
  letter-spacing: -2px;
  color: #29462f;
}
.onboarding-shell h1 em {
  color: #df713c;
  font-family: Georgia, serif;
  font-weight: 400;
}
.onboarding-shell aside > p {
  color: #89967b;
  font-size: 14px;
  max-width: 360px;
}
.onboarding-steps {
  list-style: none;
  padding: 0;
  margin: 35px 0;
}
.onboarding-steps li {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #e0e7d8;
  color: #506548;
}
.onboarding-steps b {
  font-size: 23px;
  color: #c0cbb4;
  font-weight: 500;
}
.onboarding-steps span {
  font-size: 13px;
  font-weight: 650;
}
.onboarding-steps small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #8b987c;
  margin-top: 5px;
}
.onboarding-shell aside > a {
  font-size: 12px;
  color: #a16a3f;
}
.onboarding-shell .card {
  padding: 32px;
}
.onboarding-shell .form-grid h3 {
  padding-top: 12px;
  margin: 0;
}
.onboarding-shell .button.full {
  width: 100%;
}
.terms-check {
  align-items: start;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
}
.terms-check input {
  margin-top: 3px;
}
.terms-check span {
  min-width: 0;
}
.terms-check .small-link {
  font-size: inherit;
}
.approval-shell {
  width: min(740px, calc(100% - 36px));
  margin: 35px auto;
}
.approval-shell > .brand {
  margin: 25px 0;
}
.approval-shell > .card {
  padding: 36px;
}
.approval-shell h1 {
  font-size: 35px;
  max-width: 570px;
  color: #2c4733;
}
.approval-shell p {
  color: #849477;
  font-size: 13px;
}
.approval-symbol {
  display: block;
  font-size: 50px;
  color: #c1cfae;
  margin: 15px 0;
}
.approval-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 25px 0;
}
.approval-progress span {
  border: 1px solid #dce5d3;
  background: #f5f7ee;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 10px;
  color: #6d855c;
}
.legal-page {
  max-width: 850px;
  margin: 35px auto;
  padding: 35px;
}
.legal-copy {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.9;
  color: #63725b;
  overflow-wrap: anywhere;
}
.tenant-company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.tenant-company .section-heading {
  align-items: start;
  gap: 12px;
  flex-wrap: wrap;
}
.tenant-company h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.tenant-company dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 12px;
}
.tenant-company dt {
  color: #91a080;
}
.tenant-company dd {
  margin: 0;
  text-align: right;
  color: #546d44;
}
.tenant-company > .help {
  overflow-wrap: anywhere;
}
.tenant-company .inline-form {
  gap: 10px;
}
.tenant-company .form-stack {
  gap: 12px;
}
.subscription-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.subscription-plans > .card {
  padding: 26px 22px;
  margin: 0;
  min-width: 0;
}
.subscription-plan {
  position: relative;
  display: flex;
  flex-direction: column;
}
.subscription-plan.featured {
  border-color: #dd8353;
  box-shadow: 0 7px 25px #c8893910;
}
.subscription-plan h2 {
  font-size: 27px;
  color: #314b35;
}
.subscription-plan > p {
  font-size: 12px;
  color: #8a987d;
  min-height: 55px;
}
.subscription-plan ul {
  padding-left: 16px;
  font-size: 11px;
  line-height: 1.9;
  color: #6c805c;
  margin-bottom: 25px;
}
.subscription-plan > .form-stack {
  margin-top: auto;
}
.subscription-plan .checkbox {
  font-size: 10px;
  align-items: start;
  line-height: 1.6;
  font-weight: 400;
}
.subscription-plan .checkbox input {
  margin-top: 3px;
}
.plan-price {
  font-size: 31px;
  line-height: 1.3;
  letter-spacing: -1.2px;
  color: #324f37;
  font-weight: 750;
  margin: 18px 0;
}
.plan-price small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: #91a17e;
  margin-top: 7px;
}
.subscription-checkout {
  max-width: 780px;
  margin: auto;
  padding: 38px;
}
.subscription-checkout h1 {
  font-size: 34px;
}
.subscription-checkout > p {
  font-size: 13px;
  color: #879879;
}
.subscription-checkout .plan-price {
  font-size: 40px;
}
.billing-methods {
  margin: 25px 0;
}
.billing-pix-result {
  padding: 25px 0;
}
.billing-pix-result > img {
  margin: 18px auto;
  max-width: 100%;
  object-fit: contain;
}
.billing-pix-result textarea {
  font-family: monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
  min-height: 90px;
}
.billing-pix-result > .button {
  margin-top: 15px;
}
.subscription-checkout #platform-card-brick {
  min-height: 180px;
  max-width: 100%;
  overflow: hidden;
}
.role-stats article > strong {
  overflow-wrap: anywhere;
}
.tenant-company .notice {
  font-size: 12px;
}
@media (max-width: 1100px) {
  .subscription-plans {
    grid-template-columns: 1fr;
  }
  .subscription-plan > p {
    min-height: 0;
  }
  .subscription-plan .form-stack {
    margin-top: 10px;
  }
  .tenant-company-grid {
    grid-template-columns: 1fr;
  }
  .onboarding-shell {
    gap: 30px;
    grid-template-columns: 0.75fr 1.2fr;
  }
  .onboarding-shell h1 {
    font-size: 39px;
  }
  .onboarding-shell .card {
    padding: 24px;
  }
}
@media (max-width: 700px) {
  .onboarding-header {
    padding: 20px;
    flex-wrap: wrap;
  }
  .onboarding-header .brand {
    font-size: 20px;
  }
  .onboarding-header > a:last-child {
    font-size: 10px;
  }
  .onboarding-shell {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 32px);
    margin: 20px auto;
    gap: 20px;
  }
  .onboarding-shell > aside {
    padding: 18px 5px 0;
  }
  .onboarding-shell h1 {
    font-size: 38px;
  }
  .onboarding-shell aside > p {
    font-size: 12px;
  }
  .onboarding-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 25px 0;
  }
  .onboarding-steps li {
    gap: 9px;
    padding: 10px 0;
  }
  .onboarding-steps span {
    font-size: 11px;
  }
  .onboarding-steps small {
    font-size: 9px;
  }
  .onboarding-steps b {
    font-size: 19px;
  }
  .onboarding-shell .card {
    padding: 24px 20px;
  }
  .onboarding-shell .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .approval-shell > .card {
    padding: 25px;
  }
  .approval-shell h1 {
    font-size: 29px;
  }
  .approval-progress {
    gap: 8px;
  }
  .legal-page {
    margin: 18px;
    padding: 24px;
  }
  .legal-copy {
    font-size: 12px;
  }
  .tenant-company-grid {
    gap: 14px;
  }
  .tenant-company {
    padding: 22px 18px;
  }
  .tenant-company dl {
    font-size: 11px;
  }
  .subscription-checkout {
    padding: 25px 18px;
  }
  .subscription-checkout .plan-price {
    font-size: 34px;
  }
  .billing-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .billing-methods .button {
    font-size: 11px;
    padding: 10px;
  }
  .subscription-checkout > .actions.space-top {
    align-items: stretch;
    flex-direction: column;
  }
  .subscription-checkout > .actions.space-top .button {
    white-space: normal;
  }
  .approval-shell .pwa-connection .actions {
    width: 100%;
  }
}

/* Persistent PWA invitation stays above content without blocking checkout. */
.pwa-reminder {
  position: fixed;
  z-index: 1100;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid #e0e6da;
  border-radius: 20px;
  background: #fffef9;
  color: #243d30;
  box-shadow: 0 16px 60px #15261c30;
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
.pwa-reminder[hidden],
.pwa-reminder [hidden] {
  display: none !important;
}
.pwa-reminder h2 {
  font-size: 22px;
  margin: 10px 0;
}
.pwa-reminder p {
  font-size: 14px;
  line-height: 1.6;
}
.pwa-reminder .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 10px;
}
.pwa-reminder .button {
  white-space: normal;
  flex: 1 1 120px;
  min-width: 0;
}
.pwa-reminder small {
  font-size: 11px;
  color: #68776a;
}
@media (max-width: 600px) {
  .pwa-reminder {
    left: 16px;
    right: 16px;
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 70px));
    padding: 18px;
  }
}

/* Compact administrative directories and focused detail dialogs. */
.directory {
  min-width: 0;
}
.directory-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: thin;
}
.directory-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 11px 15px;
  border: 1px solid #e0e6dd;
  border-radius: 12px;
  background: white;
  color: #536054;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.directory-tabs button span {
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f4ed;
  font-size: 11px;
}
.directory-tabs button[aria-selected="true"] {
  color: white;
  background: #243d30;
  border-color: #243d30;
}
.directory-tabs button[aria-selected="true"] span {
  background: #ffffff24;
  color: white;
}
.directory-tabs button:focus-visible,
.directory-close:focus-visible {
  outline: 3px solid #ed632b;
  outline-offset: 3px;
}
.directory-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 20px;
}
.directory-search {
  display: grid;
  gap: 7px;
  width: min(100%, 420px);
  font-size: 12px;
  color: #667364;
}
.directory-search input {
  width: 100%;
  min-width: 0;
  background: white;
}
.directory-toolbar p {
  flex: none;
  margin: 0 0 12px;
}
.directory-list {
  display: grid;
  gap: 10px;
  outline-offset: 4px;
}
.directory-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.5fr) minmax(100px, 1fr) minmax(
      70px,
      auto
    ) auto;
  align-items: center;
  gap: 16px;
  padding: 19px 20px;
  background: white;
  border: 1px solid #e4e9e0;
  border-radius: 15px;
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.directory-row:hover {
  border-color: #c8d5c0;
  box-shadow: 0 4px 18px #243d3007;
}
.directory-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f2eee5;
  color: #7b5935;
  font-size: 17px;
  font-weight: 700;
}
.directory-company-avatar {
  border-radius: 12px;
  background: #edf3e9;
  color: #496542;
}
.directory-main,
.directory-secondary {
  min-width: 0;
}
.directory-main h2 {
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.directory-main p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  color: #7c8578;
  overflow-wrap: anywhere;
}
.directory-secondary {
  display: grid;
  gap: 4px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.directory-secondary small {
  font-size: 11px;
  line-height: 1.5;
  color: #7c8578;
}
.directory-row > .badge {
  white-space: normal;
  text-align: center;
  max-width: 130px;
}
.directory-details {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 11px;
  gap: 8px;
  white-space: nowrap;
}
.directory [hidden] {
  display: none !important;
}
.directory-empty {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border: 1px dashed #d7dfd0;
  border-radius: 15px;
  color: #6f7c69;
}
.directory-more {
  display: flex;
  margin: 20px auto 0;
}
.directory-history {
  margin-top: 30px;
}
.directory-history > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
}
.directory-history > summary::before {
  content: "＋";
  color: #ed632b;
}
.directory-history[open] > summary::before {
  content: "−";
}
dialog.directory-dialog {
  width: min(700px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  border: 1px solid #e3e8df;
  border-radius: 22px;
  padding: 0;
  color: #243d30;
  background: #fff;
  box-shadow: 0 24px 100px #182c3240;
  overflow: auto;
}
dialog.directory-dialog::backdrop {
  background: #14261ed0;
  backdrop-filter: blur(3px);
}
.directory-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 28px;
  border-bottom: 1px solid #e6ebe2;
  background: #fafbf7;
  position: sticky;
  top: 0;
  z-index: 1;
}
.directory-dialog-header h2 {
  font-size: 23px;
  margin: 8px 0 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.directory-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid #dfe5db;
  border-radius: 50%;
  background: white;
  color: #53634f;
  font-size: 25px;
  cursor: pointer;
}
.directory-dialog-body {
  padding: 25px 28px;
  overflow-wrap: anywhere;
}
.directory-dialog-body .section-heading {
  display: none;
}
.directory-dialog-body dl {
  display: grid;
  gap: 8px;
}
.directory-dialog-body .form-grid > * {
  min-width: 0;
}
.directory-dialog-body .inline-form {
  flex-wrap: wrap;
}
.directory-dialog-body input,
.directory-dialog-body textarea,
.directory-dialog-body select {
  max-width: 100%;
  min-width: 0;
}
.directory-facts {
  margin: 0 0 25px;
}
.directory-facts > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0e8;
}
.directory-facts dt {
  color: #7d8876;
  font-size: 12px;
}
.directory-facts dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.directory-dialog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
body:has(dialog.directory-dialog[open]) {
  overflow: hidden;
}
@media (max-width: 1100px) {
  .directory-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
  }
  .directory-avatar {
    width: 36px;
    height: 36px;
  }
  .directory-secondary {
    grid-column: 2;
  }
  .directory-row > .badge {
    grid-column: 3;
    grid-row: 1;
  }
  .directory-details {
    grid-column: 3;
    grid-row: 2;
  }
}
@media (max-width: 600px) {
  .directory-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 14px;
  }
  .directory-search {
    width: 100%;
  }
  .directory-toolbar p {
    margin: 0;
    font-size: 11px;
  }
  .directory-tabs {
    margin-right: -12px;
    padding-right: 12px;
  }
  .directory-tabs button {
    padding: 10px 12px;
  }
  .directory-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 15px;
  }
  .directory-avatar {
    width: 34px;
    height: 34px;
  }
  .directory-main h2 {
    font-size: 14px;
  }
  .directory-row > .badge {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    max-width: none;
  }
  .directory-secondary {
    grid-column: 2;
    grid-row: 2;
  }
  .directory-details {
    grid-column: 1/-1;
    grid-row: 4;
    width: 100%;
    margin-top: 4px;
  }
  dialog.directory-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
    border-radius: 18px;
  }
  .directory-dialog-header {
    padding: 20px;
    gap: 12px;
  }
  .directory-dialog-header h2 {
    font-size: 20px;
  }
  .directory-dialog-body {
    padding: 20px;
  }
  .directory-facts > div {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .directory-dialog-actions > * {
    flex: 1 1 100%;
  }
  .directory-dialog-actions .button {
    width: 100%;
  }
  .directory-dialog .actions {
    flex-wrap: wrap;
  }
}
