/* ==========================================================================
   MORPHY CHESS ACADEMY - STUDENT PORTAL & CHECKOUT SYSTEM
   Matches 100% of the academy's official design system & typography tokens
   ========================================================================== */

/* Page Background & Spacing */
.portal-page {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
}

/* Hero Section */
.portal-hero {
  position: relative;
  width: 100%;
  padding: 150px 0 45px 0;
  background-color: var(--bg-primary);
  text-align: center;
}

.portal-hero-title {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.portal-hero-title strong {
  font-weight: 800;
  color: var(--chess-green);
}

.portal-hero-desc {
  font-size: var(--font-size-body-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto;
}

/* ==========================================================================
   AUTHENTICATION WIZARD CONTAINER (Exact match to contact-wizard-container)
   ========================================================================== */
.portal-auth-section {
  padding-bottom: var(--spacing-xxl);
  background-color: var(--bg-primary);
}

.portal-auth-container {
  background-color: #ffffff;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(28, 36, 52, 0.05), 0 5px 15px rgba(28, 36, 52, 0.02);
  border: 1px solid rgba(28, 36, 52, 0.06);
  border-radius: 28px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* Left Brand Panel: Warm ivory background with academy highlights */
.portal-auth-left {
  width: 44%;
  background-color: #FCF8F2;
  padding: 3.5rem 2.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(28, 36, 52, 0.05);
}

.portal-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(26, 54, 93, 0.08);
  color: var(--chess-green);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  width: fit-content;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.portal-auth-left-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.portal-auth-left-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.portal-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.portal-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.portal-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(28, 36, 52, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--chess-green);
  flex-shrink: 0;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.portal-feature-text h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.portal-feature-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.portal-auth-left-footer {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(28, 36, 52, 0.06);
}

/* Right Auth Form Panel */
.portal-auth-right {
  width: 56%;
  padding: 3.5rem 3rem;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Tab Switcher */
.portal-tab-pill-group {
  display: flex;
  background: var(--bg-surface);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 2rem;
  border: 1px solid rgba(28, 36, 52, 0.06);
}

.portal-tab-pill {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  font-family: var(--font-primary);
}

.portal-tab-pill.active {
  background: #ffffff;
  color: var(--chess-green);
  box-shadow: 0 4px 12px rgba(28, 36, 52, 0.08);
}

/* Form Groups & Inputs */
.portal-form-group {
  margin-bottom: 1.25rem;
}

.portal-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.portal-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-primary);
  transition: all var(--duration-fast) ease;
  box-sizing: border-box;
}

.portal-input:focus {
  outline: none;
  border-color: var(--chess-green);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.portal-btn-cta {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background-color: var(--chess-green);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 6px 20px rgba(26, 54, 93, 0.25);
  margin-top: 1.5rem;
}

.portal-btn-cta:hover {
  background-color: var(--chess-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(26, 54, 93, 0.35);
}

.portal-btn-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.portal-alert {
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: none;
}

.portal-alert.error {
  display: block;
  background-color: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #B91C1C;
}

.portal-alert.success {
  display: block;
  background-color: #F0FDF4;
  border: 1px solid #86EFAC;
  color: #15803D;
}

/* ==========================================================================
   STUDENT DASHBOARD PAGE STYLES
   ========================================================================== */

.dashboard-user-card {
  background-color: #ffffff;
  border: 1px solid rgba(28, 36, 52, 0.06);
  border-radius: 24px;
  padding: 2.2rem;
  box-shadow: 0 10px 35px rgba(28, 36, 52, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.dashboard-user-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.dashboard-user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #FCF8F2;
  border: 2px solid rgba(26, 54, 93, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.dashboard-user-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.dashboard-user-email {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.dashboard-user-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-secondary-pill {
  padding: 0.65rem 1.4rem;
  background: var(--bg-surface);
  border: 1px solid rgba(28, 36, 52, 0.08);
  border-radius: 999px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
}

.btn-secondary-pill:hover {
  background: var(--bg-surface-secondary);
  border-color: rgba(28, 36, 52, 0.16);
  transform: translateY(-2px);
}

/* Metric Row */
.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.dashboard-metric-card {
  background-color: #ffffff;
  border: 1px solid rgba(28, 36, 52, 0.06);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 8px 24px rgba(28, 36, 52, 0.03);
}

.dashboard-metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 0.4rem;
}

.dashboard-metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--chess-green);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.dashboard-metric-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: #F0FDF4;
  color: #15803D;
  border: 1px solid #DCFCE7;
}

/* Section Titles */
.portal-section-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Course Cards in Dashboard (matches website course cards) */
.dashboard-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.8rem;
  margin-bottom: 3.5rem;
}

.dashboard-course-card {
  background-color: #ffffff;
  border: 1px solid rgba(28, 36, 52, 0.08);
  border-radius: 22px;
  padding: 1.8rem;
  box-shadow: 0 10px 30px rgba(28, 36, 52, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--duration-fast) ease;
}

.dashboard-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(28, 36, 52, 0.07);
  border-color: rgba(26, 54, 93, 0.2);
}

.dashboard-course-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--chess-green);
  border: 1px solid rgba(26, 54, 93, 0.1);
  margin-bottom: 0.8rem;
}

.dashboard-course-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.dashboard-course-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.dashboard-course-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  padding: 0.8rem 0;
  border-top: 1px solid rgba(28, 36, 52, 0.06);
  margin-bottom: 1.2rem;
}

