@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-base: #000000;
  --bg-card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(155, 153, 254, 0.6);
  --accent-1: #9B99FE;
  --accent-2: #2BC8B7;
  --text-primary: #ffffff;
  --text-muted: #a1a1aa;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-color: #f87171;
  --success-bg: rgba(52, 211, 153, 0.12);
  --success-color: #34d399;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-hover: rgba(255, 255, 255, 0.08);
  --btn-gradient: linear-gradient(135deg, #9B99FE 0%, #2BC8B7 100%);
  --glow: 0 0 40px rgba(155, 153, 254, 0.15);
}

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

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

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(155, 153, 254, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(43, 200, 183, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(155, 153, 254, 0.06) 0%, transparent 70%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  top: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(155, 153, 254, 0.18), transparent 70%);
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -200px;
  right: -150px;
  background: radial-gradient(circle, rgba(43, 200, 183, 0.2), transparent 70%);
  animation-delay: -4s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 60%;
  background: radial-gradient(circle, rgba(155, 153, 254, 0.10), transparent 70%);
  animation-delay: -2s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.card {
  width: 100%;
  max-width: 775px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 32px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 32px 64px rgba(0, 0, 0, 0.4), var(--glow);
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.logo {
  text-align: center;
  margin-bottom: 24px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(155, 153, 254, 0.2), rgba(43, 200, 183, 0.2));
  border: 1px solid rgba(155, 153, 254, 0.3);
  border-radius: 14px;
  font-size: 24px;
  margin-bottom: 12px;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(155, 153, 254, 0.2);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(155, 153, 254, 0);
  }
}

.logo h1 {
  font-family: 'Inter', sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(155, 153, 254, 0.07);
  border: 1px solid rgba(155, 153, 254, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: rgba(240, 244, 255, 0.7);
  margin-bottom: 24px;
  line-height: 1.5;
}

.notice strong {
  color: var(--accent-1);
}

.flash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.flash.error {
  background: var(--error-bg);
  color: var(--error-color);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash.success {
  background: var(--success-bg);
  color: var(--success-color);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(240, 244, 255, 0.25);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
  transition: color 0.2s;
}

input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: all 0.25s ease;
  caret-color: var(--accent-1);
}

input::placeholder {
  color: rgba(240, 244, 255, 0.22);
}

input:hover {
  background: var(--input-hover);
  border-color: rgba(255, 255, 255, 0.13);
}

input:focus {
  background: rgba(155, 153, 254, 0.06);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(155, 153, 254, 0.1);
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  width: auto;
  transition: color 0.2s;
}

.eye-btn:hover {
  color: var(--accent-1);
}

button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: var(--btn-gradient);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button[type="submit"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155, 153, 254, 0.4);
}

button[type="submit"]:hover::before {
  opacity: 1;
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"].loading {
  pointer-events: none;
  opacity: 0.8;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.footer-text {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-text a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-text a:hover {
  color: #b8b6ff;
}

#deptBox {
  position: relative;
}

.dept-dropdown {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(15, 20, 40, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(155, 153, 254, 0.28);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  /* animation — hidden by default */
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dept-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.dept-dropdown li {
  padding: 10px 16px;
  font-size: 0.9rem;
  color: rgba(210, 225, 255, 0.82);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.dept-dropdown li:hover {
  background: rgba(155, 153, 254, 0.18);
  color: #fff;
}

.dept-dropdown li:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}