/* ===================================
   Auth -- Wrapper & Card
   =================================== */
.login-page .login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.login-page .login-box {
  background: var(--cortex-surface);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--cortex-border);
  border-radius: var(--cortex-radius);
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow:
          0 8px 32px rgba(0, 0, 0, 0.4),
          inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes cardAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Auth -- Brand
   =================================== */
.cortex-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.brand-glyph {
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--cortex-font-brand);
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: 0;
  color: #fff;
  background:
          radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 60%),
          linear-gradient(135deg, var(--cortex-cyan), var(--cortex-blue));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
          0 0 25px rgba(175, 0, 0, 0.55),
          0 0 70px rgba(175, 0, 0, 0.35),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: glyphPulse 3s ease-in-out infinite;
}

@keyframes glyphPulse {
  0%, 100% {
    box-shadow:
            0 0 25px rgba(175, 0, 0, 0.55),
            0 0 70px rgba(175, 0, 0, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow:
            0 0 40px rgba(175, 0, 0, 0.85),
            0 0 110px rgba(175, 0, 0, 0.55),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

.brand-name {
  font-family: var(--cortex-font-brand);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  background: linear-gradient(135deg, var(--cortex-cyan), var(--cortex-blue), var(--cortex-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.brand-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cortex-text-muted);
  margin: 0;
}

/* ===================================
   Auth -- Form
   =================================== */
.login-page .form-holder {
  margin-bottom: 1.25rem;
}

.login-page .form-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cortex-text-muted);
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--cortex-text-muted);
  transition: color 0.3s;
  pointer-events: none;
}

.input-wrapper:focus-within .input-icon {
  color: var(--cortex-cyan);
}

.login-page .cortex-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--cortex-text);
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  font-size: 0.95rem;
  width: 100%;
  transition: all 0.3s ease;
}

.login-page .cortex-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.login-page .cortex-input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--cortex-cyan);
  box-shadow: 0 0 0 3px rgba(175, 0, 0, 0.1), var(--cortex-glow);
  outline: none;
  color: #fff;
}

/* ===================================
   Auth -- Submit Button
   =================================== */
.cortex-btn {
  position: relative;
  background: linear-gradient(135deg, var(--cortex-cyan), var(--cortex-blue));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: var(--cortex-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  text-transform: uppercase;
  width: 100%;
}

.cortex-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(175, 0, 0, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.cortex-btn:active {
  transform: translateY(0);
}

.cortex-btn .btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cortex-btn:hover .btn-glow {
  left: 100%;
}

/* ===================================
   Auth -- Error / Info Message
   =================================== */
.login-page .error-message {
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid rgba(255, 140, 66, 0.25);
  border-radius: 8px;
  color: var(--cortex-danger);
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.error-icon {
  font-size: 1rem;
}

/* ===================================
   Auth -- Validation
   =================================== */
.login-page .text-danger {
  color: var(--cortex-danger) !important;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: block;
}

/* ===================================
   Auth -- Responsive
   =================================== */
@media (max-width: 480px) {
  .login-page .login-box {
    margin: 1rem;
    padding: 2rem 1.5rem;
  }
  .brand-logo {
    max-width: 200px;
  }
}
