.portal-shell {
  max-width: 42rem;
  margin-inline: auto;
}

.portal-shell--wide {
  max-width: 72rem;
}

.portal-nav-link {
  white-space: nowrap;
}

.portal-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.portal-list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.portal-back {
  color: var(--brand-muted, #6c757d);
}

.portal-topbar .btn-link {
  color: var(--brand-muted, #6c757d);
}

.parent-space-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.parent-space-card--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.parent-space-card--link:hover,
.parent-space-card--link:focus-visible {
  color: inherit;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.parent-space-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.booking-fork-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.booking-fork-card--portal {
  background: linear-gradient(180deg, rgba(91, 124, 153, 0.08) 0%, #fff 40%);
}

.booking-fork-benefits {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.booking-fork-benefits li + li {
  margin-top: 0.35rem;
}

.portal-widget-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portal-widget-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.portal-promo-item {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.portal-promo-icon {
  font-size: 1.35rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.portal-register-promo {
  background: linear-gradient(180deg, rgba(91, 124, 153, 0.07) 0%, #fff 45%);
}

.portal-nav .nav-link.active {
  font-weight: 600;
  color: var(--brand-primary, #5b7c99);
}

.portal-course-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.15rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.portal-course-cover {
  width: 100%;
  border-radius: 0.75rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.portal-course-cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(91, 124, 153, 0.15), rgba(91, 124, 153, 0.05));
}

.portal-logo {
  font-size: 1.25rem;
}

.portal-service-package-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.portal-package-total {
  color: var(--brand-primary, #5b7c99);
}

.session-count-switch .btn {
  min-width: 3rem;
}

.portal-booking-services {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.portal-booking-service {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-booking-service:hover,
.portal-booking-service.is-selected {
  border-color: var(--brand-primary, #5b7c99);
  box-shadow: 0 0 0 1px rgba(91, 124, 153, 0.15);
}

.portal-booking-day + .portal-booking-day {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-booking-day-title {
  font-weight: 600;
  margin-bottom: 0.65rem;
  text-transform: capitalize;
}

.portal-booking-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
}

.portal-booking-slot {
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  margin: 0;
}

.portal-booking-slot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.portal-booking-slot:has(input:checked) {
  border-color: var(--brand-primary, #5b7c99);
  background: rgba(91, 124, 153, 0.08);
}

.portal-booking-slot-time {
  display: block;
  font-weight: 600;
}

.portal-booking-slot-meta {
  display: block;
  font-size: 0.78rem;
  color: #6c757d;
  margin-top: 0.15rem;
}

@media (max-width: 991.98px) {
  .portal-nav-link {
    padding-top: 0.35rem;
  }
}

.portal-app {
  margin: 0;
  min-height: 100vh;
  background: #f4f6f8;
  font-family: Roboto, system-ui, sans-serif;
}

.portal-app-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.portal-app-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-app-brand {
  flex: 0 1 auto;
  min-width: 0;
  text-decoration: none;
}

.portal-app-brand .site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.portal-app-brand .site-brand__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-app-header__tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.portal-app-brand-link {
  text-decoration: none;
  color: inherit;
}

.portal-app-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.portal-app-nav__link {
  color: #495057;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.portal-app-nav__link:hover {
  color: var(--brand-primary, #5b7c99);
  background: rgba(91, 124, 153, 0.08);
}

.portal-app-nav__link.is-active {
  color: var(--brand-primary, #5b7c99);
  font-weight: 600;
  background: rgba(91, 124, 153, 0.1);
}

.portal-app-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.portal-app-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 1.1rem;
}

.portal-app-cart:hover {
  background: rgba(0, 0, 0, 0.05);
}

.portal-app-cart__badge {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--brand-primary, #5b7c99);
  color: #fff;
  font-size: 0.65rem;
  line-height: 1.1rem;
  text-align: center;
}

.portal-app-account__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #495057;
  padding: 0;
}

.portal-app-account__toggle::after {
  display: none;
}

.portal-app-account__icon {
  display: block;
}

.portal-app-account__name {
  font-weight: 600;
  font-size: 0.9rem;
}

.portal-app-account__email {
  font-size: 0.78rem;
  color: #6c757d;
}

.portal-app-account__logout {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
}

.portal-app-action-link {
  color: #495057;
  text-decoration: none;
  font-size: 0.9rem;
}

.portal-app-action-link:hover {
  color: var(--brand-primary, #5b7c99);
}

.portal-app-main {
  padding: 1.25rem 0 2.5rem;
  width: 100%;
}

.portal-app-container {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

.portal-app-container.portal-app-container--wide {
  max-width: 72rem;
}

@media (min-width: 768px) {
  .portal-app-header__inner {
    flex-wrap: nowrap;
  }

  .portal-app-nav {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .portal-app-header__inner {
    flex-wrap: wrap;
    gap: 0;
    padding-top: 0.55rem;
    padding-bottom: 0;
  }

  .portal-app-brand {
    order: 1;
  }

  .portal-app-header__tools {
    order: 2;
    margin-left: auto;
  }

  .portal-app-nav {
    order: 3;
    flex: 0 0 100%;
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.15rem;
    padding: 0.45rem 0 0.55rem;
    margin-top: 0.45rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 2.5rem;
  }

  .portal-app-nav::-webkit-scrollbar {
    display: none;
  }

  .portal-app-nav__link {
    flex-shrink: 0;
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
  }
}

/* --- Auth pages (login / register) --- */
.portal-auth-page {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(91, 124, 153, 0.08) 0%, #f4f6f8 40%);
  font-family: Roboto, system-ui, sans-serif;
}

.portal-auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

.portal-auth-back {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  color: #6c757d;
  text-decoration: none;
  font-size: 0.9rem;
}

.portal-auth-back:hover {
  color: var(--brand-primary, #5b7c99);
}

.portal-auth-main {
  width: 100%;
  max-width: 26rem;
}

.portal-auth-brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.portal-auth-brand-link {
  text-decoration: none;
  color: inherit;
}

.portal-auth-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #6c757d;
}

.portal-auth-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 575.98px) {
  .portal-auth-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .portal-auth-back {
    top: 1rem;
    left: 1rem;
  }
}
