/* 首页门户导航 — 莫兰迪 */
body.portal-home {
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--color-bg-muted);
}

.portal-home h1 {
  font-size: 2.5em;
  margin: 16px 0 28px;
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  color: var(--color-heading);
}

.portal-home #user-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 10px auto;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.portal-home .primary-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, 100%);
}

.portal-home .become-member-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 14px 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #c4785a 0%, #a85d45 100%);
  border: 2px solid #8f4a35;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(168, 93, 69, 0.35);
}

.portal-home .become-member-cta:hover {
  background: linear-gradient(135deg, #d08768 0%, #b86a4f 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(168, 93, 69, 0.45);
}

.portal-home .recruit-group-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 14px 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #5a8f7b 0%, #3f6f5c 100%);
  border: 2px solid #345c4c;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(63, 111, 92, 0.35);
  cursor: pointer;
}

.portal-home .recruit-group-cta:hover {
  background: linear-gradient(135deg, #6aa08b 0%, #4a8070 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(63, 111, 92, 0.45);
}

body.recruit-modal-open {
  overflow: hidden;
}

.recruit-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.recruit-modal[hidden] {
  display: none !important;
}

.recruit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 30, 0.45);
}

.recruit-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  padding: 16px 18px 20px;
  box-sizing: border-box;
  text-align: center;
}

.recruit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.recruit-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  text-align: left;
}

.recruit-modal-close {
  border: none;
  background: transparent;
  color: #444;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.recruit-modal-close:hover {
  color: #111;
  background: transparent;
}

.recruit-modal-hint {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--color-text-muted, #666);
  line-height: 1.45;
  text-align: left;
}

.recruit-modal-qr {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  background: #fff;
}

.portal-home .primary-nav > button {
  width: 100%;
  text-align: center;
  padding: 10px;
  background-color: #9a9590;
  border-radius: var(--radius-md);
}

.portal-home .primary-nav > button:hover {
  background-color: #8a8580;
}

.portal-home .secondary-nav {
  display: none;
  margin-top: -4px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-light);
}

.portal-home .secondary-nav.active {
  display: block;
}

.portal-home .secondary-nav a {
  display: block;
  text-align: center;
  padding: 10px;
  background-color: var(--color-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.portal-home .secondary-nav a:last-child {
  margin-bottom: 0;
}

.portal-home .secondary-nav a:hover {
  background-color: var(--color-primary-hover);
  text-decoration: none;
}

.portal-home .secondary-nav .disabled-item {
  display: block;
  text-align: center;
  padding: 10px;
  background-color: #c5c0ba;
  color: #fdfbf8;
  border-radius: var(--radius-md);
  font-size: 1em;
  margin-bottom: 8px;
  cursor: default;
}

.portal-home .secondary-nav .disabled-item:last-child {
  margin-bottom: 0;
}

.portal-home .footer-note {
  margin-top: 18px;
  text-align: center;
  color: var(--color-text-muted);
}

@media (orientation: portrait), (max-width: 768px) {
  body.portal-home {
    padding: 20px 16px 28px;
    justify-content: flex-start;
  }

  .portal-home #user-avatar {
    width: 120px;
    height: 120px;
    margin-top: 6px;
  }

  .portal-home h1 {
    font-size: 1.6rem;
    line-height: 1.4;
    margin: 12px 0 18px;
  }

  .portal-home .primary-nav {
    width: 100%;
    max-width: 460px;
    gap: 10px;
  }

  .portal-home .primary-nav > button,
  .portal-home .secondary-nav a,
  .portal-home .secondary-nav .disabled-item {
    font-size: 1rem;
    padding: 13px 10px;
    border-radius: 10px;
  }
}
