@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono&display=swap');

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

:root {
  --bg: #FFF8F3;
  --bg-alt: #FFEFE4;
  --surface: #FFFFFF;
  --surface-2: #FDF4EC;
  --border: #F1DFCE;
  --border-strong: #E5C9B0;
  --text: #1F1611;
  --text-2: #5B4A3D;
  --muted: #8A7866;
  --primary: #FF6B35;
  --primary-dark: #E85A25;
  --primary-soft: #FFE7DC;
  --accent: #16A085;
  --accent-soft: #D5F3EC;
  --yellow: #FFC857;
  --yellow-soft: #FFF3D6;
  --pink: #FF5DA2;
  --pink-soft: #FFE4F0;
  --danger: #E53935;
  --danger-soft: #FFE3E1;
  --success: #16A085;
  --success-soft: #D5F3EC;
  --shadow-sm: 0 1px 2px rgba(31, 22, 17, 0.04), 0 1px 3px rgba(31, 22, 17, 0.06);
  --shadow: 0 4px 6px -1px rgba(31, 22, 17, 0.06), 0 10px 20px -8px rgba(255, 107, 53, 0.15);
  --shadow-lg: 0 20px 40px -12px rgba(255, 107, 53, 0.25);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; font-weight: 600; }
a:hover { color: var(--primary-dark); }

button, input, select, textarea { font: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 32px 28px; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; }
.spacer { flex: 1; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); }

.card h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.card h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input, select, textarea {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 12px;
  width: 100%;
  outline: none;
  transition: all 0.15s ease;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
input::placeholder, textarea::placeholder { color: var(--muted); }

label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.form-group { margin-bottom: 16px; }

.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px -3px rgba(255, 107, 53, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 14px -3px rgba(255, 107, 53, 0.5); }
.btn:active { transform: translateY(0); }

.btn.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn.secondary:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

.btn.danger { background: var(--danger); box-shadow: 0 4px 10px -3px rgba(229, 57, 53, 0.4); }
.btn.danger:hover { background: #C62828; }
.btn.success { background: var(--accent); box-shadow: 0 4px 10px -3px rgba(22, 160, 133, 0.4); }
.btn.success:hover { background: #128870; }
.btn.accent { background: var(--accent); }

.btn.small { padding: 7px 14px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th {
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--surface-2);
}
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
tr:hover td { background: var(--surface-2); }

/* NAV */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  gap: 6px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav .brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
  margin-right: 28px;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav a {
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 10px;
  transition: all 0.12s ease;
}
.nav a.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }

/* BADGES */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--yellow-soft); color: #B8860B; }
.badge.muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.small { font-size: 12px; }

/* LOGIN */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #FFF8F3 0%, #FFEFE4 50%, #FFE4F0 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}
.login-wrap::before {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #FFC857 0%, transparent 70%);
  top: -100px; right: -80px;
}
.login-wrap::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #FF5DA2 0%, transparent 70%);
  bottom: -150px; left: -100px;
}

.login-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 30px 60px -20px rgba(255, 107, 53, 0.25);
  position: relative;
  z-index: 1;
}
.login-card h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.03em;
}
.login-card h1 .accent-text { color: var(--primary); }
.login-card .subtitle { color: var(--muted); margin-bottom: 32px; font-size: 15px; }

/* TOAST */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 14px 22px;
  border-radius: 14px;
  z-index: 1000;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
@keyframes slideIn { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

/* MODAL */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(31, 22, 17, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* EXAM */
.exam-container { max-width: 840px; margin: 0 auto; padding: 40px 20px; }
.exam-header {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 26px;
  border-radius: 18px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.timer {
  font-size: 30px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.question-card h3 {
  font-size: 17px;
  margin-bottom: 18px;
  line-height: 1.55;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
}

.option {
  display: block;
  padding: 15px 18px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.12s ease;
  font-weight: 500;
  color: var(--text);
}
.option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
}
.option input { display: none; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; padding: 14px 20px; }
  .container { padding: 20px 16px; }
}

.empty { padding: 60px; text-align: center; color: var(--muted); }

ul.clean { list-style: none; padding: 0; }
ul.clean li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
ul.clean li:last-child { border-bottom: none; }

.notif-dot {
  width: 9px;
  height: 9px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
  box-shadow: 0 0 0 4px var(--primary-soft);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 4px var(--primary-soft); } 50% { box-shadow: 0 0 0 8px rgba(255, 107, 53, 0.15); } }

/* Stat cards */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.stat .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.stat .value { font-size: 34px; font-weight: 800; margin-top: 6px; color: var(--text); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.btn:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
