/**
 * Profile panel minimum heights — avoids layout shift while CSS loads.
 */
#Profile .vip__article-content {
  flex-direction: column;
}

#Profile .vip__article-link {
  margin-top: auto;
}

#Profile .ai-license-modal__close {
  margin-right: auto !important;
  margin-left: 0 !important;
}

#Profile {
  min-height: calc(100vh - 200px);
}

/* Keep main panel beside sidebar (fixes broken markup / full-width bleed) */
#Profile .profile__container > section.Profile_Section,
#Profile .profile__container > .Profile_Section {
  position: relative;
  width: 100%;
}

@media (min-width: 992px) {
  #Profile .profile__container > section.col-lg-9,
  #Profile .profile__container > .col-lg-9.Profile_Section {
    flex: 0 0 auto;
   
  }

  #Profile .profile__container > .col-lg-3 {
    flex: 0 0 auto;
   
  }

  /*
   * A profile page may use a bespoke content surface (for example the AI VIP
   * dashboard) instead of .Profile_Section.  It still participates in the
   * one shared dashboard shell and must occupy the main grid area.
   */
  #Profile .profile__container > .profile-panel__content {
    grid-area: main;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
  }
}

.profile__right {
  min-height: 32rem;
}

.Profile_Section {
  min-height: 24rem;
}

@media (max-width: 991.98px) {
  #Profile {
    min-height: calc(100vh - 160px);
  }

  .profile__right {
    min-height: auto;
  }
}

/* Dashboard: summary only; installment details stay on the management page. */
.installment-dashboard-reminder {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(126, 34, 206, 0.2);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.96), #fff 65%);
  box-shadow: 0 12px 30px rgba(88, 28, 135, 0.08);
  direction: rtl;
}

.installment-dashboard-reminder__icon {
  display: inline-flex;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  font-size: 2.4rem;
  box-shadow: 0 8px 18px rgba(126, 34, 206, 0.24);
}

.installment-dashboard-reminder__content {
  flex: 1 1 auto;
  min-width: 0;
}

.installment-dashboard-reminder__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #7e22ce;
  font-size: 1.2rem;
  font-weight: 800;
}

.installment-dashboard-reminder__content h3 {
  margin: 0 0 7px;
  color: #1f2937;
  font-size: 1.7rem;
  font-weight: 800;
}

.installment-dashboard-reminder__content p {
  margin: 0;
  color: #64748b;
  font-size: 1.3rem;
  line-height: 1.9;
}

.installment-dashboard-reminder__action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #fff !important;
  background: #7e22ce;
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none !important;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.installment-dashboard-reminder__action:hover {
  color: #fff;
  background: #6b21a8;
  transform: translateY(-2px);
}

.installment-dashboard-reminder--overdue {
  border-color: rgba(220, 38, 38, 0.32);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.96), #fff 65%);
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.12);
}

.installment-dashboard-reminder--overdue .installment-dashboard-reminder__icon,
.installment-dashboard-reminder--overdue .installment-dashboard-reminder__action {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.installment-dashboard-reminder--overdue .installment-dashboard-reminder__eyebrow,
.installment-dashboard-reminder--overdue .installment-dashboard-reminder__content h3 {
  color: #b91c1c;
}

.installment-dashboard-reminder--overdue .installment-dashboard-reminder__action:hover {
  background: #991b1b;
}

html[data-theme="dark"] .installment-dashboard-reminder,
body.dark-mode .installment-dashboard-reminder {
  border-color: rgba(192, 132, 252, 0.24);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.2), rgba(20, 24, 33, 0.98) 65%);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .installment-dashboard-reminder--overdue,
body.dark-mode .installment-dashboard-reminder--overdue {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(20, 24, 33, 0.98) 65%);
}

html[data-theme="dark"] .installment-dashboard-reminder--overdue .installment-dashboard-reminder__eyebrow,
body.dark-mode .installment-dashboard-reminder--overdue .installment-dashboard-reminder__eyebrow {
  color: #fca5a5;
}

html[data-theme="dark"] .installment-dashboard-reminder__content h3,
body.dark-mode .installment-dashboard-reminder__content h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .installment-dashboard-reminder__content p,
body.dark-mode .installment-dashboard-reminder__content p {
  color: #cbd5e1;
}

html[data-theme="dark"] .installment-dashboard-reminder__eyebrow,
body.dark-mode .installment-dashboard-reminder__eyebrow {
  color: #d8b4fe;
}

@media (max-width: 767.98px) {
  .installment-dashboard-reminder {
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    flex-wrap: wrap;
  }

  .installment-dashboard-reminder__icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 2rem;
  }

  .installment-dashboard-reminder__content {
    flex-basis: calc(100% - 60px);
  }

  .installment-dashboard-reminder__content h3 {
    font-size: 1.5rem;
  }

  .installment-dashboard-reminder__action {
    width: 100%;
  }
}

.installment-access-notice {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: inherit;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.94);
  text-align: center;
  opacity: 1;
  backdrop-filter: blur(3px);
}

.installment-access-notice__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #be123c);
  font-size: 1.8rem;
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.3);
}

.installment-access-notice strong {
  color: #fff;
  font-size: 1.6rem;
  line-height: 1.8;
}

.installment-access-notice p {
  max-width: 560px;
  margin: 0;
  color: #dbe4f0;
  font-size: 1.3rem;
  line-height: 1.9;
}

.installment-access-notice__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 3px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  color: #fff !important;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.installment-access-notice__action:hover {
  color: #fff;
  background: linear-gradient(135deg, #6d28d9, #7e22ce);
}

html[data-theme="dark"] .installment-access-notice,
body.dark-mode .installment-access-notice {
  color: #f8fafc;
  background: rgba(5, 9, 16, 0.95);
}

@media (max-width: 575.98px) {
  .installment-access-notice {
    gap: 7px;
    padding: 14px;
  }

  .installment-access-notice__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.6rem;
  }

  .installment-access-notice strong {
    font-size: 1.4rem;
  }

  .installment-access-notice p,
  .installment-access-notice__action {
    font-size: 1.2rem;
  }
}