/* Enrollment Journey Progress Stepper */
.dashboard-stepper-card {
  background-color: #ffffff;
  border: 1px solid rgba(28, 36, 52, 0.06);
  border-radius: 22px;
  padding: 1.65rem 2rem;
  box-shadow: 0 10px 30px rgba(28, 36, 52, 0.03);
  margin-bottom: 2.25rem;
}

.stepper-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  position: relative;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  position: relative;
}

.stepper-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  background-color: #F1F5F9;
  color: #94A3B8;
  border: 2px solid #E2E8F0;
  transition: all 0.25s ease;
}

.stepper-item.completed .stepper-dot {
  background-color: #F0FDF4;
  color: #15803D;
  border-color: #86EFAC;
}

.stepper-item.active .stepper-dot {
  background-color: var(--chess-green);
  color: #ffffff;
  border-color: var(--chess-green);
  box-shadow: 0 4px 14px rgba(26, 54, 93, 0.25);
}

.stepper-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.stepper-item.completed .stepper-label {
  color: #15803D;
}

.stepper-item.active .stepper-label {
  color: var(--text-primary);
}

.stepper-sub {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* Trial & Admin Evaluation Card */
.dashboard-eval-card {
  background-color: #ffffff;
  border: 1px solid rgba(28, 36, 52, 0.08);
  border-radius: 24px;
  padding: 2rem 2.2rem;
  box-shadow: 0 12px 35px rgba(28, 36, 52, 0.04);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.dashboard-eval-card.status-completed {
  border: 1.5px solid rgba(26, 54, 93, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #FCF8F2 100%);
}

.dashboard-eval-left {
  flex: 1;
  min-width: 260px;
}

.dashboard-eval-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: 220px;
}

.eval-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.85rem;
}

.eval-status-pill.pending {
  background-color: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.eval-status-pill.ready {
  background-color: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.eval-status-pill.enrolled {
  background-color: #F0FDF4;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.eval-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(28, 36, 52, 0.06);
}

.eval-meta-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.eval-meta-item strong {
  color: var(--text-primary);
}

.eval-price-display {
  font-size: 2rem;
  font-weight: 800;
  color: var(--chess-green);
  line-height: 1.1;
}

.eval-price-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

/* Invoices Table Card */
.dashboard-table-card {
  background-color: #ffffff;
  border: 1px solid rgba(28, 36, 52, 0.06);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(28, 36, 52, 0.03);
  margin-bottom: 4rem;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dashboard-table th {
  padding: 1.1rem 1.5rem;
  background-color: #F8FAFC;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(28, 36, 52, 0.06);
}

.dashboard-table td {
  padding: 1.2rem 1.5rem;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(28, 36, 52, 0.05);
  color: var(--text-primary);
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.dashboard-table tr:hover td {
  background-color: #FAFBFD;
}

.status-badge-paid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #F0FDF4;
  color: #15803D;
  border: 1px solid #86EFAC;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Empty State Card */
.dashboard-empty-card {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background-color: #ffffff;
  border: 1.5px dashed rgba(28, 36, 52, 0.12);
  border-radius: 22px;
}

.dashboard-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* ==========================================================================
   PAYPAL CHECKOUT MODAL (Pixel-Perfect Match to Target Design)
   ========================================================================== */

.checkout-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity var(--duration-normal) var(--ease-out-quart);
}

.checkout-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.checkout-modal-card {
  background-color: #ffffff;
  width: 100%;
  max-width: 450px;
  border-radius: 28px;
  padding: 2.2rem 2.2rem 1.8rem 2.2rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  position: relative;
  transform: scale(0.96);
  transition: transform var(--duration-normal) var(--ease-expo);
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
  margin: auto;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.checkout-modal-card::-webkit-scrollbar {
  width: 4px;
}

.checkout-modal-card::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.1);
  border-radius: 4px;
}

.checkout-modal-backdrop.active .checkout-modal-card {
  transform: scale(1);
}

/* Decorative corner shapes matching Target Image 1 */
.checkout-decor-tl {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  pointer-events: none;
  z-index: 1;
}

.checkout-decor-br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 130px;
  height: 130px;
  pointer-events: none;
  z-index: 1;
}

.checkout-modal-content {
  position: relative;
  z-index: 2;
}

/* Close Button */
.checkout-modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-quart);
  z-index: 10;
}

