/* QCSim — Global Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Raleway:wght@700;800;900&display=swap');

:root {
  --primary:       #1a6bb5;
  --primary-dark:  #0d4f8a;
  --primary-light: #e8f3fc;
  --accent:        #00b4d8;
  --bg:            #f4f8fd;
  --surface:       #ffffff;
  --text:          #0d2d4e;
  --text-muted:    #607d99;
  --border:        #d1e4f5;
  --danger:        #e53e3e;
  --success:       #38a169;
  --warning:       #dd6b20;
  --nav-height:    64px;
  --radius:        10px;
  --shadow:        0 2px 16px rgba(26,107,181,.10);
  --shadow-lg:     0 8px 32px rgba(26,107,181,.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

/* ── NAVBAR ───────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px;
  box-shadow: var(--shadow);
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Raleway', sans-serif;
  font-weight: 800; font-size: 20px;
  color: var(--primary); text-decoration: none;
}
.navbar-brand img { height: 34px; }

.navbar-links {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto; list-style: none;
}

.navbar-links a {
  padding: 8px 16px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px;
  color: var(--text); text-decoration: none;
  transition: background .2s, color .2s;
}
.navbar-links a:hover, .navbar-links a.active {
  background: var(--primary-light); color: var(--primary);
}
.navbar-links a.nav-signout {
  color: var(--danger);
}
.navbar-links a.nav-signout:hover {
  background: #fff5f5;
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 24px; height: 2.5px;
  background: var(--text); border-radius: 2px; margin: 5px 0;
  transition: .3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; margin-left: auto; }
  .navbar-links {
    display: none; flex-direction: column; gap: 2px;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--surface); border-bottom: 1.5px solid var(--border);
    padding: 12px 16px; box-shadow: var(--shadow-lg);
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { width: 100%; padding: 12px 16px; }
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius);
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; border: none; transition: .2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c53030; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #2f855a; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-full { width: 100%; }

/* ── FORM ELEMENTS ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--text); margin-bottom: 6px;
}
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Nunito', sans-serif; font-size: 14px; color: var(--text);
  background: var(--surface); transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,181,.12);
}
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 40px; }
.input-icon-wrap .icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.input-icon-wrap .eye-toggle {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0;
}

/* ── ALERT BANNERS ────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.alert-error   { background: #fff5f5; color: var(--danger); border: 1px solid #fed7d7; }
.alert-success { background: #f0fff4; color: var(--success); border: 1px solid #c6f6d5; }
.alert-info    { background: var(--primary-light); color: var(--primary); border: 1px solid var(--border); }

/* ── CARD ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: 14px;
  border: 1.5px solid var(--border); box-shadow: var(--shadow);
  padding: 28px;
}

/* ── TABLE ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1.5px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--primary-light); }
th { padding: 12px 16px; font-weight: 700; color: var(--primary); text-align: left; white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: #f9fbfe; }

/* ── BADGE ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
}
.badge-student    { background: #ebf8ff; color: #2b6cb0; }
.badge-instructor { background: #e9d8fd; color: #6b46c1; }
.badge-admin      { background: #fed7d7; color: #c53030; }
.badge-pending    { background: #fefcbf; color: #975a16; }
.badge-verified   { background: #c6f6d5; color: #276749; }

/* ── PAGE HEADER ──────────────────────────────────────────────────────────── */
.page-header {
  padding: 32px 0 20px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 28px;
}
.page-header h1 { font-family: 'Raleway', sans-serif; font-size: 26px; font-weight: 800; }
.page-header p  { color: var(--text-muted); margin-top: 4px; font-size: 15px; }

/* ── CONTAINER ────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ── MODAL ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(13,45,78,.45); z-index: 500;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 16px;
  padding: 32px; max-width: 480px; width: 90%;
  box-shadow: var(--shadow-lg); animation: fadeUp .25s ease;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-family: 'Raleway', sans-serif; font-weight: 800; font-size: 20px; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--text-muted); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── UTILITIES ────────────────────────────────────────────────────────────── */
.flex { display: flex; } .flex-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.text-center { text-align: center; } .text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; } .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 480px) {
  .container, .container-sm { padding: 0 14px; }
  .card { padding: 18px; }
}
