/* =========================================================
   HAVEN SCHOOL SYSTEM - MASTER CSS
   ========================================================= */
* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; }
body { display: flex; background-color: #f4f7f6; color: #2c3e50; height: 100vh; overflow: hidden; }

/* --- OVERLAYS & MODALS --- */
.login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: #2c3e50; display: flex; justify-content: center; align-items: center; z-index: 9999; }
.login-box { background: white; padding: 40px; border-radius: 10px; width: 350px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center; }
.modal-content { background-color: #fff; padding: 25px; border-radius: 8px; width: 90%; max-width: 500px; position: relative; max-height: 90vh; overflow-y: auto; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.close-btn { position: absolute; right: 20px; top: 15px; font-size: 24px; cursor: pointer; color: #7f8c8d; border: none; background: none; }

/* --- LAYOUT: SIDEBAR & MAIN CONTENT --- */
.sidebar { width: 260px; background-color: #1a252f; color: white; display: flex; flex-direction: column; height: 100vh; box-shadow: 2px 0 5px rgba(0,0,0,0.1); z-index: 10; }
.sidebar-header { padding: 30px 20px; text-align: center; border-bottom: 1px solid #2c3e50; margin-bottom: 20px; }
.sidebar-header h2 { font-weight: 600; letter-spacing: 1px; color: #ecf0f1; }
.nav-btn { background: transparent; color: #bdc3c7; border: none; padding: 15px 20px; text-align: left; font-size: 15px; cursor: pointer; transition: all 0.3s; border-left: 4px solid transparent; }
.nav-btn:hover, .nav-btn.active { background-color: #2c3e50; color: #fff; border-left: 4px solid #3498db; }
.nav-bottom { margin-top: auto; padding: 20px; }
.logout-btn { background: #c0392b; color: white; border: none; width: 100%; padding: 12px; border-radius: 5px; cursor: pointer; font-weight: bold; }

.main-content { flex: 1; padding: 30px; overflow-y: auto; background: #f4f7f6; }
.section { display: none; animation: fadeIn 0.4s; }
.section.active { display: block; }
.section-header { margin-bottom: 25px; border-bottom: 2px solid #e0e6ed; padding-bottom: 10px; color: #2c3e50; }

/* --- UI COMPONENTS (Cards, Forms, Tables) --- */
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 15px; }

input, select, button { padding: 10px 12px; border-radius: 5px; border: 1px solid #bdc3c7; font-size: 14px; width: 100%; outline: none; }
input:focus, select:focus { border-color: #3498db; box-shadow: 0 0 5px rgba(52,152,219,0.3); }
button { cursor: pointer; border: none; font-weight: 600; transition: 0.2s; }
.btn-primary { background: #3498db; color: white; } .btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: white; } .btn-success:hover { background: #219150; }
.btn-danger { background: #e74c3c; color: white; } .btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; color: white; } .btn-warning:hover { background: #e67e22; }

table { width: 100%; border-collapse: collapse; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-radius: 8px; overflow: hidden; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ecf0f1; }
th { background-color: #2c3e50; color: white; font-weight: 500; }
tr:hover { background-color: #f9fbfc; }
.badge-green { color: #27ae60; font-weight: bold; }
.badge-red { color: #e74c3c; font-weight: bold; }

/* Admin Vault */
.admin-vault { border-left: 5px solid #c0392b; background: #fff; }
.stat-box { background: #ecf0f1; padding: 15px; border-radius: 5px; text-align: center; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }