@import url('nestina-core.css');

/* Login page */
body.page-login {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem 2rem;
}

@media (min-width: 768px) {
  body.page-login { padding-top: 8vh; }
}

.login-grid {
  width: 100%;
  max-width: 56rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .login-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.login-brand {
  text-align: center;
  padding: 1rem;
}

.login-brand img {
  width: 8rem;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(124, 58, 237, 0.2));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.login-card {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
}

.login-card h1 {
  margin: 0 0 0.25rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.login-card .subtitle {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.login-form .field { margin-bottom: 0.85rem; }

.login-form .btn-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
}

.login-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
}

.login-footer img { height: 3rem; width: auto; opacity: 0.9; }
.login-footer .tagline {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #6d28d9;
  opacity: 0.65;
  margin: 0.35rem 0;
}

.waves {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12vh;
  min-height: 80px;
  max-height: 140px;
  z-index: -1;
  pointer-events: none;
}

/* Dashboard */
body.page-dash {
  background: var(--bg-tint);
  min-height: 100vh;
}

.dash-nav {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.35);
  position: sticky;
  top: 0;
  z-index: 50;
}

.dash-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-nav .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 0.9rem;
}

.dash-nav .brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: #fff;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

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

.dash-user .name {
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
}

.dash-user .role {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.75;
}

.dash-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.profile-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 2rem;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 20px 40px -12px rgba(124, 58, 237, 0.12);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  width: 16rem;
  height: 16rem;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 50%;
  top: -6rem;
  left: -6rem;
}

.profile-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.profile-card h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.profile-card .kelas {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin: 0 0 1rem 0.25rem;
}

.exam-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .exam-grid { grid-template-columns: repeat(2, 1fr); }
}

.exam-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.exam-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.08);
}

.exam-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.exam-card .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exam-card .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.badge-token {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.exam-card .btn {
  width: 100%;
  margin-top: auto;
}

.exam-card.done .btn { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.empty-exams {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

#error-login { min-height: 1.25rem; }