.checkout-modal-close:hover {
  background-color: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

/* Shield Icon Badge */
.checkout-shield-badge {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem auto;
}

.checkout-modal-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.01em;
}

.checkout-modal-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin: 0 0 1.5rem 0;
}

/* Selected Program Box */
.checkout-program-box {
  background: #f0f7ff;
  border: 1.5px solid #dbeafe;
  border-radius: 18px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.checkout-program-tag {
  display: inline-block;
  background: #dbeafe;
  color: #0284c7;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.6px;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.checkout-program-details {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.checkout-program-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.checkout-program-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 4px;
}

.checkout-program-price {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Chess Piece Watermark inside box */
.checkout-watermark {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 80px;
  opacity: 0.12;
  pointer-events: none;
}

/* Button 1: Pay with PayPal */
.btn-pay-paypal-primary {
  width: 100%;
  height: 50px;
  background: #0070ba;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-primary, sans-serif);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 112, 186, 0.25);
}

.btn-pay-paypal-primary:hover {
  background: #005ea6;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 112, 186, 0.35);
}

.btn-pay-paypal-primary .paypal-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-pay-paypal-primary .btn-chevron-right {
  position: absolute;
  right: 1.4rem;
  display: flex;
  align-items: center;
}

/* OR Divider */
.checkout-or-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.1rem 0;
  width: 100%;
}

.checkout-or-divider::before,
.checkout-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #e2e8f0;
}

.checkout-or-divider span {
  padding: 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Button 2: Debit or Credit Card */
.btn-pay-card-secondary {
  width: 100%;
  height: 50px;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  font-family: var(--font-primary, sans-serif);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  transition: all 0.2s ease;
}

.btn-pay-card-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Footer Trust Badges */
.checkout-footer-meta {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.checkout-powered-by {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.checkout-trust-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-size: 0.76rem;
  color: #64748b;
}

.checkout-trust-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.checkout-trust-divider {
  color: #cbd5e1;
}

/* ==========================================================================
   RESPONSIVE SYSTEM: TABLET & MOBILE VIEWPORTS
   ========================================================================== */

/* Tablet (iPad Mini, iPad Air, 768px - 992px) */
@media (max-width: 992px) {
  .portal-auth-container {
    max-width: 720px;
  }
  .portal-auth-left {
    padding: 2.8rem 2rem;
  }
  .portal-auth-right {
    padding: 2.8rem 2.2rem;
  }
  .dashboard-metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
  }
  .dashboard-course-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.4rem;
  }
}

