* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #090d16;
  color: #f1f5f9;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(2, 132, 199, 0.03) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
  z-index: 0;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(56, 189, 248, 0.06);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #0284c7, #38bdf8);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 26px;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  position: relative;
}

.logo-container::before {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  filter: blur(12px);
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: #0a0c0f;
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(56, 189, 248, 0.2);
  position: relative;
  z-index: 1;
}

.badge-teacher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  margin-bottom: 8px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #cbd5e1;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  pointer-events: none;
}

.password-input-wrapper input {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 13px 44px 13px 42px;
  color: #f8fafc;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.password-input-wrapper input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  background: #182234;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  color: #94a3b8;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-toggle-pwd:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  gap: 10px;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: #38bdf8;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #0284c7;
  border-color: #38bdf8;
}

.checkmark::after {
  content: "";
  display: none;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-label {
  font-size: 13px;
  color: #cbd5e1;
}

.checkbox-label small {
  color: #64748b;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 13px;
  animation: shake 0.3s ease;
}

.login-error.hidden {
  display: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.btn-login {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #38bdf8;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-login:hover {
  background: #0369a1;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-spinner.hidden {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
}

.login-footer p {
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.2px;
}
