:root {
  --navy: #0b1f4d;
  --navy-soft: #1a3d8f;
  --orange: #f97316;
  --orange-deep: #d15708;
  --orange-soft: #ffedd5;
  --ink: #182849;
  --line: #d5dded;
  --bg: #f3f7ff;
  --white: #ffffff;
  --danger: #b91c1c;
  --success: #166534;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, #ffd6ad 0%, transparent 40%),
    radial-gradient(circle at bottom left, #c8d9ff 0%, transparent 35%),
    var(--bg);
  min-height: 100vh;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.auth-glow {
  position: absolute;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 70%);
  right: -120px;
  top: -120px;
}

.auth-card {
  width: min(460px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 22px 50px rgba(11, 31, 77, 0.14);
  z-index: 1;
}

.auth-brand {
  margin-bottom: 0.8rem;
}

.auth-card h2 {
  margin: 0 0 0.2rem;
  color: var(--navy);
}

.hint {
  margin-top: 0;
  color: #3f4f71;
  font-size: 0.9rem;
}

.demo-list {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, var(--navy), var(--navy-soft));
  color: var(--white);
  padding: 1rem 1.25rem;
  border-bottom: 4px solid var(--orange);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--orange);
  color: var(--navy);
}

.brand h1 {
  margin: 0;
  font-size: 1.25rem;
}

.brand p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.85rem;
}

.topbar-note {
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  border: 1px solid var(--line);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
}

.tab.active {
  background: var(--orange);
  color: var(--navy);
  border-color: transparent;
}

.panel {
  display: none;
  animation: fade 0.2s ease;
}

.panel.active {
  display: block;
}

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

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(11, 31, 77, 0.07);
}

h2,
h3 {
  margin-top: 0;
  color: var(--navy);
}

.stack {
  display: grid;
  gap: 0.75rem;
}

label {
  font-size: 0.9rem;
  display: grid;
  gap: 0.25rem;
}

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

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  background: #fff;
}

button {
  background: var(--navy);
  border: none;
  color: var(--white);
  padding: 0.6rem 0.9rem;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.05);
}

.list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.item {
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: 10px;
  background: #fff;
}

.item strong {
  color: var(--navy);
}

.meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.badge {
  font-size: 0.75rem;
  background: var(--orange-soft);
  color: #8c3300;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.summary {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.kpi {
  background: #eef3ff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}

.warning {
  color: var(--danger);
  font-weight: 700;
}

.success {
  color: var(--success);
  font-weight: 700;
}

.error {
  color: var(--danger);
  margin: 0;
}

.span-3 {
  grid-column: 1 / -1;
}

.align-end {
  align-self: end;
}

.hidden {
  display: none !important;
}

#student-dashboard .kpi {
  background: linear-gradient(120deg, #fff3e7, #ebf2ff);
}

details {
  margin-top: 0.7rem;
  font-size: 0.92rem;
}

summary {
  cursor: pointer;
  color: var(--orange-deep);
  font-weight: 700;
}

@media (max-width: 900px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}