/* Mobile & Small Tablets (≤ 860px) */
@media (max-width: 860px) {
  .portal-hero {
    padding: 120px 0 35px 0;
  }
  .portal-hero-title {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
  }
  .portal-auth-container {
    flex-direction: column;
    max-width: 520px;
    border-radius: 22px;
  }
  .portal-auth-left {
    width: 100%;
    padding: 2.2rem 1.8rem;
    border-right: none;
    border-bottom: 1px solid rgba(28, 36, 52, 0.06);
  }
  .portal-auth-right {
    width: 100%;
    padding: 2.2rem 1.8rem;
  }
  .dashboard-user-card {
    padding: 1.8rem 1.5rem;
  }
  .dashboard-user-name {
    font-size: 1.4rem;
  }
  .dashboard-stepper-card {
    padding: 1.4rem 1.25rem;
  }
  .dashboard-eval-card {
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .dashboard-eval-right {
    width: 100%;
    align-items: flex-start;
    border-top: 1px solid rgba(28, 36, 52, 0.06);
    padding-top: 1rem;
  }
}

/* Mobile Devices (iPhone SE, iPhone 12/13/14, Android ≤ 480px) */
@media (max-width: 480px) {
  .portal-hero {
    padding: 105px 0 25px 0;
  }
  .portal-hero-desc {
    font-size: 0.88rem;
    padding: 0 0.5rem;
  }
  .portal-auth-section {
    padding-bottom: 3.5rem;
  }
  .portal-auth-container {
    border-radius: 18px;
    margin: 0 auto;
  }
  .portal-auth-left {
    padding: 1.8rem 1.25rem;
  }
  .portal-auth-right {
    padding: 1.8rem 1.25rem;
  }
  .portal-auth-left-title {
    font-size: 1.35rem;
  }
  .portal-tab-pill {
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
  }
  .portal-input {
    padding: 0.75rem 0.95rem;
    font-size: 0.9rem;
  }
  .portal-btn-cta {
    padding: 0.85rem 1.2rem;
    font-size: 0.9rem;
  }

  /* Dashboard mobile adjustments */
  .dashboard-user-card {
    padding: 1.4rem 1.1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-user-left {
    width: 100%;
    gap: 1rem;
  }
  .dashboard-user-avatar {
    width: 58px;
    height: 58px;
    font-size: 1.8rem;
    border-radius: 16px;
  }
  .dashboard-user-name {
    font-size: 1.25rem;
  }
  .dashboard-user-email {
    font-size: 0.82rem;
    word-break: break-all;
  }
  .dashboard-user-actions {
    width: 100%;
    display: flex;
    gap: 0.6rem;
  }
  .dashboard-user-actions .btn-secondary-pill {
    flex: 1;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }
  .dashboard-metrics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }
  .dashboard-metric-card {
    padding: 1.4rem;
  }
  .dashboard-metric-value {
    font-size: 1.8rem;
  }
  .dashboard-course-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .dashboard-course-card {
    padding: 1.4rem 1.2rem;
    border-radius: 18px;
  }
  .dashboard-stepper-card {
    padding: 1.2rem 1rem;
    border-radius: 18px;
  }
  .stepper-track {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .stepper-item {
    flex-direction: row;
    text-align: left;
    gap: 0.75rem;
  }
  .stepper-dot {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }
  .dashboard-eval-card {
    padding: 1.3rem 1.1rem;
    border-radius: 18px;
  }
  .dashboard-eval-left {
    min-width: 0;
  }
  .eval-price-display {
    font-size: 1.65rem;
  }

  /* Table Container horizontal touch scroll */
  .dashboard-table-card {
    border-radius: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dashboard-table {
    min-width: 560px;
  }
  .dashboard-table th,
  .dashboard-table td {
    padding: 0.9rem 1.1rem;
    font-size: 0.82rem;
  }

  /* ========================================
     PAYPAL CHECKOUT MODAL MOBILE VIEWPORT
     (Matches iPhone SE 375px & Galaxy S 360px)
     ======================================== */
  .checkout-modal-backdrop {
    padding: 1rem 0.5rem;
  }
  .checkout-modal-card {
    padding: 1.6rem 1.25rem 1.35rem 1.25rem;
    border-radius: 24px;
    max-width: 360px;
  }
  .checkout-shield-badge {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    margin-bottom: 0.75rem;
  }
  .checkout-shield-badge svg {
    width: 28px;
    height: 30px;
  }
  .checkout-modal-title {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
  }
  .checkout-modal-subtitle {
    font-size: 0.78rem;
    margin-bottom: 1.1rem;
    line-height: 1.35;
  }
  .checkout-modal-close {
    top: 0.85rem;
    right: 0.85rem;
    width: 30px;
    height: 30px;
  }

  /* Program Box Mobile: Title & Price never overlap or truncate */
  .checkout-program-box {
    padding: 0.95rem 1rem;
    border-radius: 15px;
    margin-bottom: 1.15rem;
  }
  .checkout-program-tag {
    font-size: 0.62rem;
    padding: 2px 6px;
    margin-bottom: 0.35rem;
  }
  .checkout-program-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }
  .checkout-program-title {
    font-size: 1.08rem;
  }
  .checkout-program-sub {
    font-size: 0.75rem;
    margin-top: 2px;
  }
  .checkout-program-price {
    font-size: 1.25rem;
    font-weight: 800;
  }
  .checkout-watermark {
    width: 44px;
    height: 60px;
    right: 4px;
    opacity: 0.08;
  }

  /* Buttons on Mobile */
  .btn-pay-paypal-primary {
    height: 46px;
    font-size: 0.9rem;
    padding: 0 1.1rem;
  }
  .btn-pay-paypal-primary .btn-chevron-right {
    right: 1.1rem;
  }
  .btn-pay-card-secondary {
    height: 46px;
    font-size: 0.88rem;
  }
  .checkout-or-divider {
    margin: 0.85rem 0;
  }

  /* Trust footer on Mobile */
  .checkout-footer-meta {
    margin-top: 1rem;
    gap: 0.55rem;
  }
  .checkout-powered-by {
    font-size: 0.72rem;
  }
  .checkout-trust-pills {
    gap: 0.6rem;
    font-size: 0.68rem;
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.3;
  }
}

/* Very Short Viewport Heights (e.g. landscape or small devices ≤ 680px height) */
@media (max-height: 680px) {
  .checkout-modal-backdrop {
    padding: 0.5rem;
  }
  .checkout-modal-card {
    padding: 1.2rem 1.2rem 1rem 1.2rem;
  }
  .checkout-shield-badge {
    width: 44px;
    height: 44px;
    margin-bottom: 0.5rem;
  }
  .checkout-shield-badge svg {
    width: 24px;
    height: 26px;
  }
  .checkout-modal-title {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
  }
  .checkout-modal-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0.85rem;
  }
  .checkout-program-box {
    padding: 0.8rem 1rem;
    margin-bottom: 0.85rem;
  }
  .btn-pay-paypal-primary,
  .btn-pay-card-secondary {
    height: 42px;
    font-size: 0.85rem;
  }
  .checkout-or-divider {
    margin: 0.55rem 0;
  }
  .checkout-footer-meta {
    margin-top: 0.8rem;
  }
}

/* ==========================================================================
   OFFICIAL BILLING CYCLE SEGMENTED TOGGLE (Matches Exact Image 1 Design)
   Monthly | Quarterly (Save 5%) | Half Yearly (Save 10%) | Yearly (Save 15%)
   ========================================================================== */
.course-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
  width: 100%;
}

