/* ==========================================================================
   CONNECTUS - STUDENT / FAMILY PORTAL CSS
   ========================================================================== */

html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
* { font-family: 'Nunito', sans-serif; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── LOGIN ── */
#loginScreen { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #3730a3 70%, #312e81 100%); position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
#loginScreen::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 32px 32px; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; pointer-events: none; }
@keyframes orbFloat { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(-35px) scale(1.08); } 100% { transform: translateY(0) scale(1); } }
.orb-1 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(99,102,241,0.22), transparent 70%); top: -120px; left: -120px; animation: orbFloat 14s ease-in-out infinite; }
.orb-2 { width: 280px; height: 280px; background: radial-gradient(circle, rgba(139,92,246,0.18), transparent 70%); top: 20%; right: 0; animation: orbFloat 18s ease-in-out infinite reverse; }
.orb-3 { width: 200px; height: 200px; background: radial-gradient(circle, rgba(79,70,229,0.15), transparent 70%); bottom: 10%; left: 5%; animation: orbFloat 12s ease-in-out infinite 2s; }

@keyframes cardUp { from { opacity: 0; transform: translateY(36px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.login-card { animation: cardUp 0.65s cubic-bezier(0.34,1.2,0.64,1) 0.25s both; }

.back-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #c7d2fe; font-size: 0.8rem; font-weight: 700; padding: 8px 16px; border-radius: 999px; transition: all 0.2s; text-decoration: none; backdrop-filter: blur(6px); }
.back-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }
.login-input { width: 100%; padding: 0.9rem 1.1rem; background: #f5f3ff; border: 2px solid #ddd6fe; border-radius: 14px; font-size: 0.9rem; font-family: 'Nunito', sans-serif; outline: none; transition: all 0.2s; color: #1e293b; font-weight: 600; }
.login-input:focus { border-color: #6366f1; background: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,0.14); }

/* ── FORM INPUTS ── */
.form-input { transition: border-color 0.2s, box-shadow 0.2s; }
.form-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); outline: none; }

/* ── SIDEBAR ── */
#sidebar { background: linear-gradient(180deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%); border-right: 1px solid rgba(255,255,255,0.04); }
.nav-item { transition: all 0.18s ease; border-radius: 12px; position: relative; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.5), inset 0 1px 0 rgba(255,255,255,0.15); }
.nav-item.active::before { content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%); width: 3px; height: 70%; background: #a5b4fc; border-radius: 0 4px 4px 0; }

/* ── STAT CARDS ── */
.stat-card { position: relative; overflow: hidden; transition: transform 0.22s, box-shadow 0.22s; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 18px 45px rgba(0,0,0,0.15); }

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.view-section:not(.hidden) { animation: fadeIn 0.28s ease; }

/* ── TABLE ROWS ── */
.gb-row { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.gb-row:hover { background: #f5f3ff !important; }
.gb-row:nth-child(even) { background: #f8fafc; }

/* ── BADGES ── */
.badge { font-size: 0.65rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.05em; text-transform: uppercase; }
.s-exc { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.s-good { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.s-track { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.s-attn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.s-risk { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.s-none { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* ── GRADE COLORS ── */
.g-a { color: #15803d; font-weight: 800; }
.g-b { color: #1d4ed8; font-weight: 800; }
.g-c { color: #0f766e; font-weight: 800; }
.g-d { color: #92400e; font-weight: 800; }
.g-f { color: #991b1b; font-weight: 800; }

/* ── NEW GRADE PULSE BADGE ── */
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 70% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.new-badge { background: #ef4444; color: white; font-size: 0.55rem; font-weight: 900; padding: 2px 6px; border-radius: 6px; letter-spacing: 0.05em; animation: pulseGlow 2s infinite; text-transform: uppercase; margin-left: 8px; vertical-align: middle; }

/* ── SUBJECT ACCORDION ── */
.subject-body { overflow: hidden; transition: max-height 0.35s ease; max-height: 0; }
.subject-body.open { max-height: 4000px; }

/* ── OVERLAYS ── */
.overlay { transition: opacity 0.25s; }

/* ── TOPBAR ── */
.topbar { background: #fff; border-bottom: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }

/* ── PRINT ── */
@media print {
    #sidebar, .topbar, .no-print, button { display: none !important; }
    #dashboardMain { height: auto !important; overflow: visible !important; }
    body { background: white !important; overflow: visible !important; }
}
