.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}


.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}


.section-heading.compact {
  align-items: center;
}


.section-heading h2 {
  margin: 0;
}


.section-copy {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
}


.username-field {
  display: flex;
  align-items: center;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  background: #fff;

  overflow: hidden;
}


.username-field span {
  padding-left: 12px;
  color: #6b7280;
  font-weight: 700;
}


.username-field input {
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 4px !important;
  width: 100%;
}


.profile-actions {
  margin-top: 14px;
}


.connections-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 16px;

  margin-top: 16px;
}


.connection-list {
  display: grid;
  gap: 10px;

  margin-top: 12px;
}


.connection-row {
  display: flex;
  align-items: center;

  gap: 12px;

  padding: 12px;

  border: 1px solid #e5e7eb;

  border-radius: 14px;

  background: #fff;
}


.connection-avatar {
  width: 42px;
  height: 42px;

  border-radius: 50%;

  display: grid;
  place-items: center;

  flex: 0 0 42px;

  background: #f0f1f4;

  font-weight: 800;
  font-size: 14px;
}


.connection-main {
  min-width: 0;
  flex: 1;
}


.connection-name {
  font-weight: 750;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.connection-username,
.connection-meta {
  margin-top: 2px;

  color: #6b7280;

  font-size: 13px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.connection-actions {
  display: flex;

  gap: 8px;

  flex-wrap: wrap;

  justify-content: flex-end;
}


.connection-actions button {
  width: auto;
}


.count-badge,
.connected-badge {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  border-radius: 999px;

  font-size: 11px;

  font-weight: 800;

  line-height: 1;
}


.count-badge {
  min-width: 24px;

  height: 24px;

  padding: 0 7px;

  background: #111827;

  color: #fff;
}


.connected-badge {
  margin-left: 6px;

  padding: 5px 7px;

  background: #eef2ff;

  color: #3730a3;
}


.search-row input {
  min-width: 0;

  flex: 1;
}


.people-source-block {
  padding: 12px;

  border: 1px solid #e5e7eb;

  border-radius: 14px;

  background: #fafafa;
}


.connected-picker-list {
  display: grid;

  gap: 8px;

  margin-top: 12px;
}


.connection-picker-row {
  appearance: none;

  width: 100%;

  display: flex;

  align-items: center;

  gap: 10px;

  text-align: left;

  padding: 10px 12px;

  border: 1px solid #e5e7eb;

  border-radius: 12px;

  background: #fff;

  color: inherit;

  cursor: pointer;
}


.connection-picker-row:hover:not(:disabled) {
  border-color: #b8bec8;
}


.connection-picker-row:disabled {
  cursor: default;

  opacity: 0.62;
}


.connection-picker-name {
  flex: 1;

  min-width: 0;

  font-weight: 700;
}


.connection-picker-username {
  color: #6b7280;

  font-size: 13px;
}


.connection-picker-action {
  font-size: 13px;

  font-weight: 700;
}


.divider-label {
  display: flex;

  align-items: center;

  gap: 10px;

  color: #8a9099;

  font-size: 12px;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: .04em;

  margin: 16px 0;
}


.divider-label::before,
.divider-label::after {
  content: "";

  height: 1px;

  background: #e5e7eb;

  flex: 1;
}


.person-connected-name {
  display: inline-flex;

  align-items: center;

  min-width: 0;
}


@media (max-width: 720px) {

  .connections-grid {
    grid-template-columns: 1fr;
  }


  .connection-row {
    align-items: flex-start;
  }


  .connection-actions {
    flex-direction: column;

    align-items: stretch;
  }


  .connection-actions button {
    width: 100%;
  }


  .topbar-actions {
    flex-wrap: wrap;

    justify-content: flex-end;
  }
}


/* =========================================================
   CONNECTIONS PAGE - REDESIGN
   ========================================================= */

.connections-page .card {
  border-radius: 20px;

  border:
    1px solid
    rgba(
      17,
      24,
      39,
      0.04
    );

  box-shadow:
    0 8px 24px
    rgba(
      17,
      24,
      39,
      0.045
    );
}


.connections-search-card {
  padding: 20px 22px;
}


.connections-search-card h2 {
  margin:
    0
    0
    14px;
}


.connections-search-box {
  display: grid;

  grid-template-columns:
    minmax(
      0,
      1fr
    )
    auto;

  gap: 10px;
}


.connections-search-box input {
  min-width: 0;

  height: 48px;

  border:
    1px solid
    #e5e7eb;

  border-radius: 13px;

  padding:
    0
    15px;

  background: #fafafa;

  outline: none;
}


.connections-search-box input:focus {
  border-color: #0a84ff;

  background: #fff;

  box-shadow:
    0
    0
    0
    3px
    rgba(
      10,
      132,
      255,
      0.10
    );
}


.connections-search-box .primary {
  min-height: 48px;

  padding:
    0
    18px;

  border-radius: 13px;
}


.connections-search-results {
  display: grid;

  margin-top: 12px;
}


.connections-search-results:empty {
  display: none;
}


.connections-search-result-row {
  display: grid;

  grid-template-columns:
    auto
    minmax(
      0,
      1fr
    )
    auto;

  align-items: center;

  gap: 13px;

  padding:
    13px
    0;

  border-top:
    1px solid
    #f0f1f3;
}


.connections-main-card {
  margin-top: 16px;

  overflow: hidden;
}


.connections-section-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 14px;

  padding:
    18px
    22px
    14px;

  border-bottom:
    1px solid
    #f0f1f3;
}


.connections-section-header h2 {
  margin: 0;
}


.connections-sort {
  display: flex;

  align-items: center;

  gap: 7px;

  flex:
    0
    0
    auto;
}


.connections-sort label {
  color: #6b7280;

  font-size: 12px;

  font-weight: 700;
}


.connections-sort select {
  height: 32px;

  border:
    1px solid
    #e5e7eb;

  border-radius: 9px;

  background: #fafafa;

  padding:
    0
    26px
    0
    9px;

  color: #111827;

  font-size: 12px;

  font-weight: 700;
}


.connections-list,
.requests-list {
  display: grid;
}


.connections-person-row {
  display: grid;

  grid-template-columns:
    auto
    minmax(
      0,
      1fr
    )
    auto;

  align-items: center;

  gap: 13px;

  padding:
    15px
    22px;

  border-top:
    1px solid
    #f2f3f5;
}


.connections-person-row:first-child {
  border-top: 0;
}


.connections-avatar {
  width: 44px;

  height: 44px;

  display: grid;

  place-items: center;

  flex:
    0
    0
    44px;

  border-radius: 50%;

  background: #eef6ff;

  color: #1269c7;

  font-size: 13px;

  font-weight: 900;
}


.connections-person-main {
  min-width: 0;
}


.connections-person-name {
  font-weight: 800;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.connections-person-username {
  margin-top: 2px;

  color: #6b7280;

  font-size: 13px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.connections-stats {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 18px;
}


.connections-stat {
  min-width: 70px;

  text-align: right;
}


.connections-stat-value {
  font-size: 14px;

  font-weight: 800;
}


.connections-stat-label {
  margin-top: 2px;

  color: #6b7280;

  font-size: 11px;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.04em;
}


.connections-request-row {
  display: grid;

  grid-template-columns:
    auto
    minmax(
      0,
      1fr
    );

  align-items: start;

  gap: 13px;

  padding:
    15px
    22px;

  border-top:
    1px solid
    #f2f3f5;
}


.connections-request-row:first-child {
  border-top: 0;
}


.connections-request-content {
  min-width: 0;
}


.connections-request-top {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;
}


.connections-request-bottom {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  margin-top: 4px;
}


.connections-request-type {
  display: inline-flex;

  align-items: center;

  flex:
    0
    0
    auto;

  border-radius: 999px;

  padding:
    6px
    9px;

  background: #f3f4f6;

  color: #6b7280;

  font-size: 11px;

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.03em;
}


.connections-request-actions {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 8px;
}


.connections-accept {
  width: auto;

  min-height: 36px;

  border: 0;

  border-radius: 10px;

  padding:
    8px
    12px;

  background: #0a84ff;

  color: #fff;

  font-weight: 800;
}


.connections-secondary-action {
  width: auto;

  min-height: 36px;

  border:
    1px solid
    #e5e7eb;

  border-radius: 10px;

  padding:
    8px
    12px;

  background: #fff;

  color: #111827;

  font-weight: 700;
}


.connections-request-status {
  display: inline-flex;

  align-items: center;

  min-height: 34px;

  border-radius: 999px;

  padding:
    0
    10px;

  background: #f3f4f6;

  color: #6b7280;

  font-size: 12px;

  font-weight: 800;
}


.connections-empty {
  padding:
    22px;

  color: #6b7280;

  font-size: 14px;
}


.connections-empty.hidden {
  display: none;
}


@media (
  max-width: 720px
) {

  .connections-section-header {
    align-items: center;
  }


  .connections-sort label {
    display: none;
  }


  .connections-person-row {
    grid-template-columns:
      auto
      minmax(
        0,
        1fr
      );
  }


  .connections-stats {
    grid-column: 2;

    justify-content: flex-start;
  }


  .connections-stat {
    text-align: left;
  }


  .connections-request-bottom {
    align-items: flex-start;

    flex-direction: column;
  }


  .connections-search-result-row {
    grid-template-columns:
      auto
      minmax(
        0,
        1fr
      );

    align-items: start;
  }


  .connections-search-result-row
  > button {
    grid-column: 2;

    justify-self: start;
  }


  .connections-search-box {
    grid-template-columns: 1fr;
  }


  .connections-search-box .primary {
    width: 100%;
  }
}


/* =========================================================
   CHECK PAGE ACTION CLEANUP
   ========================================================= */

.check-header-right {
  display: flex;

  align-items: center;

  gap: 10px;

  flex:
    0
    0
    auto;
}


.check-save-progress {
  width: auto;

  min-height: 44px;

  padding:
    0
    15px;

  border-radius: 11px;

  white-space: nowrap;
}


.guest-add-row {
  align-items: stretch;
}


.guest-add-row input,
.guest-add-row button {
  min-height: 48px;

  height: 48px;
}


.guest-add-row input {
  min-width: 0;

  flex: 1;
}


.guest-add-row button {
  width: auto;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding:
    0
    16px;

  white-space: nowrap;
}


.check-calculate-card {
  display: flex;

  align-items: center;

  justify-content: flex-start;

  margin-top: 16px;

  padding: 16px;
}


.check-calculate-button {
  width: auto;

  min-height: 44px;

  padding:
    0
    16px;

  border-radius: 11px;
}


@media (max-width: 720px) {

  .check-header-right {
    align-items: flex-end;

    flex-direction: column-reverse;

    gap: 8px;
  }


  .check-save-progress {
    min-height: 40px;

    padding:
      0
      12px;

    font-size: 13px;
  }


  .guest-add-row {
    display: grid;

    grid-template-columns:
      minmax(
        0,
        1fr
      )
      auto;
  }


  .check-calculate-card {
    padding: 14px;
  }
}
