/* ==========================================================================
   PIER MASTERS - STUDENT ACCOUNT DASHBOARD & PORTAL STYLES
   ========================================================================== */

.pm-portal-container {
  padding: 3.5rem 0 5rem;
}

.pm-portal-header {
  background: linear-gradient(135deg, var(--pm-navy-900), var(--pm-navy-800));
  color: var(--pm-white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.pm-portal-user-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pm-portal-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: var(--pm-teal-500);
  color: var(--pm-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.pm-portal-user-details h2 {
  color: var(--pm-white);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.pm-portal-user-details p {
  color: #94a3b8;
  font-size: 0.9rem;
}

.pm-portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
}

.pm-portal-sidebar {
  background: var(--pm-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--pm-border);
  height: fit-content;
}

.pm-portal-nav {
  list-style: none;
}

.pm-portal-nav li {
  margin-bottom: 0.5rem;
}

.pm-portal-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--pm-navy-800);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.pm-portal-nav a:hover,
.pm-portal-nav a.active {
  background: var(--pm-teal-100);
  color: var(--pm-teal-600);
}

.pm-portal-content {
  background: var(--pm-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--pm-border);
}

.pm-portal-section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--pm-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Class Booking Card */
.pm-class-card {
  border: 1px solid var(--pm-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.pm-class-card.upcoming {
  border-left: 5px solid var(--pm-teal-500);
}

.pm-class-card.past {
  border-left: 5px solid #94a3b8;
  opacity: 0.9;
}

.pm-class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.pm-class-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.pm-class-badge.confirmed {
  background: #dcfce7;
  color: #15803d;
}

.pm-class-badge.rescheduled {
  background: #fef9c3;
  color: #854d0e;
}

.pm-class-badge.completed {
  background: #f1f5f9;
  color: #475569;
}

.pm-class-grid-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
  background: var(--pm-bg-light);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
}

.pm-detail-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--pm-text-muted);
  margin-bottom: 0.15rem;
}

.pm-detail-item strong {
  font-size: 0.95rem;
  color: var(--pm-navy-900);
}

.pm-class-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* Receipts Table */
.pm-receipts-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.pm-receipts-table th,
.pm-receipts-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--pm-border);
}

.pm-receipts-table th {
  background: var(--pm-bg-light);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--pm-navy-800);
}

.pm-receipts-table td {
  font-size: 0.925rem;
}

/* Printable Receipt / Modal */
@media print {
  body * {
    visibility: hidden;
  }
  .pm-printable-receipt, .pm-printable-receipt * {
    visibility: visible;
  }
  .pm-printable-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 2rem;
  }
}

@media (max-width: 900px) {
  .pm-portal-layout {
    grid-template-columns: 1fr;
  }
}
