/* Shared styles for member portal pages */
.portal-header-bar {
  background: #f8f8f8;
  border-bottom: 1px solid #e5e5e5;
  padding: 0.6rem 0;
}
.portal-header-bar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.portal-header-bar .container > a.btn-outline-secondary:first-child {
  margin-right: auto;
}
.portal-header-bar .dropdown {
  order: 99;
}
@media (max-width: 767.98px) {
  .portal-header-bar .container {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .portal-header-bar .container > a.btn-outline-secondary:first-child {
    order: 1;
    margin-right: auto;
  }
  .portal-header-bar .dropdown {
    order: 2;
  }
  .portal-header-bar .user-info {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }
}
@media (min-width: 768px) {
  .portal-header-bar .user-info {
    order: 1;
  }
  .portal-header-bar .credit-chip {
    order: 2;
  }
  .portal-header-bar .dropdown {
    order: 99;
  }
}
.portal-header-bar .user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #444;
}
.portal-nav {
  background: #fff;
  border-bottom: 2px solid #e5e5e5;
  padding: 0.6rem 0;
}
.portal-nav .nav-link {
  color: #666;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
}
.portal-nav .nav-link:hover {
  color: #333;
}
.portal-nav .nav-link.active {
  color: #111;
  border-bottom-color: #111;
}
.portal-nav .container {
  position: relative;
}
.portal-page-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111;
}
@media (min-width: 768px) {
  .portal-page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
@media (max-width: 767.98px) {
  .portal-nav .container {
    flex-direction: column;
    align-items: center;
  }
  .portal-nav .container .btn {
    position: fixed;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow:
      0 0 20px rgba(255, 255, 255, 0.6),
      0 4px 12px rgba(0, 0, 0, 0.2);
  }
  .portal-page-title {
    text-align: center;
    width: 100%;
  }
}
.portal-content {
  padding: 2rem 0 4rem;
}
.portal-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.portal-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.portal-table th {
  text-align: left;
  color: #888;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #eee;
}
.portal-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f3f3f3;
  vertical-align: middle;
}
.portal-table tr:last-child td {
  border-bottom: none;
}
.portal-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}
.portal-badge.enrolled {
  background: #d8f3dc;
  color: #1b4332;
}
.portal-badge.waitlist {
  background: #fff3cd;
  color: #856404;
}
.portal-badge.learn {
  background: #e8f0fe;
  color: #1a73e8;
}
.portal-badge.pass {
  background: #d8f3dc;
  color: #1b4332;
}
.portal-badge.unlimited {
  background: #f3e8ff;
  color: #6b21a8;
}
.portal-badge.noplan {
  background: #fef2f2;
  color: #991b1b;
}
.portal-badge.member {
  background: #e8f0fe;
  color: #1a73e8;
}
.portal-empty {
  color: #aaa;
  font-size: 0.88rem;
}
.credit-chip {
  background: #e8f0fe;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a73e8;
}
/* membership buttons */
.membership-btn {
  background: #43b0f2;
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
}
.membership-btn:hover {
  background: #2a9de0;
  color: #000;
}
/* enrol modal */
.portal-modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
  align-items: center;
  justify-content: center;
}
.portal-modal-bg.open {
  display: flex;
}
.portal-modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.portal-modal-box h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.portal-modal-box .meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.4rem;
}
.portal-modal-box .status {
  font-size: 0.85rem;
  color: #444;
  margin-bottom: 1rem;
}
.portal-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.portal-modal-msg {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.75rem;
  min-height: 1.1rem;
}
