@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

/* =================== VARIABLES =================== */
:root {
  --bg:#1c1f2a;
  --panel:#232836;
  --muted:#2d3346;
  --text:#f2f3f7;
  --sub:#a7afc2;
  --accent:#4CAF50;
  --border:#363c52;
  --shadow:0 4px 14px rgba(0,0,0,.2);
}

* {
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Inter',system-ui,Segoe UI,Roboto,Arial,sans-serif;
}

body {
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
}

/* =================== LOGIN =================== */
.login-body {
  display:flex;
  align-items:center;
  justify-content:center;
  height:100vh;
  padding:16px;
}
.login-container { width:100%; max-width:420px; }
.login-card {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  padding:22px 20px;
  display:flex;
  flex-direction:column;
  gap:12px;
  box-shadow:var(--shadow);
  transition:.3s;
}
.login-card:hover { transform:translateY(-2px); }

.hidden { display:none; }

.logo-inline {
  display:flex;
  align-items:center;
  gap:10px;
}
.logo-inline h1 { font-size:18px; font-weight:600; color:var(--text); }

h2 {
  font-size:18px;
  color:var(--accent);
  margin-top:6px;
}

select,input {
  width:100%;
  padding:11px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--muted);
  color:var(--text);
  outline:none;
  font-size:15px;
  transition:.2s;
}
select:focus,input:focus {
  box-shadow:0 0 0 2px rgba(76,175,80,.25);
}

.btn {
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--muted);
  color:#fff;
  cursor:pointer;
  transition:.2s;
}
.btn.primary { background:var(--accent); border:none; }
.btn:hover { filter:brightness(1.1); }
.btn.link { background:transparent; border:none; color:var(--sub); text-align:left; padding:0; }
.full { width:100%; }
.row.gap { display:flex; gap:8px; }
.col.gap { display:flex; flex-direction:column; gap:8px; }
.hint { color:var(--sub); font-size:12px; }

/* =================== DASHBOARD =================== */
.dashboard {
  display:flex;
  height:100vh;
}
.sidebar {
  width:250px;
  background:var(--panel);
  border-right:1px solid var(--border);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:14px;
  box-shadow:inset -1px 0 0 var(--border);
}
.brand {
  display:flex;
  gap:10px;
  align-items:center;
}
.brand-text { display:flex; flex-direction:column; line-height:1; }
.brand-text .app { font-weight:600; color:var(--accent); }
.brand-text .school { font-size:12px; color:var(--sub); }

nav ul {
  list-style:none;
  display:grid;
  gap:6px;
}
nav li {
  padding:10px;
  border-radius:10px;
  color:#e9edf5;
  border:1px solid transparent;
  cursor:pointer;
  transition:.2s;
}
nav li:hover { background:var(--muted); border-color:var(--border); }
nav li.active {
  background:rgba(76,175,80,.14);
  border-color:#3c7d42;
}

.content {
  flex:1;
  padding:20px;
  overflow:auto;
}
.content h2 {
  color:var(--accent);
  font-size:20px;
  margin-bottom:8px;
}
.content .sub { color:var(--sub); font-size:14px; }

/* =================== CARDS =================== */
.card {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  padding:16px;
  margin-bottom:14px;
  box-shadow:var(--shadow);
}
.card h3 {
  color:var(--accent);
  margin-bottom:8px;
}
.card p { font-size:15px; line-height:1.5; }

/* =================== TABLE =================== */
.table {
  width:100%;
  border-collapse:collapse;
}
.table th, .table td {
  border-bottom:1px solid var(--border);
  padding:10px;
  text-align:left;
  font-size:14px;
}
.table th { color:var(--accent); font-weight:600; }
.table tr:hover { background:rgba(76,175,80,.05); }

/* =================== CANVAS =================== */
canvas {
  width:100%;
  border-radius:10px;
  background:var(--muted);
  margin-top:10px;
}

/* =================== SCROLLBAR =================== */
::-webkit-scrollbar { width:8px; }
::-webkit-scrollbar-thumb { background:var(--accent); border-radius:10px; }
tent{flex:1;padding:20px;overflow:auto}


/* ======= TOASTS PRO ======= */
#toast-stack{
  position: fixed; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px; z-index: 99999;
}
.toast{
  min-width: 260px; max-width: 360px;
  background: #222; color: #f5f5f5; border: 1px solid #333;
  padding: 10px 12px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.35);
  animation: toast-in .22s ease-out;
  display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start;
  font-size: 14px;
}
.toast .ico{font-size: 18px; line-height: 1}
.toast.success{ border-color: #2a6f3a; background: #1e2a23; }
.toast.info{    border-color: #2f3f79; background: #1f2231; }
.toast.error{   border-color: #7c2b2b; background: #2b1f1f; }
@keyframes toast-in{ from{ opacity: 0; transform: translateY(6px) } to{ opacity: 1; transform: translateY(0) } }

/* ======= MODAL ======= */
.modal{ position: fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,.45); z-index: 99990; }
.modal.hidden{ display:none; }
.modal-content{
  width: min(560px, 92vw); background: var(--panel, #1e1e1e); color: var(--text, #eaeaea);
  border: 1px solid var(--border, #2e2e2e); border-radius: 12px; padding: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.4); animation: fadeIn .2s ease;
}
.modal-content h3{ color: var(--accent, #4CAF50); margin-bottom: 8px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.btn.danger{ background:#7a2e2e; border-color:#7a2e2e; }
