/* ==========================================================================
   CONNECTUS - ADMIN 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, #060f24 0%, #0c1e45 40%, #0d3060 70%, #091a35 100%); position: relative; overflow: hidden; }
#loginScreen::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.055) 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(37,99,235,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(6,182,212,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(16,185,129,0.15), transparent 70%); bottom: 10%; left: 5%; animation: orbFloat 12s ease-in-out infinite 2s; }
.orb-4 { width: 160px; height: 160px; background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 70%); bottom: 25%; right: 8%; animation: orbFloat 16s ease-in-out infinite 1s; }
.orb-5 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%); top: 50%; left: 35%; animation: orbFloat 20s ease-in-out infinite 3s; }

@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; }

@keyframes logoGlow { 0% { filter: drop-shadow(0 0 0px rgba(59,130,246,0)); } 50% { filter: drop-shadow(0 0 26px rgba(59,130,246,0.75)) drop-shadow(0 0 55px rgba(6,182,212,0.35)); } 100% { filter: drop-shadow(0 0 0px rgba(59,130,246,0)); } }
@keyframes logoBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.logo-glow { animation: logoGlow 3s ease-in-out infinite; }
.logo-bob { animation: logoBob 4s ease-in-out infinite; }

.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: #bfdbfe; 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: #f0f6ff; border: 2px solid #dbeafe; 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: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.14); }

/* ── FORM INPUTS ── */
.form-input { transition: border-color 0.2s, box-shadow 0.2s; }
.form-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); outline: none; }

/* ── SIDEBAR ── */
#sidebar { background: linear-gradient(180deg, #060f24 0%, #0d1f3c 50%, #0a1a30 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, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 4px 20px rgba(37,99,235,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: #60a5fa; border-radius: 0 4px 4px 0; }
.school-badge { background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(6,182,212,0.12)); border: 1px solid rgba(96,165,250,0.22); }

/* ── 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 ── */
.trow { transition: background 0.12s; }
.trow:hover { background: #f0f6ff; }
.gb-row { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.gb-row:hover { background: #f0f6ff !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; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-archived { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #fef3c7; color: #92400e; }
.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; }

/* ── PANELS & OVERLAYS ── */
.side-panel { transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1); }
.overlay { transition: opacity 0.25s; }
.subject-body { overflow: hidden; transition: max-height 0.3s ease; max-height: 0; }
.subject-body.open { max-height: 2000px; }

/* ── SEMESTER TABS ── */
.stab { cursor: pointer; padding: 8px 18px; font-weight: 700; font-size: 0.85rem; border-bottom: 2px solid transparent; color: #64748b; transition: all 0.15s; }
.stab.active { border-bottom-color: #2563eb; color: #2563eb; }

/* ── DANGER ZONE ── */
.danger-zone { border: 1.5px solid #fecaca; border-radius: 16px; background: #fff5f5; }

/* ── QUICK ACTION BUTTONS ── */
.qa-btn { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 16px; font-weight: 800; font-size: 0.85rem; transition: all 0.2s cubic-bezier(0.34,1.2,0.64,1); border: 2px solid transparent; text-align: left; }
.qa-btn:hover { transform: translateY(-3px) scale(1.02); }
.qa-btn .qa-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }

/* ── GRADE DISTRIBUTION BAR ── */
.dist-bar { height: 28px; border-radius: 10px; overflow: hidden; display: flex; }
.dist-seg { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: white; min-width: 0; overflow: hidden; }

/* ── 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; }
}