.course-card-header .course-tag {
  margin-bottom: 0 !important;
}

.billing-toggle-wrapper {
  display: inline-flex;
  position: relative;
  padding-top: 6px; /* headroom for top-floating discount badges */
}

.billing-toggle-group {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 9999px;
  padding: 3px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.billing-toggle-btn {
  position: relative;
  background: transparent;
  border: none;
  outline: none;
  padding: 5px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  user-select: none;
  text-decoration: none;
}

.billing-toggle-btn + .billing-toggle-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background-color: #e2e8f0;
  transition: opacity 0.2s ease;
}

.billing-toggle-btn.active::before,
.billing-toggle-btn.active + .billing-toggle-btn::before {
  opacity: 0;
}

.billing-toggle-btn:hover:not(.active) {
  color: #0f172a;
  background: rgba(241, 245, 249, 0.8);
}

.billing-toggle-btn.active {
  background: #0062e0;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 98, 224, 0.28);
}

.save-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: #dcfce7;
  color: #15803d;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Effective monthly rate indicator beneath main price */
.course-price-wrap {
  display: flex;
  flex-direction: column;
}

.course-effective-rate {
  font-size: 0.74rem;
  font-weight: 700;
  color: #16a34a;
  margin-top: 2px;
}

/* Dashboard Evaluation Card Toggle */
.dashboard-eval-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 640px) {
  .course-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .billing-toggle-wrapper {
    width: 100%;
  }
  .billing-toggle-group {
    width: 100%;
    justify-content: space-between;
  }
  .billing-toggle-btn {
    flex: 1;
    padding: 5px 6px;
    font-size: 0.72rem;
    text-align: center;
  }
  .save-badge {
    font-size: 0.52rem;
    padding: 0.5px 4px;
    top: -9px;
  }
}


