:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #10b981;
  --bg: #f0fdf4;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  margin: 0;
  color: var(--text);
  overflow-x: hidden;
  max-width: 100%;
}

.student-login-body {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #065f46, #10b981);
  padding: 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.login-page-wrap {
  width: 100%;
  max-width: min(520px, 100%);
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
}

.academy-banner-login {
  display: none;
}

.student-login-body .login-card {
  border-radius: 16px;
  margin-top: 0;
}

.login-card {
  background: var(--card);
  border-radius: 16px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.login-header { text-align: center; margin-bottom: 2rem; }

.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}

.login-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.25rem; }
.login-header p { color: var(--muted); margin: 0; font-size: 0.9rem; }

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 2.85rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.15rem 0.35rem;
  line-height: 1;
  cursor: pointer;
}

.password-toggle-btn:hover {
  color: var(--primary-dark);
}

.login-hint {
  font-size: 0.82rem;
  color: var(--muted);
  background: #ecfdf5;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover { color: var(--primary-dark); }

.forgot-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s;
}
.forgot-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.btn-success {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-success:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Dashboard */
.student-body { background: var(--bg); min-height: 100vh; }

.portal-intro {
  background: var(--card);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

.portal-intro-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.portal-intro--with-photo .portal-intro-layout {
  justify-content: space-between;
}

.portal-intro--with-photo .academy-banner-inner {
  text-align: left;
}

.portal-intro .academy-banner-inner {
  text-align: center;
}

.academy-banner-inner {
  flex: 1;
  min-width: 0;
}

.academy-banner:not(.academy-banner-login) {
  display: none;
}

.student-header {
  background: linear-gradient(135deg, #065f46, #10b981);
  color: #fff;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.student-header h1,
.student-portal-title {
  font-size: 1.15rem;
  margin: 0;
  font-weight: 700;
}

.student-header p {
  margin: 0.15rem 0 0;
  opacity: 0.9;
  font-size: 0.85rem;
}

.student-main { max-width: 900px; margin: 0 auto; padding: 1.5rem; }

.profile-card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

.profile-card-title {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.academy-banner-inner i {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.academy-banner-inner h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.academy-banner-inner p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.profile-photo-wrap {
  flex-shrink: 0;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ecfdf5;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.15);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.profile-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.profile-item span {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.attendance-card {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

.attendance-card .date-badge {
  display: inline-block;
  background: #ecfdf5;
  color: var(--primary-dark);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.today-status-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.mark-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 1rem auto;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.35);
}

.mark-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.mark-btn:disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

.mark-btn i { font-size: 2rem; }

.status-done {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 1.1rem;
}

.history-card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.history-card h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.att-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.att-table th,
.att-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.att-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }

.badge-present { background: #dcfce7; color: #166534; }
.badge-late { background: #fef9c3; color: #854d0e; }
.badge-absent { background: #fee2e2; color: #991b1b; }
.badge-leave { background: #e0e7ff; color: #3730a3; }

.att-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.att-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.att-pill strong { font-weight: 700; font-size: 0.95rem; }
.att-pill-present { background: #dcfce7; color: #166534; }
.att-pill-late    { background: #fef9c3; color: #854d0e; }
.att-pill-absent  { background: #fee2e2; color: #991b1b; }
.att-pill-leave   { background: #e0e7ff; color: #3730a3; }
.att-pill-total   { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.15);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

@media (max-width: 576px) {
  .student-login-body {
    padding: 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    justify-content: center;
    align-items: center;
  }

  .login-page-wrap {
    width: 100%;
    max-width: 100%;
  }

  .login-card {
    padding: 1.35rem 1.15rem;
    border-radius: 14px;
  }

  .login-header h1 {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  .login-header p {
    font-size: 0.85rem;
  }

  .auth-tab {
    font-size: 0.8rem;
    padding: 0.5rem 0.35rem;
  }

  .student-main { padding: 1rem; }
  .attendance-card { padding: 1.5rem 1rem; }
  .portal-intro-layout {
    flex-direction: column;
    text-align: center;
  }
  .portal-intro--with-photo .academy-banner-inner {
    text-align: center;
  }
}

/* ===== Sidebar-based Portal Shell ===== */
.portal-shell {
  background: var(--bg);
  min-height: 100vh;
  margin: 0;
}

.portal-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.25s ease;
}

.portal-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 1rem;
}

.portal-sidebar-brand i {
  font-size: 1.75rem;
  color: rgba(255,255,255,0.95);
}

.portal-sidebar-brand strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.portal-sidebar-brand small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
}

.portal-sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.75rem;
  overflow-y: auto;
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.portal-nav-link i {
  font-size: 1.05rem;
  width: 20px;
}

.portal-nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.portal-nav-link.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 600;
}

.portal-sidebar .btn-logout {
  margin: 1rem 1.25rem 0;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.portal-sidebar .btn-logout:hover {
  background: rgba(255,255,255,0.15);
}

.portal-main {
  margin-left: 260px;
  padding: 1.5rem 2rem 3rem;
  min-height: 100vh;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.portal-topbar-info h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

.portal-topbar-info p {
  font-size: 0.85rem;
}

.portal-topbar-right .profile-chip {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.portal-section {
  animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Overview cards */
.overview-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  border-left: 4px solid var(--primary);
}

.overview-card-success { border-left-color: #16a34a; }
.overview-card-warning { border-left-color: #f59e0b; }

.overview-card .overview-icon {
  width: 38px;
  height: 38px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--primary-dark);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.overview-card strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.overview-card small {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Courses list */
.courses-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.course-card-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  background: #fff;
}

.course-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.course-card-body {
  flex: 1;
}

.course-card-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.course-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.course-detail-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(5,150,105,0.08), rgba(16,185,129,0.05));
  border-radius: 12px;
}

.course-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.course-detail-hero h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.cd-image {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.12);
}

.cd-skills {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.cd-skills-label {
  display: block;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.cd-skills-label i {
  margin-right: 0.4rem;
}

.cd-skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cd-skills-chips .skill-chip {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== My Courses card ===== */
.my-course-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.my-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.12);
}

.my-course-thumb {
  width: 100%;
  height: 100%;
  min-height: 160px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.my-course-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: var(--primary-dark, #047857);
  font-size: 3rem;
}

.my-course-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.my-course-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.my-course-header h4 {
  color: #0f172a;
  font-weight: 700;
  font-size: 1.2rem;
}

.my-course-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.my-course-desc {
  color: #64748b;
  font-size: 0.92rem;
  margin: 0;
}

.my-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: #475569;
  font-size: 0.85rem;
}

.my-course-meta span i {
  color: var(--primary, #059669);
  margin-right: 0.25rem;
}

.my-course-status {
  background: #fef3c7;
  color: #92400e;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-weight: 500;
}

.my-course-progress-wrap {
  margin-top: 0.4rem;
}

.my-course-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 0.3rem;
}

.my-course-progress-label strong {
  color: var(--primary-dark, #047857);
}

.my-course-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.my-course-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 0.4s ease;
}

@media (max-width: 640px) {
  .my-course-card {
    grid-template-columns: 1fr;
  }
  .my-course-thumb {
    min-height: 140px;
    max-height: 180px;
  }
}

/* Announcements */
.announcement-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.announcement-pinned {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, rgba(255,251,235,0.7), #fff);
}

.announcement-item h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Fee Receipt Modal */
.portal-notif-popup {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.portal-notif-popup.d-none { display: none !important; }

.portal-notif-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.portal-notif-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.portal-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
}

.portal-notif-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.portal-notif-header--warning {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.fee-status-paid { color: #059669 !important; }
.fee-status-partial { color: #d97706 !important; }
.fee-status-unpaid { color: #d97706 !important; }
.fee-status-overdue { color: #dc2626 !important; }

.lecture-suspended-alert {
  text-align: center;
  padding: 2rem 1.25rem;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.55), #fff);
}

.lecture-suspended-alert--inline {
  text-align: left;
  padding: 1rem 1.1rem;
}

.lecture-suspended-icon {
  font-size: 2.5rem;
  color: #dc2626;
  margin-bottom: 0.75rem;
}

.lecture-suspended-alert p {
  color: #7f1d1d;
  line-height: 1.6;
  margin-bottom: 0;
}

.portal-nav-link--suspended {
  opacity: 0.55;
  pointer-events: none;
}

.portal-fee-reminder-body p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

.portal-notif-fee-hint {
  margin: 0;
  padding: 0.75rem 1.15rem 0;
  font-size: 0.88rem;
  color: #b45309;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}

.portal-notif-body {
  padding: 1rem 1.15rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.portal-notif-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
  background: #f8fafc;
}

.portal-notif-item--pinned {
  border-color: #fbbf24;
  background: #fffbeb;
}

.portal-notif-item h5 {
  font-size: 0.95rem;
  color: #0f172a;
}

.portal-notif-footer {
  padding: 0.85rem 1.15rem 1.1rem;
  border-top: 1px solid #e2e8f0;
}

.fee-receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.fee-receipt-modal.d-none { display: none !important; }

.fee-receipt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.fee-receipt-sheet {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.fee-receipt-sheet-header,
.fee-receipt-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.fee-receipt-sheet-footer {
  border-bottom: none;
  border-top: 1px solid #e2e8f0;
}

.fee-receipt-sheet-body { padding: 1.25rem; }

.fee-receipt-brand {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.fee-receipt-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1.75rem;
  color: #fff;
}

.fee-receipt-logo--portal-course {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
}

.fee-receipt-logo--portal-tuition {
  background: linear-gradient(135deg, #047857, #10b981);
}

.fee-receipt-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fee-receipt-brand h4 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: #1e3a8a;
}

.fee-receipt-brand p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.fee-receipt-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.fee-receipt-block {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.fee-receipt-block h5 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: #1e40af;
}

.fee-receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.fee-receipt-grid span {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}

.fee-receipt-grid strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.fee-receipt-grid--fee {
  grid-template-columns: 1fr;
}

.fee-receipt-grid--fee div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #e2e8f0;
}

.fee-receipt-grid--fee div:last-child {
  border-bottom: none;
}

.fee-receipt-grid--fee strong {
  white-space: nowrap;
}

.fee-receipt-status { color: #1d4ed8; }

.fee-receipt-note {
  margin: 0;
  font-size: 0.82rem;
  color: #475569;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.75rem;
}

@media (max-width: 640px) {
  .fee-receipt-meta,
  .fee-receipt-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive: tuck sidebar offscreen on mobile */
@media (max-width: 991.98px) {
  .portal-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .portal-sidebar-backdrop.visible {
    opacity: 1;
    visibility: visible;
  }

  body.portal-sidebar-open {
    overflow: hidden;
  }

  .portal-sidebar {
    transform: translateX(-100%);
  }
  .portal-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
  }
  .portal-main {
    margin-left: 0;
    padding: 1rem;
  }
}
