/* Owner information architecture: compact, plain-English module hubs. */

/*
 * The visual-viewport helper fixes the Owner navigation to the bottom on
 * desktop as well as mobile. A fixed box with no horizontal anchors shrinks
 * to its contents, which clipped the fifth item. Give that fixed shell an
 * explicit viewport width and let the five destinations share it evenly.
 */
body.djr-owner-portal > .owner-nav.djr-bottom-nav-viewport-authority {
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

body.djr-owner-portal > .owner-nav .owner-nav-inner {
  box-sizing: border-box;
  justify-content: stretch;
  margin-right: auto;
  margin-left: auto;
}

body.djr-owner-portal > .owner-nav .owner-nav-inner > a {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

.djr-module-hub {
  padding: 20px;
  border: 1px solid #dfe5ef;
  border-radius: 22px;
  background: var(--owner-solid, #fff);
  box-shadow: 0 10px 28px rgba(18, 37, 70, .06);
}

.djr-module-parent-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 10px;
  color: inherit !important;
  font-size: .8rem;
  font-weight: 800;
  opacity: .78;
  text-decoration: none !important;
}

.djr-module-parent-link:hover,
.djr-module-parent-link:focus-visible {
  opacity: 1;
  text-decoration: underline !important;
}

.djr-module-hub__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.djr-module-hub__heading h2 {
  margin: 0;
  color: var(--owner-ink, #172033);
  font-size: 1.25rem;
  letter-spacing: -.025em;
}

.djr-module-hub__heading p {
  max-width: 660px;
  margin: 4px 0 0;
  color: var(--owner-muted, #6f7d91);
  font-size: .88rem;
  line-height: 1.45;
}

.djr-module-hub__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.djr-module-hub__link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e2e8f1;
  border-radius: 15px;
  background: linear-gradient(180deg, var(--owner-solid, #fff), var(--owner-solid, #fafbfe));
  color: var(--owner-ink, #18243a) !important;
  text-decoration: none !important;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.djr-module-hub__link:hover,
.djr-module-hub__link:focus-visible {
  border-color: #cbbfff;
  box-shadow: 0 8px 20px rgba(58, 42, 135, .10);
  transform: translateY(-1px);
}

.djr-module-hub__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--owner-solid, #eeeaff);
  color: var(--owner-accent, #5a43ca);
  font-size: 1.05rem;
  font-weight: 900;
}

.djr-module-hub__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.djr-module-hub__copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--owner-ink, #172033);
  font-size: .88rem;
}

.djr-module-hub__count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #6c43e8;
  color: #fff;
  font-size: .65rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.djr-module-hub__copy small {
  overflow: hidden;
  color: var(--owner-muted, #738097);
  font-size: .72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.djr-module-hub__arrow {
  color: var(--owner-accent, #8c80c9);
  font-size: 1.15rem;
  font-weight: 800;
}

.djr-staff-invitations {
  scroll-margin-top: 86px;
}

.djr-staff-invitations__count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--owner-solid, #eeeaff);
  color: var(--owner-accent, #5a43ca);
  font-size: .78rem;
  font-weight: 800;
}

.djr-staff-invitations__list {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.djr-staff-invitation {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, .55fr) minmax(110px, .55fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e2e8f1;
  border-radius: 15px;
  background: var(--owner-solid, #fbfcfe);
}

.djr-staff-invitation__identity,
.djr-staff-invitation__detail {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.djr-staff-invitation__identity strong {
  overflow: hidden;
  color: var(--owner-ink, #172033);
  font-size: .91rem;
  text-overflow: ellipsis;
}

.djr-staff-invitation__identity small,
.djr-staff-invitation__detail span {
  overflow: hidden;
  color: var(--owner-muted, #718096);
  font-size: .72rem;
  text-overflow: ellipsis;
}

.djr-staff-invitation__detail strong {
  color: var(--owner-ink, #25324a);
  font-size: .82rem;
}

.djr-staff-invitation__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.djr-staff-invitation__actions a {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--owner-solid, #ece9ff);
  color: var(--owner-accent, #4f3cba) !important;
  font-size: .74rem;
  font-weight: 800;
  text-decoration: none !important;
}

.djr-staff-invitation__actions a:last-child {
  background: var(--owner-solid, #fff0f2);
  color: var(--owner-danger, #a82d42) !important;
}

.djr-module-hub + .djrc-directory-panel,
.djr-staff-stats + .djr-module-hub {
  margin-top: 0;
}

@media (max-width: 980px) {
  .djr-module-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .djr-staff-invitation {
    grid-template-columns: minmax(0, 1fr) minmax(110px, .5fr) auto;
  }

  .djr-staff-invitation__detail:nth-of-type(3) {
    display: none;
  }
}

@media (max-width: 720px) {
  body.djr-owner-portal .owner-nav-inner {
    justify-content: stretch;
    overflow-x: visible;
  }

  body.djr-owner-portal .owner-nav a {
    min-width: 0;
  }

  .djr-module-hub {
    padding: 15px;
    border-radius: 18px;
  }

  .djr-module-hub__grid {
    grid-template-columns: 1fr;
  }

  .djr-module-hub__link {
    min-height: 68px;
  }

  .djr-staff-invitation {
    grid-template-columns: 1fr auto;
  }

  .djr-staff-invitation__detail {
    display: none;
  }
}

@media (max-width: 420px) {
  .djr-module-hub__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .djr-staff-invitation {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .djr-staff-invitation__actions {
    justify-content: flex-start;
  }
}
