*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: #f1f5f9; color: #0f172a; min-height: 100vh; }

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: 24px; padding: 48px 40px;
  width: 100%; max-width: 440px; box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; gap: 0;
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.logo-star { font-size: 1.4rem; color: #f59e0b; }
.logo-text { font-size: 0.95rem; font-weight: 700; color: #0f172a; }
.login-title { font-size: 1.6rem; font-weight: 900; color: #0f172a; margin-bottom: 8px; }
.login-title span { color: #3b82f6; font-weight: 500; font-size: 1rem; display: block; margin-top: 2px; }
.login-sub { font-size: 0.82rem; color: #64748b; margin-bottom: 28px; line-height: 1.6; }
.login-error {
  background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626;
  border-radius: 10px; padding: 10px 14px; font-size: 0.83rem; margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: #374151; }
.form-group input {
  border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 12px 14px;
  font-size: 0.95rem; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.form-group input:focus { border-color: #3b82f6; }
.btn-login {
  width: 100%; padding: 14px; background: #0f172a; color: #fff;
  border: none; border-radius: 12px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s; margin-top: 4px; font-family: inherit;
}
.btn-login:hover { background: #1e293b; }
.btn-login:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-forgot {
  background: none; border: none; color: #3b82f6; font-size: 0.82rem;
  cursor: pointer; margin-top: 12px; font-family: inherit; text-align: center;
}
.btn-forgot:hover { text-decoration: underline; }
.forgot-msg { font-size: 0.82rem; color: #16a34a; margin-top: 8px; text-align: center; }
.demo-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 0; color: #cbd5e1; font-size: 0.78rem;
}
.demo-divider::before, .demo-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.btn-demo {
  width: 100%; padding: 12px; margin-top: 10px;
  background: #f8fafc; color: #475569;
  border: 1.5px dashed #cbd5e1; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.2s, border-color 0.2s;
}
.btn-demo:hover { background: #f1f5f9; border-color: #94a3b8; color: #0f172a; }

.back-link {
  display: block; text-align: center; margin-top: 20px; font-size: 0.82rem;
  color: #64748b; text-decoration: none;
}
.back-link:hover { color: #0f172a; }

/* ===== PORTAL NAV ===== */
.portal-nav {
  position: sticky; top: 0; z-index: 100;
  background: #0f172a; padding: 0 32px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.portal-nav-left { display: flex; align-items: center; gap: 10px; }
.portal-nav-brand { color: #f8fafc; font-size: 0.9rem; font-weight: 700; }
.portal-nav-right { display: flex; align-items: center; gap: 16px; }
.nav-parent-name { color: #94a3b8; font-size: 0.85rem; }
.btn-change-pw {
  background: #1e293b; color: #94a3b8; border: 1px solid #334155;
  border-radius: 8px; padding: 6px 14px; font-size: 0.82rem; cursor: pointer;
  font-family: inherit; transition: background 0.2s;
}
.btn-change-pw:hover { background: #334155; color: #f8fafc; }

.pw-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 24px;
}
.pw-modal-card {
  background: #fff; border-radius: 20px; padding: 36px 32px;
  width: 100%; max-width: 400px; box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.pw-modal-card h3 { font-size: 1.2rem; font-weight: 800; color: #0f172a; margin-bottom: 20px; }
.pw-modal-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.btn-logout {
  background: #1e293b; color: #f8fafc; border: 1px solid #334155;
  border-radius: 8px; padding: 6px 14px; font-size: 0.82rem; cursor: pointer;
  font-family: inherit; transition: background 0.2s;
}
.btn-logout:hover { background: #334155; }

/* ===== DASHBOARD ===== */
.dash-container { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }

.dash-welcome {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  border-radius: 20px; padding: 28px 32px; margin-bottom: 28px; color: #fff;
}
.dash-welcome-greeting { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.dash-welcome-sub { font-size: 0.85rem; color: #94a3b8; }
.back-site-btn {
  background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px; padding: 8px 18px; font-size: 0.82rem; text-decoration: none;
  white-space: nowrap; transition: background 0.2s;
}
.back-site-btn:hover { background: rgba(255,255,255,0.2); }

.dash-grid-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 20px; }

.dash-card {
  background: #fff; border-radius: 18px; padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.dash-card:last-child { margin-bottom: 0; }
.dash-grid-top .dash-card { margin-bottom: 0; }

.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid #f1f5f9; padding-bottom: 14px; }
.card-icon { font-size: 1.3rem; }
.card-header h3 { font-size: 1rem; font-weight: 800; color: #0f172a; }

/* Child info */
.child-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-item { display: flex; flex-direction: column; gap: 3px; }
.info-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; }
.info-val { font-size: 0.95rem; font-weight: 600; color: #0f172a; }

/* Contact */
.contact-list { display: flex; flex-direction: column; gap: 16px; }
.contact-item { padding-bottom: 14px; border-bottom: 1px solid #f1f5f9; }
.contact-item:last-child { border-bottom: none; padding-bottom: 0; }
.contact-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; margin-bottom: 4px; }
.contact-val { font-size: 0.9rem; font-weight: 600; color: #0f172a; }

/* Announcements */
.announcements-list { display: flex; flex-direction: column; gap: 14px; }
.ann-item { background: #f8fafc; border-left: 4px solid #3b82f6; border-radius: 0 10px 10px 0; padding: 14px 16px; }
.ann-date { font-size: 0.72rem; color: #94a3b8; font-weight: 600; margin-bottom: 4px; }
.ann-title { font-size: 0.95rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.ann-body { font-size: 0.85rem; color: #475569; line-height: 1.6; }

/* Schedule */
.schedule-list { display: flex; flex-direction: column; gap: 0; }
.sched-item {
  display: grid; grid-template-columns: 120px 1fr;
  padding: 12px 0; border-bottom: 1px solid #f1f5f9;
  align-items: center;
}
.sched-item:last-child { border-bottom: none; }
.sched-time { font-size: 0.82rem; font-weight: 700; color: #3b82f6; }
.sched-activity { font-size: 0.9rem; color: #0f172a; }

/* Photos */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-item { border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.photo-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.photo-caption { font-size: 0.75rem; color: #64748b; padding: 6px 10px; }

/* Empty state */
.empty-state { color: #94a3b8; font-size: 0.88rem; text-align: center; padding: 24px 0; }

/* Auth toggle */
.auth-toggle { text-align: center; font-size: 0.82rem; color: #64748b; margin-top: 16px; }
.auth-toggle a { color: #3b82f6; font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

/* Enrollments */
.enrollments-list { display: flex; flex-direction: column; gap: 14px; }
.enrollment-card {
  background: #fff; border-radius: 14px; padding: 20px;
  border: 1.5px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.enrollment-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.enrollment-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 10px;
}
.enrollment-course { font-weight: 700; font-size: 0.95rem; color: #0f172a; flex: 1; }
.enrollment-card-details {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-size: 0.82rem; color: #475569;
}
.enrollment-card-actions {
  display: flex; gap: 8px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.enrollment-status {
  font-size: 0.75rem; font-weight: 700; padding: 4px 12px;
  border-radius: 99px; white-space: nowrap; flex-shrink: 0;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #d1fae5; color: #065f46; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.btn-enroll-new {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff; border: none; border-radius: 12px;
  padding: 12px 28px; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
}
.btn-enroll-new:hover { opacity: 0.9; }
.btn-pay-now {
  background: #16a34a; color: #fff; border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn-pay-now:hover { background: #15803d; }
.btn-cancel-enroll {
  background: #fff; color: #dc2626; border: 1.5px solid #fecaca; border-radius: 8px;
  padding: 6px 14px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn-cancel-enroll:hover { background: #fef2f2; }

/* Responsive */
@media (max-width: 768px) {
  .dash-grid-top { grid-template-columns: 1fr; }
  .child-info-grid { grid-template-columns: 1fr; }
  .dash-welcome { flex-direction: column; gap: 16px; align-items: flex-start; }
  .portal-nav { padding: 0 16px; }
  .portal-nav-brand { font-size: 0.78rem; }
  .dash-container { padding: 20px 16px 60px; }
  .login-card { padding: 36px 24px; }
  .enrollment-card-top { flex-direction: column; }
}
