/* ─── CSS Variables ─────────────────────────────────── */
:root {
  --bg: #0A0A0B;
  --bg2: #1a1d27;
  --bg3: #242736;
  --surface: #1e2130;
  --border: #2e3148;
  --text: #e8eaf0;
  --text-muted: #8891aa;
  --accent: #7c6af7;
  --accent-hover: #9b8dff;
  --danger: #e55;
  --success: #4caf80;
  --radius: 8px;
  --nav-height: 60px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.18s ease;
}

[data-theme="light"] {
  --bg: #f5f6fa;
  --bg2: #ffffff;
  --bg3: #eef0f8;
  --surface: #ffffff;
  --border: #dde0ee;
  --text: #1a1d2e;
  --text-muted: #6b7280;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ─── Reset / Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ─── Simple site header (.lnav) — one header for every page ───────── */
.lnav{position:sticky;top:0;z-index:100;background:rgba(10,10,11,.78);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid rgba(60,60,68,.6);}
.lnav__inner{max-width:1200px;margin-inline:auto;padding:.85rem clamp(1.25rem,5vw,4rem);display:flex;align-items:center;justify-content:space-between;gap:1rem;}
.lnav__logo{display:flex;align-items:center;gap:.7rem;text-decoration:none;}
.lnav__logo img{height:40px;width:auto;display:block;}
.lnav__links{display:flex;align-items:center;gap:2rem;}
.lnav__links a{color:#9A9AA2;font-family:'Inter',system-ui,-apple-system,sans-serif;font-weight:500;font-size:.98rem;text-decoration:none;transition:color .2s;}
.lnav__links a:hover{color:#F2F3F5;}
.lnav__right{display:flex;align-items:center;gap:1.25rem;}
.lnav__logout{background:none;border:0;color:#9A9AA2;font-family:'Inter',system-ui,-apple-system,sans-serif;font-weight:500;font-size:.98rem;cursor:pointer;padding:0;transition:color .2s;}
.lnav__logout:hover{color:#F2F3F5;}
.lnav__cta{background:#3DDC97;color:#04241A;font-family:'Inter',system-ui,-apple-system,sans-serif;font-weight:600;font-size:1rem;padding:.95rem 1.9rem;border:0;border-radius:999px;text-decoration:none;white-space:nowrap;cursor:pointer;line-height:1.7;display:inline-flex;align-items:center;transition:background .2s,transform .2s,box-shadow .2s;}
.lnav__cta:hover{background:#22C07E;transform:translateY(-2px);box-shadow:0 12px 30px -8px rgba(61,220,151,.45);}
.lnav__signin{color:#F2F3F5;font-family:'Inter',system-ui,-apple-system,sans-serif;font-weight:600;font-size:1rem;line-height:1.7;padding:.95rem 1.6rem;border:1.5px solid rgba(120,120,130,.55);border-radius:999px;text-decoration:none;white-space:nowrap;transition:border-color .2s,background .2s;}
.lnav__signin:hover{border-color:#F2F3F5;background:rgba(255,255,255,.04);color:#F2F3F5;}
.lnav__toggle{display:none;flex-direction:column;gap:5px;background:none;border:0;cursor:pointer;padding:6px;}
.lnav__toggle span{width:22px;height:2px;background:#F2F3F5;border-radius:2px;}

/* Profile avatar + dropdown (logged-in) */
.lnav__profile{position:relative;outline:none;}
.lnav__avatar{width:42px;height:42px;border-radius:50%;overflow:hidden;border:1px solid rgba(120,120,130,.55);background:#123A50;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;color:#EAF3EC;font-size:1.25rem;transition:border-color .2s;}
.lnav__avatar:hover{border-color:#F2F3F5;}
.lnav__avatar img{width:100%;height:100%;object-fit:cover;}
.lnav__dropdown{position:absolute;top:52px;right:0;min-width:190px;background:#151518;border:1px solid rgba(60,60,68,.8);border-radius:12px;padding:6px;display:none;flex-direction:column;box-shadow:0 12px 30px rgba(0,0,0,.5);z-index:200;}
.lnav__profile:hover .lnav__dropdown,.lnav__profile:focus-within .lnav__dropdown{display:flex;}
.lnav__dropdown-name{padding:8px 12px 6px;font-size:.8rem;color:#9A9AA2;border-bottom:1px solid rgba(60,60,68,.6);margin-bottom:4px;font-weight:600;overflow:hidden;text-overflow:ellipsis;}
.lnav__dropdown a,.lnav__dropdown button{display:block;width:100%;text-align:left;padding:9px 12px;border-radius:7px;font-family:'Inter',system-ui,-apple-system,sans-serif;font-size:.92rem;font-weight:500;color:#EAF3EC;text-decoration:none;background:none;border:0;cursor:pointer;}
.lnav__dropdown a:hover,.lnav__dropdown button:hover{background:rgba(255,255,255,.06);color:#fff;}
.lnav__dropdown form{margin:0;}

@media (max-width:860px){
  .lnav__links,.lnav__right{display:none;}
  .lnav__toggle{display:flex;}
}

img { max-width: 100%; }

/* ─── Sticky Nav ────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  box-shadow: var(--shadow);
}

.nav__logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: 2rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  list-style: none;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 1rem;
  transition: border-color var(--transition), color var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  z-index: 99;
}
.nav__mobile.open { display: block; }
.nav__mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.nav__mobile a { color: var(--text); font-size: 1rem; }

/* Dropdown */
.nav__dropdown { position: relative; }
.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 6px;
  min-width: 180px;
  z-index: 200;
}
.nav__dropdown-menu-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  box-shadow: var(--shadow);
}
.nav__dropdown:hover .nav__dropdown-menu { display: block; }
.nav__dropdown-menu-inner a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.nav__dropdown-menu-inner a:hover { background: var(--bg3); color: var(--text); }

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__right .nav__auth { display: none; }
}

/* ─── Main content ──────────────────────────────────── */
.main { min-height: calc(100vh - var(--nav-height) - 80px); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.page-content { padding: 2.5rem 0; }

/* ─── Footer ────────────────────────────────────────── */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer a { color: var(--text-muted); margin: 0 0.5rem; }
.footer a:hover { color: var(--accent); }

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--transition), opacity var(--transition);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.88; color: #fff; }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }

/* ─── Forms ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; margin-bottom: 0.4rem; font-size: 0.875rem; color: var(--text-muted); }
.form-control {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ─── Alerts ────────────────────────────────────────── */
.alert { padding: 0.85rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: rgba(76,175,128,0.15); border: 1px solid var(--success); color: var(--success); }
.alert-danger  { background: rgba(238,85,85,0.15);  border: 1px solid var(--danger);  color: var(--danger); }

/* ─── Responsive embed ──────────────────────────────── */
.embed-responsive { position: relative; padding-top: 56.25%; overflow: hidden; border-radius: var(--radius); }
.embed-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ─── Admin Layout ─────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}
.admin-sidebar__header {
  padding: 1.25rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.admin-sidebar__header a {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.admin-sidebar__nav {
  flex: 1;
  padding: 0.5rem 0;
}
.admin-sidebar__section {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.admin-sidebar__link:hover {
  background: var(--bg3);
  color: var(--text);
}
.admin-sidebar__link.active {
  background: var(--bg3);
  color: var(--accent);
  font-weight: 500;
}
.admin-sidebar__icon { font-size: 1rem; width: 1.25rem; text-align: center; }
.admin-sidebar__footer {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}
.admin-content {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 2rem;
}
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-sidebar__nav { display: flex; flex-wrap: wrap; gap: 0; padding: 0.25rem 0.5rem; }
  .admin-sidebar__section { display: none; }
  .admin-sidebar__link { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
  .admin-sidebar__footer { display: none; }
  .admin-content { padding: 1rem; }
}

/* ─── Admin Tables ─────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; padding: 0.6rem 0.75rem; color: var(--text-muted); border-bottom: 2px solid var(--border); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.table tr:hover { background: var(--bg3); }
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge--admin { background: rgba(124,106,247,0.2); color: var(--accent); }
.badge--student { background: rgba(76,175,128,0.2); color: var(--success); }
.badge--coordinator { background: rgba(59,130,246,0.2); color: #3b82f6; }
.badge--advisor { background: rgba(245,158,11,0.2); color: #f59e0b; }
