/* Student portal — account dashboard + auth form helpers */

.student-portal-page {
  padding-bottom: 3rem;
}

/* Shell pages: content sits in admin-shell-main (no marketing container) */
.student-shell-page .student-portal-page {
  max-width: 1100px;
}

.student-dashboard-page .student-portal-page,
.student-dashboard-page .student-dashboard {
  max-width: none;
  width: 100%;
}

.student-shell-page .page-header h1 {
  color: var(--flceo-primary, #1a365d);
}

.student-shell-page a.card {
  color: inherit;
}

.student-shell-page a.card:hover {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.08) !important;
}

.student-auth-panel {
  max-width: 520px;
  margin: 0 auto;
}

.student-auth-panel--wide {
  max-width: 720px;
}

.student-auth-panel .form-label {
  font-weight: 600;
}

.account-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .account-grid--two {
    grid-template-columns: 1fr 1fr;
  }
}

.account-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.2;
}

.account-badge--verified {
  background: color-mix(in srgb, var(--theme-success, var(--flceo-success, #27ae60)) 18%, #fff);
  border-color: color-mix(in srgb, var(--theme-success, var(--flceo-success, #27ae60)) 35%, #fff);
  color: var(--theme-text, #212529);
}

.account-badge--pending {
  background: var(--theme-alert-warning-bg, #fff3cd);
  border-color: color-mix(in srgb, var(--theme-warning, #f39c12) 40%, #fff);
  color: var(--theme-alert-warning-text, #664d03);
}

.account-badge--active {
  background: var(--theme-success, var(--flceo-success, #27ae60));
  border-color: color-mix(in srgb, var(--theme-success, var(--flceo-success, #27ae60)) 82%, #000);
  color: var(--theme-badge-success-text, #fff);
}

.account-badge--cancelled {
  background: color-mix(in srgb, var(--theme-danger, var(--flceo-danger, #e74c3c)) 15%, #fff);
  border-color: color-mix(in srgb, var(--theme-danger, var(--flceo-danger, #e74c3c)) 35%, #fff);
  color: var(--theme-text, #212529);
}

.account-badge--removed {
  background: color-mix(in srgb, var(--theme-secondary, var(--flceo-text-muted, #6c757d)) 15%, #fff);
  border-color: color-mix(in srgb, var(--theme-secondary, var(--flceo-text-muted, #6c757d)) 30%, #fff);
  color: var(--theme-text, #212529);
}

.account-courses-grid .course-card {
  height: 100%;
}

.account-courses-grid .course-card-header .account-badge {
  flex-shrink: 0;
}

.account-empty {
  color: var(--flceo-text-muted, #6c757d);
  font-size: 0.9375rem;
  margin: 0;
}

.account-table {
  margin-bottom: 0;
}

.account-table th {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--flceo-text-muted, #6c757d);
}

.account-table td {
  vertical-align: middle;
}

/* --- Student license cards (account page) — compact metrics aligned with admin mc-card --- */
.student-license-state-group {
  background: var(--theme-surface, var(--flceo-bg-white, #fff));
  border: 1px solid var(--flceo-border-light, var(--theme-border, #dee2e6));
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.student-license-state-group + .student-license-state-group {
  margin-top: 0;
}

.student-license-state-group__summary {
  align-items: center;
  background: var(--flceo-bg-muted, var(--theme-bg, #f8f9fa));
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  list-style: none;
  padding: 0.55rem 0.85rem;
  user-select: none;
}

.student-license-state-group__summary::-webkit-details-marker {
  display: none;
}

.student-license-state-group__summary:focus {
  outline: none;
}

.student-license-state-group__summary:focus-visible {
  outline: 2px solid var(--theme-primary, var(--flceo-accent, #e67e22));
  outline-offset: -2px;
}

.student-license-state-group[open] > .student-license-state-group__summary {
  border-bottom: 1px solid var(--flceo-border-light, var(--theme-border, #dee2e6));
}

.student-license-state-group__summary-leading {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.student-license-state-group__chevron {
  color: var(--flceo-text-muted, var(--theme-text-muted, #6c757d));
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.student-license-state-group[open] > .student-license-state-group__summary .student-license-state-group__chevron {
  transform: rotate(180deg);
}

.student-license-state-group__title {
  color: var(--flceo-text, var(--theme-text, #2c3e50));
  font-size: 0.875rem;
  font-weight: 700;
}

.student-license-state-group__count {
  color: var(--flceo-text-muted, var(--theme-text-muted, #6c757d));
  font-size: 0.75rem;
  font-weight: 500;
}

.student-license-state-group__body {
  padding: 0.75rem;
}

.student-license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 360px));
  gap: 1rem;
  justify-content: start;
  padding: 0.5rem 0;
}

.student-license-card {
  background: var(--theme-surface, var(--flceo-bg-white, #fff));
  height: 100%;
  border: 1px solid var(--flceo-border-light, var(--theme-border, #dee2e6));
  border-radius: var(--flceo-radius-lg, 0.75rem);
  border-left: 4px solid var(--theme-admin-band-start, var(--flceo-accent, #e67e22));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.student-license-card__header {
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--theme-admin-band-start, var(--flceo-accent)) 0%,
    var(--theme-admin-band-end, var(--flceo-accent-dark)) 100%
  );
  color: var(--theme-admin-band-text, var(--theme-accent-btn-text, #fff));
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
}

.student-license-card__title {
  color: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
  word-break: break-word;
}

.student-license-card__header :is(i, .text-muted, small),
.student-license-modal__header :is(i, .text-muted, small, .modal-title, .student-license-modal__subtitle) {
  color: var(--theme-admin-band-text, var(--theme-accent-btn-text, #fff)) !important;
}

.student-license-card__header :is(.text-muted, small) {
  opacity: 0.82;
}

.student-license-card__header a:not(.btn),
.student-license-modal__header a:not(.btn) {
  color: var(--theme-admin-band-text, var(--theme-accent-btn-text, #fff));
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.student-license-card__header a:not(.btn):hover,
.student-license-modal__header a:not(.btn):hover {
  color: var(--theme-admin-band-text, var(--theme-accent-btn-text, #fff));
  opacity: 0.88;
}

.student-license-card__body {
  padding: 0.5rem 0.85rem;
}

.student-license-card__row {
  align-items: flex-start;
  border-bottom: 1px solid var(--flceo-border-light, #e9ecef);
  display: flex;
  font-size: 0.85rem;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.student-license-card__row:last-child {
  border-bottom: none;
}

.student-license-card__label {
  color: var(--flceo-text-muted, var(--theme-text-muted, #6c757d));
  flex-shrink: 0;
  font-weight: 500;
  min-width: 40%;
}

.student-license-card__value {
  color: var(--flceo-text, var(--theme-text, #2c3e50));
  font-size: 0.875rem;
  min-width: 0;
  text-align: right;
  word-break: break-word;
}

.student-license-card__board {
  border-top: 1px solid var(--flceo-border-light, #e9ecef);
  margin-top: 0.4rem;
  padding-top: 0.4rem;
}

.student-license-card__board-label {
  color: var(--flceo-text-muted, var(--theme-text-muted, #6c757d));
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.student-license-card__actions {
  background: var(--flceo-bg-muted, var(--theme-bg, #f8f9fa));
  border-top: 1px solid var(--flceo-border-light, #dee2e6);
  display: flex;
  justify-content: flex-end;
  padding: 0.55rem 0.85rem;
}

.student-license-card__actions .btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

@media (max-width: 575.98px) {
  .student-license-grid {
    gap: 0.75rem;
  }

  .student-license-state-group__body {
    padding: 0.65rem;
  }
}

.account-licenses-section__header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

/* --- Add license modal (student account) --- */
.student-license-modal .modal-content {
  background: var(--theme-surface, #fff);
  border: none;
  overflow: hidden;
}

.student-license-modal__header {
  background: linear-gradient(
    135deg,
    var(--theme-admin-band-start, var(--flceo-accent)) 0%,
    var(--theme-admin-band-end, var(--flceo-accent-dark)) 100%
  );
  border-bottom: none;
  color: var(--theme-admin-band-text, var(--theme-accent-btn-text, #fff));
}

.student-license-modal__header .modal-title,
.student-license-modal__subtitle {
  color: var(--theme-admin-band-text, var(--theme-accent-btn-text, #fff)) !important;
}

.student-license-modal__subtitle {
  opacity: 0.92;
}

.student-license-modal .modal-body {
  background: var(--theme-surface, #fff);
}

.student-license-modal .modal-footer {
  background: var(--flceo-bg-muted, var(--theme-bg, #f8f9fa));
  border-top: 1px solid var(--flceo-border-light, #dee2e6);
}

.student-license-modal .license-lookup-status {
  min-height: 1.25rem;
}

#editContactModal .modal-dialog {
  max-width: 560px;
}

/* --- Student portal footer (logged-in learners) --- */
.portal-footer {
  background: var(--flceo-bg-white, var(--theme-surface, #fff));
  border-top: 1px solid var(--flceo-border, var(--theme-border, #dee2e6));
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--flceo-text-muted, var(--theme-text-muted, #6c757d));
}

.portal-footer a {
  color: var(--flceo-primary, var(--theme-primary-start, #667eea));
  text-decoration: none;
  font-weight: 500;
}

.portal-footer a:hover {
  text-decoration: underline;
}

.portal-footer .footer-links a {
  color: var(--flceo-text-muted, var(--theme-text-muted, #6c757d));
  margin: 0 0.75rem;
  transition: color 0.2s;
}

.portal-footer .footer-links a:hover {
  color: var(--flceo-primary, var(--theme-primary-start, #667eea));
}

.portal-footer__badge {
  background: var(--flceo-primary, var(--theme-primary-start, #667eea));
  color: var(--theme-primary-btn-text, var(--theme-btn-text, #fff));
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 767.98px) {
  .portal-footer .footer-links {
    width: 100%;
    text-align: center;
  }

  .portal-footer .footer-links a {
    display: inline-block;
    margin: 0.25rem 0.5rem;
  }
}

/* Correspondence My Courses cards — don't force equal-width flex on many actions */
.course-card .course-actions--correspondence {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.course-card .course-actions--correspondence .course-actions__primary {
  flex: none;
  width: 100%;
  justify-content: center;
}

.course-card .course-actions--correspondence .course-actions__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-card .course-actions--correspondence .course-actions__secondary .btn {
  flex: 1 1 auto;
  min-width: 8.5rem;
  justify-content: center;
}

.course-card .course-actions--correspondence .course-actions__secondary form {
  flex: 1 1 auto;
  min-width: 8.5rem;
  margin: 0;
}

.course-card .course-actions--correspondence .course-actions__secondary form .btn {
  width: 100%;
}

/* Dashboard: no floating bubble — use sidebar/footer “Chat with support” */
body.student-dashboard-page .flceo-lc-launcher,
body.student-dashboard-page #flceoLcLauncher {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.student-dashboard-metrics .student-metric-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: 100%;
  padding: 1rem 1.1rem;
  background: var(--theme-surface, #fff);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  color: #212529;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.student-dashboard-metrics .student-metric-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  color: #212529;
}

.student-metric-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--flceo-accent, #9b2335) 12%, #fff);
  color: var(--flceo-accent, #9b2335);
  flex-shrink: 0;
}

.student-metric-card__label {
  font-size: 0.8rem;
  color: #495057;
}

.student-metric-card__value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.15;
  color: #1a1a1a;
}

.student-dashboard-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--flceo-border-light, #eee);
}

.student-dashboard-list__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.student-dashboard-list__item:first-child {
  padding-top: 0;
}

.student-dashboard-list__main {
  min-width: 0;
}

.student-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0;
  color: var(--flceo-text-muted, #6c757d);
}

.student-checklist__item.is-done {
  color: var(--flceo-success, #198754);
}

.student-checklist__item i {
  margin-top: 0.15rem;
}

.student-checklist__label a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

